• Arnd Bergmann's avatar
    staging: rtlwifi: simplify logical operation · 03fef6c5
    Arnd Bergmann authored
    gcc notices a very complicated way to check a value
    for being equal to one, and warns about it:
    
    drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c: In function 'halbtc8822b1ant_set_ext_ant_switch':
    drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: error: '~' on a boolean expression [-Werror=bool-operation]
             ~switch_polatiry_inverse :
             ^
    drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c:2105:9: note: did you mean to use logical not?
             ~switch_polatiry_inverse :
             ^
    
    This simplifies this expression to make it more readable
    and to make gcc happy.
    
    Fixes: 56bde846 ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    03fef6c5
halbtc8822b1ant.c 154 KB