mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
To: gregkh@linuxfoundation.org
Cc: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>,
	joe@perches.com, mdcasey@chabloom.com,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH v3 5/6] staging: rtl8192e: rtllib_wx: fix coding style (printk -> netdev_*)
Date: Fri, 13 Mar 2015 00:53:20 +0100	[thread overview]
Message-ID: <1426204401-20414-6-git-send-email-mateusz.kulikowski@gmail.com> (raw)
In-Reply-To: <1426204401-20414-1-git-send-email-mateusz.kulikowski@gmail.com>
In-Reply-To: <1426059960-11587-1-git-send-email-mateusz.kulikowski@gmail.com>

Use netdev_*() functions to print diagnostic messages.

Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
---
 drivers/staging/rtl8192e/rtllib_wx.c | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index 3a049e1..9f3a8f2 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -389,9 +389,8 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
 			kfree(new_crypt);
 			new_crypt = NULL;
 
-			printk(KERN_WARNING "%s: could not initialize WEP: "
-			       "load module rtllib_crypt_wep\n",
-			       dev->name);
+			netdev_warn(dev,
+				    "could not initialize WEP: load module rtllib_crypt_wep\n");
 			return -EOPNOTSUPP;
 		}
 		*crypt = new_crypt;
@@ -422,11 +421,9 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
 					     NULL, (*crypt)->priv);
 		if (len == 0) {
 			/* Set a default key of all 0 */
-			printk(KERN_INFO "Setting key %d to all zero.\n",
-					   key);
-
 			RTLLIB_DEBUG_WX("Setting key %d to all zero.\n",
 					   key);
+			netdev_info(dev, "Setting key %d to all zero.\n", key);
 			memset(sec.keys[key], 0, 13);
 			(*crypt)->ops->set_key(sec.keys[key], 13, NULL,
 					       (*crypt)->priv);
@@ -468,7 +465,7 @@ int rtllib_wx_set_encode(struct rtllib_device *ieee,
 	if (ieee->reset_on_keychange &&
 	    ieee->iw_mode != IW_MODE_INFRA &&
 	    ieee->reset_port && ieee->reset_port(dev)) {
-		printk(KERN_DEBUG "%s: reset_port failed\n", dev->name);
+		netdev_dbg(dev, "reset_port failed\n");
 		return -EINVAL;
 	}
 	return 0;
@@ -595,7 +592,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
 		ret = -EINVAL;
 		goto done;
 	}
-	printk(KERN_INFO "alg name:%s\n", alg);
+	netdev_info(dev, "alg name:%s\n", alg);
 
 	ops = lib80211_get_crypto_ops(alg);
 	if (ops == NULL) {
@@ -609,7 +606,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
 	if (ops == NULL) {
 		RTLLIB_DEBUG_WX("%s: unknown crypto alg %d\n",
 				   dev->name, ext->alg);
-		printk(KERN_INFO "========>unknown crypto alg %d\n", ext->alg);
+		netdev_info(dev, "unknown crypto alg %d\n", ext->alg);
 		ret = -EINVAL;
 		goto done;
 	}
@@ -641,7 +638,7 @@ int rtllib_wx_set_encode_ext(struct rtllib_device *ieee,
 	    (*crypt)->ops->set_key(ext->key, ext->key_len, ext->rx_seq,
 				   (*crypt)->priv) < 0) {
 		RTLLIB_DEBUG_WX("%s: key setting failed\n", dev->name);
-		printk(KERN_INFO "key setting failed\n");
+		netdev_info(dev, "key setting failed\n");
 		ret = -EINVAL;
 		goto done;
 	}
@@ -758,9 +755,9 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee,
 
 	case IW_MLME_DISASSOC:
 		if (deauth)
-			printk(KERN_INFO "disauth packet !\n");
+			netdev_warn(ieee->dev, "disauth packet !\n");
 		else
-			printk(KERN_INFO "dis associate packet!\n");
+			netdev_warn(ieee->dev, "dis associate packet!\n");
 
 		ieee->cannot_notify = true;
 
-- 
1.8.4.1


  parent reply	other threads:[~2015-03-12 23:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 22:53 [PATCH] staging: rtl8192e: rtllib_wx: code style improvements Mateusz Kulikowski
2015-03-10 23:01 ` Joe Perches
2015-03-11  7:32   ` Mateusz Kulikowski
2015-03-11  7:46 ` [PATCH v2] " Mateusz Kulikowski
2015-03-11  7:53   ` Greg KH
2015-03-11 22:19     ` Mateusz Kulikowski
2015-03-12 23:53   ` [PATCH v3 0/6] staging: rtl8192e: fix coding style issues Mateusz Kulikowski
2015-03-12 23:53   ` [PATCH v3 1/6] staging: rtl8192e: fix coding style issues (merge broken strings) Mateusz Kulikowski
2015-03-13  0:27     ` Joe Perches
2015-03-16 21:57       ` Mateusz Kulikowski
2015-03-17  0:17         ` Joe Perches
2015-03-16  8:44     ` Dan Carpenter
2015-03-16 21:45       ` Mateusz Kulikowski
2015-03-12 23:53   ` [PATCH v3 2/6] staging: rtl8192e: fix coding style issues (replace min with min_t) Mateusz Kulikowski
2015-03-12 23:53   ` [PATCH v3 3/6] staging: rtl8192e: fix coding style issues (spaces before semicolon) Mateusz Kulikowski
2015-03-12 23:53   ` [PATCH v3 4/6] staging: rtl8192e: fix coding style errors (macros in parentheses) Mateusz Kulikowski
2015-03-12 23:53   ` Mateusz Kulikowski [this message]
2015-03-12 23:53   ` [PATCH v3 6/6] staging: rtl8192e: rtllib_wx: remove duplicate messages Mateusz Kulikowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1426204401-20414-6-git-send-email-mateusz.kulikowski@gmail.com \
    --to=mateusz.kulikowski@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mdcasey@chabloom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®