Skip to contentSkip to conversation

Potential problem in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process()

DISCUSSION Guenter Roeck 3 participants 3 messages Jan 27, 2013 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi all,

while browsing through 'warning: variable ‘...’ set but not used' warnings, I found the following code in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process().

	while (!skb_queue_empty(&rx_queue)) {
        	_skb = skb_dequeue(&rx_queue);
		_rtl_usb_rx_process_agg(hw, skb);
		ieee80211_rx_irqsafe(hw, skb);
	}

Question: Should the parameter to _rtl_usb_rx_process_agg() and ieee80211_rx_irqsafe() be '_skb' instead of 'skb' ?

Thanks,
Guenter

#2 lore raw
In reply to a message not in the archive
Quoted 5 lines · Guenter Roeck

Hi all,

while browsing through 'warning: variable ‘...’ set but not used' warnings, I found the following code in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process().

Quoted 8 lines
	while (!skb_queue_empty(&rx_queue)) {
         	_skb = skb_dequeue(&rx_queue);
		_rtl_usb_rx_process_agg(hw, skb);
		ieee80211_rx_irqsafe(hw, skb);
	}

Question: Should the parameter to _rtl_usb_rx_process_agg() and ieee80211_rx_irqsafe() be '_skb' instead of 'skb' ?

I think you are right and I will submit a patch to fix this.

What compiler version reported this? I use "gcc (SUSE Linux) 4.7.2 20130108 [gcc-4_7-branch revision 195012]" and I do not see this warning.

Thanks,

Larry

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#3 lore raw
Quoted 12 lines · Larry Finger
Quoted 11 lines · Guenter Roeck

Hi all,

while browsing through 'warning: variable ‘...’ set but not used' warnings, I found the following code in drivers/net/wireless/rtlwifi/usb.c:_rtl_rx_pre_process().

	while (!skb_queue_empty(&rx_queue)) {
        	_skb = skb_dequeue(&rx_queue);
		_rtl_usb_rx_process_agg(hw, skb);
		ieee80211_rx_irqsafe(hw, skb);
	}
Quoted 9 lines
Quoted 2 lines

Question: Should the parameter to _rtl_usb_rx_process_agg() and ieee80211_rx_irqsafe() be '_skb' instead of 'skb' ?

I think you are right and I will submit a patch to fix this.

What compiler version reported this? I use "gcc (SUSE Linux) 4.7.2 20130108 [gcc-4_7-branch revision 195012]" and I do not see this warning.

Hi Larry,

I use "gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2".

You'll see the warning if you build the kernel with W=1.

Guenter