All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8192e: Use netdev_info instead of printk.
@ 2015-02-28 23:18 Navya Sri Nizamkari
  2015-03-02  1:08 ` [Outreachy kernel] " Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Navya Sri Nizamkari @ 2015-02-28 23:18 UTC (permalink / raw)
  To: outreachy-kernel

This patch uses netdev_info instead of printk(KERN_INFO..)
as this is network driver to fix the following
checkpatch.pl warning:

WARNING: Prefer netdev_info(netdev, ... then dev_info(dev, ...
then pr_info(...  to printk(KERN_INFO ...

Signed-off-by: Navya Sri Nizamkari <navyasri.tech@gmail.com>
---
 drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
index c233a1c..b2b5716 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c
@@ -254,7 +254,7 @@ static int r8192se_wx_set_radio(struct net_device *dev,
 
 	down(&priv->wx_sem);
 
-	printk(KERN_INFO "%s(): set radio ! extra is %d\n", __func__, *extra);
+	netdev_info(dev, "%s(): set radio ! extra is %d\n", __func__, *extra);
 	if ((*extra != 0) && (*extra != 1)) {
 		RT_TRACE(COMP_ERR, "%s(): set radio an err value,must 0(radio "
 			 "off) or 1(radio on)\n", __func__);
@@ -277,7 +277,7 @@ static int r8192se_wx_set_lps_awake_interval(struct net_device *dev,
 
 	down(&priv->wx_sem);
 
-	printk(KERN_INFO "%s(): set lps awake interval ! extra is %d\n",
+	netdev_info(dev, "%s(): set lps awake interval ! extra is %d\n",
 	       __func__, *extra);
 
 	pPSC->RegMaxLPSAwakeIntvl = *extra;
@@ -293,7 +293,7 @@ static int r8192se_wx_set_force_lps(struct net_device *dev,
 
 	down(&priv->wx_sem);
 
-	printk(KERN_INFO "%s(): force LPS ! extra is %d (1 is open 0 is "
+	netdev_info(dev, "%s(): force LPS ! extra is %d (1 is open 0 is "
 	       "close)\n", __func__, *extra);
 	priv->force_lps = *extra;
 	up(&priv->wx_sem);
@@ -311,7 +311,7 @@ static int r8192_wx_set_debugflag(struct net_device *dev,
 	if (priv->bHwRadioOff == true)
 		return 0;
 
-	printk(KERN_INFO "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
+	netdev_info(dev, "=====>%s(), *extra:%x, debugflag:%x\n", __func__,
 	       *extra, rt_global_debug_component);
 	if (c > 0)
 		rt_global_debug_component |= (1<<c);
@@ -344,7 +344,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
 					up(&priv->wx_sem);
 					return -1;
 				} else {
-					printk(KERN_INFO "=========>%s(): "
+					netdev_info(dev, "=========>%s(): "
 					       "IPSLeave\n", __func__);
 					down(&priv->rtllib->ips_sem);
 					IPSLeave(dev);
@@ -471,7 +471,7 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
 	}
 
 	if (priv->bHwRadioOff == true) {
-		printk(KERN_INFO "================>%s(): hwradio off\n",
+		netdev_info(dev, "================>%s(): hwradio off\n",
 		       __func__);
 		return 0;
 	}
@@ -573,7 +573,7 @@ static int r8192_wx_set_essid(struct net_device *dev,
 	int ret;
 
 	if (priv->bHwRadioOff == true) {
-		printk(KERN_INFO "=========>%s():hw radio off,or Rf state is "
+		netdev_info(dev, "=========>%s():hw radio off,or Rf state is "
 		       "eRfOff, return\n", __func__);
 		return 0;
 	}
@@ -826,7 +826,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
 			set_swcam(dev, key_idx, key_idx, KEY_TYPE_WEP104,
 				  zero_addr[key_idx], 0, hwkey, 0);
 		} else {
-			 printk(KERN_INFO "wrong type in WEP, not WEP40 and WEP104\n");
+			 netdev_info(dev, "wrong type in WEP, not WEP40 and WEP104\n");
 		}
 	}
 
@@ -1148,7 +1148,7 @@ static int r8192_wx_set_PromiscuousMode(struct net_device *dev,
 			(rtllib_EnableIntelPromiscuousMode(dev, false)) :
 			(rtllib_DisableIntelPromiscuousMode(dev, false));
 
-		printk(KERN_INFO "=======>%s(), on = %d, filter src sta = %d\n",
+		netdev_info(dev, "=======>%s(), on = %d, filter src sta = %d\n",
 		       __func__, bPromiscuousOn, bFilterSourceStationFrame);
 	} else {
 		return -1;
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-02  1:08 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-28 23:18 [PATCH] staging: rtl8192e: Use netdev_info instead of printk Navya Sri Nizamkari
2015-03-02  1:08 ` [Outreachy kernel] " Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.