diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2014-09-15 11:01:20 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2014-10-02 02:35:00 -0400 |
commit | 7a1ae9c0ce39d839044745956f08eabbea00d420 (patch) | |
tree | 2416a23bbdf2b9e0b96c6394662fd0834cc4fa50 /drivers/char/hw_random/intel-rng.c | |
parent | 26c3af6c1580a0a6d63cf507ad249953cfaff703 (diff) |
hwrng: printk replacement
as pr_* macros are more preffered over printk, so printk replaced with corresponding pr_* macros
Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/char/hw_random/intel-rng.c')
-rw-r--r-- | drivers/char/hw_random/intel-rng.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/char/hw_random/intel-rng.c b/drivers/char/hw_random/intel-rng.c index 86fe45c19968..290c880266bf 100644 --- a/drivers/char/hw_random/intel-rng.c +++ b/drivers/char/hw_random/intel-rng.c | |||
@@ -199,7 +199,7 @@ static int intel_rng_init(struct hwrng *rng) | |||
199 | if ((hw_status & INTEL_RNG_ENABLED) == 0) | 199 | if ((hw_status & INTEL_RNG_ENABLED) == 0) |
200 | hw_status = hwstatus_set(mem, hw_status | INTEL_RNG_ENABLED); | 200 | hw_status = hwstatus_set(mem, hw_status | INTEL_RNG_ENABLED); |
201 | if ((hw_status & INTEL_RNG_ENABLED) == 0) { | 201 | if ((hw_status & INTEL_RNG_ENABLED) == 0) { |
202 | printk(KERN_ERR PFX "cannot enable RNG, aborting\n"); | 202 | pr_err(PFX "cannot enable RNG, aborting\n"); |
203 | goto out; | 203 | goto out; |
204 | } | 204 | } |
205 | err = 0; | 205 | err = 0; |
@@ -216,7 +216,7 @@ static void intel_rng_cleanup(struct hwrng *rng) | |||
216 | if (hw_status & INTEL_RNG_ENABLED) | 216 | if (hw_status & INTEL_RNG_ENABLED) |
217 | hwstatus_set(mem, hw_status & ~INTEL_RNG_ENABLED); | 217 | hwstatus_set(mem, hw_status & ~INTEL_RNG_ENABLED); |
218 | else | 218 | else |
219 | printk(KERN_WARNING PFX "unusual: RNG already disabled\n"); | 219 | pr_warn(PFX "unusual: RNG already disabled\n"); |
220 | } | 220 | } |
221 | 221 | ||
222 | 222 | ||
@@ -274,7 +274,7 @@ static int __init intel_rng_hw_init(void *_intel_rng_hw) | |||
274 | if (mfc != INTEL_FWH_MANUFACTURER_CODE || | 274 | if (mfc != INTEL_FWH_MANUFACTURER_CODE || |
275 | (dvc != INTEL_FWH_DEVICE_CODE_8M && | 275 | (dvc != INTEL_FWH_DEVICE_CODE_8M && |
276 | dvc != INTEL_FWH_DEVICE_CODE_4M)) { | 276 | dvc != INTEL_FWH_DEVICE_CODE_4M)) { |
277 | printk(KERN_NOTICE PFX "FWH not detected\n"); | 277 | pr_notice(PFX "FWH not detected\n"); |
278 | return -ENODEV; | 278 | return -ENODEV; |
279 | } | 279 | } |
280 | 280 | ||
@@ -306,7 +306,6 @@ static int __init intel_init_hw_struct(struct intel_rng_hw *intel_rng_hw, | |||
306 | (BIOS_CNTL_LOCK_ENABLE_MASK|BIOS_CNTL_WRITE_ENABLE_MASK)) | 306 | (BIOS_CNTL_LOCK_ENABLE_MASK|BIOS_CNTL_WRITE_ENABLE_MASK)) |
307 | == BIOS_CNTL_LOCK_ENABLE_MASK) { | 307 | == BIOS_CNTL_LOCK_ENABLE_MASK) { |
308 | static __initdata /*const*/ char warning[] = | 308 | static __initdata /*const*/ char warning[] = |
309 | KERN_WARNING | ||
310 | PFX "Firmware space is locked read-only. If you can't or\n" | 309 | PFX "Firmware space is locked read-only. If you can't or\n" |
311 | PFX "don't want to disable this in firmware setup, and if\n" | 310 | PFX "don't want to disable this in firmware setup, and if\n" |
312 | PFX "you are certain that your system has a functional\n" | 311 | PFX "you are certain that your system has a functional\n" |
@@ -314,7 +313,7 @@ PFX "RNG, try using the 'no_fwh_detect' option.\n"; | |||
314 | 313 | ||
315 | if (no_fwh_detect) | 314 | if (no_fwh_detect) |
316 | return -ENODEV; | 315 | return -ENODEV; |
317 | printk(warning); | 316 | pr_warn("%s", warning); |
318 | return -EBUSY; | 317 | return -EBUSY; |
319 | } | 318 | } |
320 | 319 | ||
@@ -392,10 +391,10 @@ fwh_done: | |||
392 | goto out; | 391 | goto out; |
393 | } | 392 | } |
394 | 393 | ||
395 | printk(KERN_INFO "Intel 82802 RNG detected\n"); | 394 | pr_info("Intel 82802 RNG detected\n"); |
396 | err = hwrng_register(&intel_rng); | 395 | err = hwrng_register(&intel_rng); |
397 | if (err) { | 396 | if (err) { |
398 | printk(KERN_ERR PFX "RNG registering failed (%d)\n", | 397 | pr_err(PFX "RNG registering failed (%d)\n", |
399 | err); | 398 | err); |
400 | iounmap(mem); | 399 | iounmap(mem); |
401 | } | 400 | } |