Search Linux Wireless

Re: rtlwifi: rtl8192ee: Move driver from staging to the regular tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10/02/2014 04:10 AM, Dan Carpenter wrote:
Hello Larry Finger,

There are still some static checker warnings after this driver moved.

drivers/net/wireless/rtlwifi/rtl8192ee/hw.c:533 rtl92ee_set_hw_reg() warn: add curly braces? (if)
drivers/net/wireless/rtlwifi/rtl8192ee/hw.c:539 rtl92ee_set_hw_reg() warn: add curly braces? (if)

Some unreleased static checker warnings for rtl are:

drivers/net/wireless/rtlwifi/rtl8723be/trx.c:550 rtl8723be_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8188ee/trx.c:621 rtl88ee_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8192ee/trx.c:567 rtl92ee_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8821ae/trx.c:758 rtl8821ae_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8723ae/trx.c:494 rtl8723e_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8192se/trx.c:315 rtl92se_rx_query_desc() warn: 'hdr' can't be NULL.
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:392 rtl92ce_rx_query_desc() warn: 'hdr' can't be NULL.

These bogus null checks were added because:
drivers/net/wireless/rtlwifi/rtl8192se/trx.c says /* during testing, hdr
was NULL here */.  It is concerning because that means something weird
is going on when impossible things start happening during testing.

regards,
dan carpenter

Dan,

Thanks for these warnings. A patch has been submitted.

The first two were due to indenting errors.

As to the bogus checks for null, that same comment was in rtl8192ce. As that was the first mac80211 driver that Realtek prepared, I suspect that there once was a bug elsewhere in the code that resulted in a corrupted skb, and the hdr test was added to keep from crashing. Once that bug was corrected, the hdr test was forgotten. I do not remember ever seeing that condition being logged, but if there is another bug somewhere, it will now get attention!

Larry

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




[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux