diff mbox

[OPW,kernel,12/13] staging: rtl8187se: use netdev_info instead of printk

Message ID 1382316061-31542-13-git-send-email-teobaluta@gmail.com
State New, archived
Headers show

Commit Message

Teodora Baluta Oct. 21, 2013, 12:41 a.m. UTC
This patch fixes the following checkpatch warning:
WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then
pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
---
 drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Josh Triplett Oct. 21, 2013, 7:08 p.m. UTC | #1
On Mon, Oct 21, 2013 at 03:41:00AM +0300, Teodora Baluta wrote:
> This patch fixes the following checkpatch warning:
> WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ... then
> pr_info(...  to printk(KERN_INFO ...
> 
> Signed-off-by: Teodora Baluta <teobaluta@gmail.com>
> ---
>  drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> index 48c99c3..ab07f0b 100644
> --- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> +++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
> @@ -225,8 +225,8 @@ int ieee80211_encrypt_fragment(
>  
>  	atomic_dec(&crypt->refcnt);
>  	if (res < 0) {
> -		printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
> -		       ieee->dev->name, frag->len);
> +		netdev_info(ieee->dev, "%s: Encryption failed: len=%d.\n",
> +			    ieee->dev->name, frag->len);

netdev_* will print the dev name for you already.

- Josh Triplett
diff mbox

Patch

diff --git a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
index 48c99c3..ab07f0b 100644
--- a/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
+++ b/drivers/staging/rtl8187se/ieee80211/ieee80211_tx.c
@@ -225,8 +225,8 @@  int ieee80211_encrypt_fragment(
 
 	atomic_dec(&crypt->refcnt);
 	if (res < 0) {
-		printk(KERN_INFO "%s: Encryption failed: len=%d.\n",
-		       ieee->dev->name, frag->len);
+		netdev_info(ieee->dev, "%s: Encryption failed: len=%d.\n",
+			    ieee->dev->name, frag->len);
 		ieee->ieee_stats.tx_discards++;
 		return -1;
 	}