staging: ft1000: fix else style error
PATCH 1/1 staging: ft1000: fix else style error
In reply to a message not in the archiveThis patch fix the checkpatch.pl error:
ERROR: else should follow close brace '}'
--- drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-)
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +5 -10
@@ -572,8 +572,7 @@ static void ft1000_hbchk(u_long data)if (tempword != ho) {if (info->AsicID ==ELECTRABUZZ_ID ) { tempword =ft1000_read_dpram (dev,FT1000_HI_HO ); - } -else { + }else { tempword =ntohs (ft1000_read_dpram_mag_16 (dev,FT1000_MAG_HI_HO ,FT1000_MAG_HI_HO_INDX )); } }
@@ -688,15 +687,13 @@ static void ft1000_hbchk(u_long data)if (tempword != hi) {if (info->AsicID ==ELECTRABUZZ_ID ) {ft1000_write_dpram (dev,FT1000_HI_HO , hi); - } -else { + }else {ft1000_write_dpram_mag_16 (dev,FT1000_MAG_HI_HO , hi_mag,FT1000_MAG_HI_HO_INDX ); }if (info->AsicID ==ELECTRABUZZ_ID ) { tempword =ft1000_read_dpram (dev,FT1000_HI_HO ); - } -else { + }else { tempword =ntohs (ft1000_read_dpram_mag_16 (dev,FT1000_MAG_HI_HO ,FT1000_MAG_HI_HO_INDX )); }
@@ -959,8 +956,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev)if (info->AsicID ==ELECTRABUZZ_ID ) { tempword =FT1000_DPRAM_RX_BASE +2 ; - } -else { + }else { tempword =FT1000_DPRAM_MAG_RX_BASE ; }if (ft1000_receive_cmd (dev, &cmdbuffer[0 ],MAX_CMD_SQSIZE , &tempword)) {
@@ -1039,8 +1035,7 @@ static void ft1000_proc_drvmsg(struct net_device *dev) info->ConTm =0 ; } } - } -else { + }else {pr_debug ("Media is down\n" );if (info->mediastate ==1 ) { info->mediastate =0 ;
Signature · 1 line
1.7.9.5
Quoted 1 line · Bilel DRIRA
ERROR: else should follow close brace '}'
[]
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
Quoted 1 line
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +0
-0
[]
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c static void ft1000_hbchk(u_long data) · line 578
Quoted 10 lines
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +1
-2@@ -572,8 +572,7 @@ static void ft1000_hbchk(u_long data)if (tempword != ho) {if (info->AsicID ==ELECTRABUZZ_ID ) { tempword =ft1000_read_dpram (dev,FT1000_HI_HO ); - } -else { + }else { tempword =ntohs (ft1000_read_dpram_mag_16 (dev,FT1000_MAG_HI_HO ,FT1000_MAG_HI_HO_INDX )); } }
True, but you could instead remove all the braces
around both arms from all uses of
if (test) {
<single statement>;
} else {
<single statement>;
}drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c static void ft1000_hbchk(u_long data) · line 692
Quoted 9 lines
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +1
-2@@ -688,15 +687,13 @@ static void ft1000_hbchk(u_long data)if (tempword != hi) {if (info->AsicID ==ELECTRABUZZ_ID ) {ft1000_write_dpram (dev,FT1000_HI_HO , hi); - } -else { + }else {ft1000_write_dpram_mag_16 (dev,FT1000_MAG_HI_HO , hi_mag,FT1000_MAG_HI_HO_INDX ); }
etc...
Quoted 25 lines · Joe Perches
Quoted 1 line · Bilel DRIRA
ERROR: else should follow close brace '}'
[]
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
Quoted 1 line
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +0
-0[]
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c static void ft1000_hbchk(u_long data) · line 578
Quoted 10 lines
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +1
-2@@ -572,8 +572,7 @@ static void ft1000_hbchk(u_long data)if (tempword != ho) {if (info->AsicID ==ELECTRABUZZ_ID ) { tempword =ft1000_read_dpram (dev,FT1000_HI_HO ); - } -else { + }else { tempword =ntohs (ft1000_read_dpram_mag_16 (dev,FT1000_MAG_HI_HO ,FT1000_MAG_HI_HO_INDX )); } }True, but you could instead remove all the braces
around both arms from all uses ofif (test) { <single statement>; } else { <single statement>; }
Quoted 13 lines
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c static void ft1000_hbchk(u_long data) · line 692
Quoted 9 lines
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c +1
-2@@ -688,15 +687,13 @@ static void ft1000_hbchk(u_long data)if (tempword != hi) {if (info->AsicID ==ELECTRABUZZ_ID ) {ft1000_write_dpram (dev,FT1000_HI_HO , hi); - } -else { + }else {ft1000_write_dpram_mag_16 (dev,FT1000_MAG_HI_HO , hi_mag,FT1000_MAG_HI_HO_INDX ); }etc...
Hi Joe,
Of course, you are right. I will do that and resend the patch.
Thanks.