linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Kim <leo.kim@atmel.com>
To: <gregkh@linuxfoundation.org>
Cc: <devel@driverdev.osuosl.org>, <linux-wireless@vger.kernel.org>,
	<tony.cho@atmel.com>, <glen.lee@atmel.com>, <leo.kim@atmel.com>,
	<austin.shin@atmel.com>, <Chris.Park@atmel.com>,
	<adham.abozaeid@atmel.com>, <Nicolas.FERRE@atmel.com>
Subject: [PATCH V4 02/24] staging: wilc1000: linux_mon.c: removes debug logs
Date: Mon, 22 Feb 2016 19:14:09 +0900	[thread overview]
Message-ID: <1456136071-10502-3-git-send-email-leo.kim@atmel.com> (raw)
In-Reply-To: <1456136071-10502-1-git-send-email-leo.kim@atmel.com>

This patches removes unnecessary debug logs.

Signed-off-by: Leo Kim <leo.kim@atmel.com>
---
 drivers/staging/wilc1000/linux_mon.c | 24 ++++++------------------
 1 file changed, 6 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/wilc1000/linux_mon.c b/drivers/staging/wilc1000/linux_mon.c
index 9fcb497..558fb50 100644
--- a/drivers/staging/wilc1000/linux_mon.c
+++ b/drivers/staging/wilc1000/linux_mon.c
@@ -157,10 +157,8 @@ static int mon_mgmt_tx(struct net_device *dev, const u8 *buf, size_t len)
 {
 	struct tx_complete_mon_data *mgmt_tx = NULL;
 
-	if (!dev) {
-		PRINT_D(HOSTAPD_DBG, "ERROR: dev == NULL\n");
+	if (!dev)
 		return -EFAULT;
-	}
 
 	netif_stop_queue(dev);
 	mgmt_tx = kmalloc(sizeof(*mgmt_tx), GFP_ATOMIC);
@@ -205,17 +203,12 @@ static netdev_tx_t WILC_WFI_mon_xmit(struct sk_buff *skb,
 		return -EFAULT;
 
 	mon_priv = netdev_priv(wilc_wfi_mon);
-
-	if (!mon_priv) {
-		PRINT_ER("Monitor interface private structure is NULL\n");
+	if (!mon_priv)
 		return -EFAULT;
-	}
-
 	rtap_len = ieee80211_get_radiotap_len(skb->data);
-	if (skb->len < rtap_len) {
-		PRINT_ER("Error in radiotap header\n");
+	if (skb->len < rtap_len)
 		return -1;
-	}
+
 	/* skip the radiotap header */
 	PRINT_INFO(HOSTAPD_DBG, "Radiotap len: %d\n", rtap_len);
 
@@ -306,11 +299,8 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 		return wilc_wfi_mon;
 
 	wilc_wfi_mon = alloc_etherdev(sizeof(struct WILC_WFI_mon_priv));
-	if (!wilc_wfi_mon) {
-		PRINT_ER("failed to allocate memory\n");
+	if (!wilc_wfi_mon)
 		return NULL;
-	}
-
 	wilc_wfi_mon->type = ARPHRD_IEEE80211_RADIOTAP;
 	strncpy(wilc_wfi_mon->name, name, IFNAMSIZ);
 	wilc_wfi_mon->name[IFNAMSIZ - 1] = 0;
@@ -322,10 +312,8 @@ struct net_device *WILC_WFI_init_mon_interface(const char *name, struct net_devi
 		return NULL;
 	}
 	priv = netdev_priv(wilc_wfi_mon);
-	if (!priv) {
-		PRINT_ER("private structure is NULL\n");
+	if (!priv)
 		return NULL;
-	}
 
 	priv->real_ndev = real_dev;
 
-- 
1.9.1


  parent reply	other threads:[~2016-02-22 10:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-22 10:14 [PATCH V4 00/24] staging: wilc1000: Resend V4 Leo Kim
2016-02-22 10:14 ` [PATCH V4 01/24] staging: wilc1000: wilc_wlan.c: removes PRINT_ER Leo Kim
2016-02-22 10:14 ` Leo Kim [this message]
2016-02-22 10:14 ` [PATCH V4 03/24] staging: wilc1000: linux_mon.c: replaces PRINT_ER with netdev_err Leo Kim
2016-02-22 10:14 ` [PATCH V4 04/24] staging: wilc1000: linux_mon.c: add to check routine Leo Kim
2016-02-22 10:14 ` [PATCH V4 05/24] staging: wilc1000: removes potential null dereference Leo Kim
2016-02-22 10:14 ` [PATCH V4 06/24] staging: wilc1000: host_interface.c: removes unnecessary log message Leo Kim
2016-02-22 10:14 ` [PATCH V4 07/24] staging: wilc1000: linux_mon.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 08/24] staging: wilc1000: linux_mon.c: removes comments Leo Kim
2016-02-22 10:14 ` [PATCH V4 09/24] staging: wilc1000: wilc_wfi_cfgoperations.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 10/24] staging: wilc1000: removes unused HOSTAPD_DBG tag Leo Kim
2016-02-22 10:14 ` [PATCH V4 11/24] staging: wilc1000: host_interface.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 12/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 13/24] " Leo Kim
2016-02-22 10:14 ` [PATCH V4 14/24] staging: wilc1000: removes unused CFG80211_DBG tag Leo Kim
2016-02-22 10:14 ` [PATCH V4 15/24] staging: wilc1000: coreconfigurator.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 16/24] staging: wilc1000: host_interface.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 17/24] staging: wilc1000: host_interface.c: replace PRINT_ER with netdev_err Leo Kim
2016-02-22 10:14 ` [PATCH V4 18/24] staging: wilc1000: linux_wlan.c: removes unnecessary log messages Leo Kim
2016-02-22 10:14 ` [PATCH V4 19/24] staging: wilc1000: wilc_wfi_cfgoperations.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 20/24] staging: wilc1000: wilc_wlan.c: " Leo Kim
2016-02-22 10:14 ` [PATCH V4 21/24] staging: wilc1000: removes unused region feature Leo Kim
2016-02-22 10:14 ` [PATCH V4 22/24] staging: wilc1000: removes usused PRINT_XX(region...) Leo Kim
2016-02-22 10:14 ` [PATCH V4 23/24] staging: wilc1000: moves to define values Leo Kim
2016-02-22 10:14 ` [PATCH V4 24/24] staging: wilc1000: moves LINUX_RX_SIZE, LINUX_TX_SIZE Leo Kim
2016-02-22 20:01 ` [PATCH V4 00/24] staging: wilc1000: Resend V4 Greg KH

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=1456136071-10502-3-git-send-email-leo.kim@atmel.com \
    --to=leo.kim@atmel.com \
    --cc=Chris.Park@atmel.com \
    --cc=Nicolas.FERRE@atmel.com \
    --cc=adham.abozaeid@atmel.com \
    --cc=austin.shin@atmel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=glen.lee@atmel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tony.cho@atmel.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;
as well as URLs for NNTP newsgroup(s).