• Larry Finger's avatar
    rtlwifi: Fix smatch warnings in usb.c · 354d0f3c
    Larry Finger authored
    Smatch displays the following:
      CHECK   drivers/net/wireless/rtlwifi/usb.c
    drivers/net/wireless/rtlwifi/usb.c:458 _rtl_usb_rx_process_agg() warn: assigning (-98) to unsigned variable 'stats.noise'
    drivers/net/wireless/rtlwifi/usb.c:503 _rtl_usb_rx_process_noagg() warn: assigning (-98) to unsigned variable 'stats.noise'
    drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code.
    drivers/net/wireless/rtlwifi/usb.c:596 _rtl_rx_get_padding() info: ignoring unreachable code.
    
    The variable 'stats.noise' is not used, thus the initializers are removed.
    The unreachable code info is fixed by including the appropriate section inside
    #ifdef .. #endif constructions.
    Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    354d0f3c
usb.c 30.6 KB