]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
staging: rtlwifi: Remove unnecessary parentheses
authorNathan Chancellor <natechancellor@gmail.com>
Thu, 4 Oct 2018 01:21:25 +0000 (18:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 9 Oct 2018 13:13:24 +0000 (15:13 +0200)
Clang warns when multiple pairs of parentheses are used for a single
conditional statement.

drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: warning:
equality comparison with extraneous parentheses [-Wparentheses-equality]
                } else if ((is_enable_la_mode == 1)) {
                            ~~~~~~~~~~~~~~~~~~^~~~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: remove
extraneous parentheses around the comparison to silence this warning
                } else if ((is_enable_la_mode == 1)) {
                           ~                  ^   ~
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c:558:33: note: use '='
to turn this equality comparison into an assignment
                } else if ((is_enable_la_mode == 1)) {
                                              ^~
                                              =
1 warning generated.

Link: https://github.com/ClangBuiltLinux/linux/issues/172
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c

index 42020101380af38738f919c31e8de5aaad40fe7e..d6cea73fa1854bbebb5f00e6a63ae3e8c8f9fffe 100644 (file)
@@ -555,7 +555,7 @@ void phydm_lamode_trigger_setting(void *dm_void, char input[][16], u32 *_used,
                                output + used, out_len - used,
                                "{En} {0:BB,1:BB_MAC,2:RF0,3:RF1,4:MAC}\n {BB:dbg_port[bit],BB_MAC:0-ok/1-fail/2-cca,MAC:ref} {DMA type} {TrigTime}\n {polling_time/ref_mask} {dbg_port} {0:P_Edge, 1:N_Edge} {SpRate:0-80M,1-40M,2-20M} {Capture num}\n");
                        /**/
-               } else if ((is_enable_la_mode == 1)) {
+               } else if (is_enable_la_mode == 1) {
                        PHYDM_SSCANF(input[2], DCMD_DECIMAL, &var1[1]);
 
                        trig_mode = (u8)var1[1];