hwrng: printk replacement
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Mon, 15 Sep 2014 15:01:20 +0000 (20:31 +0530)
committerHerbert Xu <herbert@gondor.apana.org.au>
Thu, 2 Oct 2014 06:35:00 +0000 (14:35 +0800)
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>
drivers/char/hw_random/amd-rng.c
drivers/char/hw_random/geode-rng.c
drivers/char/hw_random/intel-rng.c
drivers/char/hw_random/pasemi-rng.c
drivers/char/hw_random/pseries-rng.c
drivers/char/hw_random/via-rng.c

index c6af038682f1904c17e1e7d47a8b310a96f894c9..48f6a83cdd61b5379f2a6ff14a6faf3dc52b04ad 100644 (file)
@@ -142,10 +142,10 @@ found:
        amd_rng.priv = (unsigned long)pmbase;
        amd_pdev = pdev;
 
-       printk(KERN_INFO "AMD768 RNG detected\n");
+       pr_info("AMD768 RNG detected\n");
        err = hwrng_register(&amd_rng);
        if (err) {
-               printk(KERN_ERR PFX "RNG registering failed (%d)\n",
+               pr_err(PFX "RNG registering failed (%d)\n",
                       err);
                release_region(pmbase + 0xF0, 8);
                goto out;
index 4c4d4e140f9853ee0714f7898477a6eae6757d8a..0d0579fe465e3bdc71149b81e4a5e1f14171c9a5 100644 (file)
@@ -109,10 +109,10 @@ found:
                goto out;
        geode_rng.priv = (unsigned long)mem;
 
-       printk(KERN_INFO "AMD Geode RNG detected\n");
+       pr_info("AMD Geode RNG detected\n");
        err = hwrng_register(&geode_rng);
        if (err) {
-               printk(KERN_ERR PFX "RNG registering failed (%d)\n",
+               pr_err(PFX "RNG registering failed (%d)\n",
                       err);
                goto err_unmap;
        }
index 86fe45c19968a14fef860dae956c3827eb2a067c..290c880266bfed3780bba77e674634e91c83d2b2 100644 (file)
@@ -199,7 +199,7 @@ static int intel_rng_init(struct hwrng *rng)
        if ((hw_status & INTEL_RNG_ENABLED) == 0)
                hw_status = hwstatus_set(mem, hw_status | INTEL_RNG_ENABLED);
        if ((hw_status & INTEL_RNG_ENABLED) == 0) {
-               printk(KERN_ERR PFX "cannot enable RNG, aborting\n");
+               pr_err(PFX "cannot enable RNG, aborting\n");
                goto out;
        }
        err = 0;
@@ -216,7 +216,7 @@ static void intel_rng_cleanup(struct hwrng *rng)
        if (hw_status & INTEL_RNG_ENABLED)
                hwstatus_set(mem, hw_status & ~INTEL_RNG_ENABLED);
        else
-               printk(KERN_WARNING PFX "unusual: RNG already disabled\n");
+               pr_warn(PFX "unusual: RNG already disabled\n");
 }
 
 
@@ -274,7 +274,7 @@ static int __init intel_rng_hw_init(void *_intel_rng_hw)
        if (mfc != INTEL_FWH_MANUFACTURER_CODE ||
            (dvc != INTEL_FWH_DEVICE_CODE_8M &&
             dvc != INTEL_FWH_DEVICE_CODE_4M)) {
-               printk(KERN_NOTICE PFX "FWH not detected\n");
+               pr_notice(PFX "FWH not detected\n");
                return -ENODEV;
        }
 
@@ -306,7 +306,6 @@ static int __init intel_init_hw_struct(struct intel_rng_hw *intel_rng_hw,
             (BIOS_CNTL_LOCK_ENABLE_MASK|BIOS_CNTL_WRITE_ENABLE_MASK))
            == BIOS_CNTL_LOCK_ENABLE_MASK) {
                static __initdata /*const*/ char warning[] =
-                       KERN_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"
@@ -314,7 +313,7 @@ PFX "RNG, try using the 'no_fwh_detect' option.\n";
 
                if (no_fwh_detect)
                        return -ENODEV;
-               printk(warning);
+               pr_warn("%s", warning);
                return -EBUSY;
        }
 
@@ -392,10 +391,10 @@ fwh_done:
                goto out;
        }
 
-       printk(KERN_INFO "Intel 82802 RNG detected\n");
+       pr_info("Intel 82802 RNG detected\n");
        err = hwrng_register(&intel_rng);
        if (err) {
-               printk(KERN_ERR PFX "RNG registering failed (%d)\n",
+               pr_err(PFX "RNG registering failed (%d)\n",
                       err);
                iounmap(mem);
        }
index c66279bb6ef372823afea9a6d36be798c3cb744c..c0347d1dded000731425378bee68ffd9929aaf9b 100644 (file)
@@ -113,7 +113,7 @@ static int rng_probe(struct platform_device *ofdev)
 
        pasemi_rng.priv = (unsigned long)rng_regs;
 
-       printk(KERN_INFO "Registering PA Semi RNG\n");
+       pr_info("Registering PA Semi RNG\n");
 
        err = hwrng_register(&pasemi_rng);
 
index ab7ffdec0ec3545a7ec6f940b32cff396d153183..6226aa08c36af59b9406b5a278880537e16ac9a4 100644 (file)
@@ -86,7 +86,7 @@ static struct vio_driver pseries_rng_driver = {
 
 static int __init rng_init(void)
 {
-       printk(KERN_INFO "Registering IBM pSeries RNG driver\n");
+       pr_info("Registering IBM pSeries RNG driver\n");
        return vio_register_driver(&pseries_rng_driver);
 }
 
index de5a6dcfb3e242ec4aa5b6742c73c7700e32d551..a3bebef255ad3af669c2134ce85805d0af4b0523 100644 (file)
@@ -141,7 +141,7 @@ static int via_rng_init(struct hwrng *rng)
         * register */
        if ((c->x86 == 6) && (c->x86_model >= 0x0f)) {
                if (!cpu_has_xstore_enabled) {
-                       printk(KERN_ERR PFX "can't enable hardware RNG "
+                       pr_err(PFX "can't enable hardware RNG "
                                "if XSTORE is not enabled\n");
                        return -ENODEV;
                }
@@ -180,7 +180,7 @@ static int via_rng_init(struct hwrng *rng)
           unneeded */
        rdmsr(MSR_VIA_RNG, lo, hi);
        if ((lo & VIA_RNG_ENABLE) == 0) {
-               printk(KERN_ERR PFX "cannot enable VIA C3 RNG, aborting\n");
+               pr_err(PFX "cannot enable VIA C3 RNG, aborting\n");
                return -ENODEV;
        }
 
@@ -202,10 +202,10 @@ static int __init mod_init(void)
 
        if (!cpu_has_xstore)
                return -ENODEV;
-       printk(KERN_INFO "VIA RNG detected\n");
+       pr_info("VIA RNG detected\n");
        err = hwrng_register(&via_rng);
        if (err) {
-               printk(KERN_ERR PFX "RNG registering failed (%d)\n",
+               pr_err(PFX "RNG registering failed (%d)\n",
                       err);
                goto out;
        }