From: Rasmus Villemoes Date: Tue, 1 Jul 2014 10:25:45 +0000 (+0200) Subject: staging: rtl8192ee: Pass large struct by const reference X-Git-Tag: cleanup-for-v3.18~125^2~1140 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc4f07c86eec8d530d8124530067b589b4be5c71;p=pandora-kernel.git staging: rtl8192ee: Pass large struct by const reference 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/rtl8192ee/pci.c b/drivers/staging/rtl8192ee/pci.c index 3fe9b7ba01d6..f3abbcc9f3ba 100644 --- a/drivers/staging/rtl8192ee/pci.c +++ b/drivers/staging/rtl8192ee/pci.c @@ -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; } Reading git-diff-tree failed