staging: rtl8192e: Remove assert() macro
authorMateusz Kulikowski <mateusz.kulikowski@gmail.com>
Sun, 31 May 2015 18:19:38 +0000 (20:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 31 May 2015 21:33:21 +0000 (06:33 +0900)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtllib_debug.h

index 6f339cd7ae3e31a9fdc9ef07f3982e47b7e99adc..9a4f09dceabee42a4826e09704c607ffeaafd499 100644 (file)
@@ -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);
index 6df8df134367d0f2f659f6c5639e5badc85f04a6..42e88d69ae63c016f56719f848b68f7c6289b702 100644 (file)
@@ -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