staging: rtlwifi: Replace 1 with true and remove comparison for bool
authorMaya Nakamura <m.maya.nakamura@gmail.com>
Thu, 1 Nov 2018 04:04:48 +0000 (21:04 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Nov 2018 13:53:58 +0000 (14:53 +0100)
Replace 1 with true for bool assignments and remove a comparison of a bool
with 1. Issues found by Coccinelle's semantic patch results for
boolinit.cocci.

Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtlwifi/phydm/phydm_adc_sampling.c
drivers/staging/rtlwifi/phydm/phydm_ccx.c

index d6cea73fa1854bbebb5f00e6a63ae3e8c8f9fffe..7853031ee91f37682bc0c4a49271e40b8cff433e 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) {
                        PHYDM_SSCANF(input[2], DCMD_DECIMAL, &var1[1]);
 
                        trig_mode = (u8)var1[1];
index 57138606d9be88f38abc95949be800d244eb454e..f292b23a2db1faebb87738870ace54840bca1897 100644 (file)
@@ -338,7 +338,7 @@ bool phydm_check_nhm_ready(void *dm_void)
                        ODM_delay_ms(1);
                        if (odm_get_bb_reg(dm, ODM_REG_NHM_DUR_READY_11AC,
                                           BIT(17))) {
-                               ret = 1;
+                               ret = true;
                                break;
                        }
                }
@@ -351,7 +351,7 @@ bool phydm_check_nhm_ready(void *dm_void)
                        ODM_delay_ms(1);
                        if (odm_get_bb_reg(dm, ODM_REG_NHM_DUR_READY_11AC,
                                           BIT(17))) {
-                               ret = 1;
+                               ret = true;
                                break;
                        }
                }