hwrng: intel - declare warning string as const
Subsystems (2)
PATCH 1/1 hwrng: intel - declare warning string as const
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 <[email protected]>
--- drivers/char/hw_random/intel-rng.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/char/hw_random/intel-rng.c +5 -5
@@ -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 ;
Herbert Xu
maintainerQuoted 8 lines · Thorsten Blum
The warning string is not modified and only used during initialization. Declare it as const, replace
__initdatawith__initconst, and indent the string.Signed-off-by Thorsten Blum <[email protected]>--- drivers/char/hw_random/intel-rng.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
Patch applied. Thanks.
Signature · 3 lines
Email: Herbert Xu <[email protected]> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt