Skip to content

Commit

Permalink
staging: rtl8192e: Remove assert() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
hallor authored and gregkh committed May 31, 2015
1 parent db65e4a commit ca93dcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/rtl8192e/rtl8192e/rtl_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
8 changes: 0 additions & 8 deletions drivers/staging/rtl8192e/rtllib_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ca93dcb

Please sign in to comment.