From ca93dcba3a924214e4c0132ef1564ba52f907d94 Mon Sep 17 00:00:00 2001 From: Mateusz Kulikowski Date: Sun, 31 May 2015 20:19:38 +0200 Subject: [PATCH] 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 Signed-off-by: Greg Kroah-Hartman --- 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 6f339cd7ae3e..9a4f09dceabe 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 6df8df134367..42e88d69ae63 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 -- 2.39.5