staging: rtl8192ee: Pass large struct by const reference
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Tue, 1 Jul 2014 10:25:45 +0000 (12:25 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 23:51:48 +0000 (16:51 -0700)
struct rtl_stats is rather huge (152 bytes), and since
rtl92ee_rx_command_packet() does not modify it, it might as
well be passed by const reference.

Reported by Coverity: CID 1222131

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192ee/pci.c
drivers/staging/rtl8192ee/rtl8192ee/trx.c
drivers/staging/rtl8192ee/rtl8192ee/trx.h
drivers/staging/rtl8192ee/wifi.h

index 3fe9b7b..f3abbcc 100644 (file)
@@ -892,7 +892,7 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)
                }
 
                /* handle command packet here */
-               if (rtlpriv->cfg->ops->rx_command_packet(hw, stats, skb)) {
+               if (rtlpriv->cfg->ops->rx_command_packet(hw, &stats, skb)) {
                                dev_kfree_skb_any(skb);
                                goto end;
                }
Simple merge