Removed unnecessary {} from conditional statements
PATCH 1/1 Removed unnecessary {} from conditional statements
This patch is to remove unnecessary braces from single line conditional statements to follow kernel coding conventions.
Signed-off-by Vatika Harlalka <[email protected]>
--- drivers/staging/rtl8188eu/hal/bb_cfg.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-)
drivers/staging/rtl8188eu/hal/bb_cfg.c +7 -8
@@ -554,21 +554,20 @@ static void store_pwrindex_offset(struct adapter *Adapter, u32 regaddr, u32 bitmstatic void rtl_addr_delay (struct adapter *adapt,u32 addr,u32 bit_mask,u32 data) { -if (addr ==0xfe ) { +if (addr ==0xfe )msleep (50 ); - }else if (addr ==0xfd ) { +else if (addr ==0xfd )mdelay (5 ); - }else if (addr ==0xfc ) { +else if (addr ==0xfc )mdelay (1 ); - }else if (addr ==0xfb ) { +else if (addr ==0xfb )udelay (50 ); - }else if (addr ==0xfa ) { +else if (addr ==0xfa )udelay (5 ); - }else if (addr ==0xf9 ) { +else if (addr ==0xf9 )udelay (1 ); - }else { +else store_pwrindex_offset (adapt, addr, bit_mask, data); - } }static bool config_bb_with_pgheader (struct adapter *adapt)
Signature · 1 line
1.9.1
Quoted 15 lines · On Sunday 22 February 2015 15:58:30 Vatika Harlalka wrote:
static void
rtl_addr_delay(struct adapter *adapt, u32 addr, u32 bit_mask, u32 data){drivers/staging/rtl8188eu/hal/bb_cfg.c +4
-4-if (addr ==0xfe ) { +if (addr ==0xfe )msleep (50 ); - }else if (addr ==0xfd ) { +else if (addr ==0xfd )mdelay (5 ); - }else if (addr ==0xfc ) { +else if (addr ==0xfc )mdelay (1 ); - }else if (addr ==0xfb ) { +else if (addr ==0xfb )udelay (50 );
drivers/staging/rtl8188eu/hal/bb_cfg.c static void store_pwrindex_offset(struct adapter *Adapter, u32 regaddr, u32 bitm · line 571
Quoted 10 lines
drivers/staging/rtl8188eu/hal/bb_cfg.c +3
-4- }else if (addr ==0xfa ) { +else if (addr ==0xfa )udelay (5 ); - }else if (addr ==0xf9 ) { +else if (addr ==0xf9 )udelay (1 ); - }else { +else store_pwrindex_offset (adapt, addr, bit_mask, data); - }
Maybe use switch()/case instead?
Arnd