mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] hwrng: intel - declare warning string as const
@ 2026-09-23 10:42 Thorsten Blum
  2026-10-02 10:10 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-09-23 10:42 UTC (permalink / raw)
  To: Olivia Mackall, Herbert Xu, Kees Cook
  Cc: Thorsten Blum, linux-crypto, linux-kernel

The warning string is not modified and only used during initialization.
Declare it as const, replace __initdata with __initconst, and indent the
string.

Signed-off-by: Thorsten Blum <blum@kernel.org>
---
 drivers/char/hw_random/intel-rng.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c
index 828ed57f8500..dc3c7b6e1e59 100644
--- a/drivers/char/hw_random/intel-rng.c
+++ b/drivers/char/hw_random/intel-rng.c
@@ -305,11 +305,11 @@ static int __init intel_init_hw_struct(struct intel_rng_hw *intel_rng_hw,
 	if ((intel_rng_hw->bios_cntl_val &
 	     (BIOS_CNTL_LOCK_ENABLE_MASK|BIOS_CNTL_WRITE_ENABLE_MASK))
 	    == BIOS_CNTL_LOCK_ENABLE_MASK) {
-		static __initdata /*const*/ char warning[] =
-PFX "Firmware space is locked read-only. If you can't or\n"
-PFX "don't want to disable this in firmware setup, and if\n"
-PFX "you are certain that your system has a functional\n"
-PFX "RNG, try using the 'no_fwh_detect' option.\n";
+		static const char warning[] __initconst =
+			PFX "Firmware space is locked read-only. If you can't or\n"
+			PFX "don't want to disable this in firmware setup, and if\n"
+			PFX "you are certain that your system has a functional\n"
+			PFX "RNG, try using the 'no_fwh_detect' option.\n";
 
 		if (no_fwh_detect)
 			return -ENODEV;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] hwrng: intel - declare warning string as const
  2026-09-23 10:42 [PATCH] hwrng: intel - declare warning string as const Thorsten Blum
@ 2026-10-02 10:10 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2026-10-02 10:10 UTC (permalink / raw)
  To: Thorsten Blum; +Cc: Olivia Mackall, Kees Cook, linux-crypto, linux-kernel

On Wed, Sep 23, 2026 at 12:42:35PM +0200, Thorsten Blum wrote:
> The warning string is not modified and only used during initialization.
> Declare it as const, replace __initdata with __initconst, and indent the
> string.
> 
> Signed-off-by: Thorsten Blum <blum@kernel.org>
> ---
>  drivers/char/hw_random/intel-rng.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-10-02 10:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-23 10:42 [PATCH] hwrng: intel - declare warning string as const Thorsten Blum
2026-10-02 10:10 ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®