Staging: rtl8192u: Replace printk() with pr_debug() and netdev_dbg().
authorKsenija Stanojevic <ksenija.stanojevic@gmail.com>
Sat, 21 Feb 2015 11:24:38 +0000 (12:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Feb 2015 21:24:15 +0000 (13:24 -0800)
For dynamic debugging pr_debug() or netdev_dbg (if there is a ponter
to a device net structure) is preferred over printk(), which is the
raw way to print something. Issue found by checkpatch.pl.

Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/ieee80211_crypt.c

index 1fb6d85385e045f51169bed0a2504e09913f7cc5..da3cb29fc02d9a0a9f776cc783bb7235ccd1aaeb 100644 (file)
@@ -66,7 +66,7 @@ void ieee80211_crypt_deinit_handler(unsigned long data)
        spin_lock_irqsave(&ieee->lock, flags);
        ieee80211_crypt_deinit_entries(ieee, 0);
        if (!list_empty(&ieee->crypt_deinit_list)) {
-               printk(KERN_DEBUG "%s: entries remaining in delayed crypt "
+               netdev_dbg(ieee->dev, "%s: entries remaining in delayed crypt "
                       "deletion list\n", ieee->dev->name);
                ieee->crypt_deinit_timer.expires = jiffies + HZ;
                add_timer(&ieee->crypt_deinit_timer);
@@ -118,7 +118,7 @@ int ieee80211_register_crypto_ops(struct ieee80211_crypto_ops *ops)
        list_add(&alg->list, &hcrypt->algs);
        spin_unlock_irqrestore(&hcrypt->lock, flags);
 
-       printk(KERN_DEBUG "ieee80211_crypt: registered algorithm '%s'\n",
+       pr_debug("ieee80211_crypt: registered algorithm '%s'\n",
               ops->name);
 
        return 0;
@@ -146,7 +146,7 @@ int ieee80211_unregister_crypto_ops(struct ieee80211_crypto_ops *ops)
        spin_unlock_irqrestore(&hcrypt->lock, flags);
 
        if (del_alg) {
-               printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
+               pr_debug("ieee80211_crypt: unregistered algorithm "
                       "'%s'\n", ops->name);
                kfree(del_alg);
        }
@@ -232,7 +232,7 @@ void __exit ieee80211_crypto_deinit(void)
                struct ieee80211_crypto_alg *alg =
                        (struct ieee80211_crypto_alg *) ptr;
                list_del(ptr);
-               printk(KERN_DEBUG "ieee80211_crypt: unregistered algorithm "
+               pr_debug("ieee80211_crypt: unregistered algorithm "
                       "'%s' (deinit)\n", alg->ops->name);
                kfree(alg);
        }