[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1433096393-9862-20-git-send-email-mateusz.kulikowski@gmail.com>
Date: Sun, 31 May 2015 20:19:38 +0200
From: Mateusz Kulikowski <mateusz.kulikowski@...il.com>
To: gregkh@...uxfoundation.org
Cc: Mateusz Kulikowski <mateusz.kulikowski@...il.com>,
dan.carpenter@...cle.com, joe@...ches.com,
devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: [PATCH v5 19/34] staging: rtl8192e: Remove assert() macro
Assert macro printed warning message (and was used once).
Remove it, and add netdev_warn() in place where it was called.
Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@...il.com>
---
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 5 +++--
drivers/staging/rtl8192e/rtllib_debug.h | 8 --------
2 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 6f339cd..9a4f09d 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -1885,8 +1885,9 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev,
return;
}
- assert(queue_index != TXCMD_QUEUE);
-
+ if (queue_index != TXCMD_QUEUE)
+ netdev_warn(dev, "%s(): queue index != TXCMD_QUEUE\n",
+ __func__);
memcpy((unsigned char *)(skb->cb), &dev, sizeof(dev));
skb_push(skb, priv->rtllib->tx_headroom);
diff --git a/drivers/staging/rtl8192e/rtllib_debug.h b/drivers/staging/rtl8192e/rtllib_debug.h
index 6df8df1..42e88d6 100644
--- a/drivers/staging/rtl8192e/rtllib_debug.h
+++ b/drivers/staging/rtl8192e/rtllib_debug.h
@@ -76,12 +76,4 @@ do { \
printk(KERN_DEBUG DRV_NAME ":" x "\n", ##args);\
} while (0)
-#define assert(expr) \
-do { \
- if (!(expr)) { \
- pr_info("Assertion failed! %s,%s,%s,line=%d\n", \
- #expr, __FILE__, __func__, __LINE__); \
- } \
-} while (0)
-
#endif
--
1.8.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists