lkml.org 
[lkml]   [2015]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v4 20/35] staging: rtl8192e: Remove assert() macro
Date
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@gmail.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 c25984d..9d96565 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


\
 
 \ /
  Last update: 2015-05-21 18:41    [W:0.199 / U:0.256 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site