]> git.baikalelectronics.ru Git - kernel.git/commit
staging: rtlwifi: simplify logical operation
authorArnd Bergmann <arnd@arndb.de>
Wed, 23 Aug 2017 13:22:53 +0000 (15:22 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 23 Aug 2017 23:27:07 +0000 (16:27 -0700)
commit84f5d5a409fc02265669eff75f609c4ffb0901b5
tree30b674cec8250ca4f507ef51562f489d0ab2c499
parent3a04d60262d1d55bb1d788005eadded2d39af8d0
staging: rtlwifi: simplify logical operation

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: 871a90cd2a6a ("staging: r8822be: Add existing rtlwifi and rtl_pci parts for new driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/btcoexist/halbtc8822b1ant.c