From b99e0ce20fc0aec6169ecc8a7067dcdf8f20c1ec Mon Sep 17 00:00:00 2001 From: Nathan Chancellor Date: Wed, 3 Oct 2018 18:21:25 -0700 Subject: [PATCH] staging: rtlwifi: Remove unnecessary parentheses 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 Signed-off-by: Greg Kroah-Hartman --- drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c b/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c index 42020101380a..d6cea73fa185 100644 --- a/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c +++ b/drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c @@ -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];