* [PATCH] staging: ft1000: fix else style error
[not found] <ft1000else_style>
@ 2015-01-13 11:57 ` Bilel DRIRA
2015-01-13 16:01 ` Joe Perches
0 siblings, 1 reply; 3+ messages in thread
From: Bilel DRIRA @ 2015-01-13 11:57 UTC (permalink / raw)
To: marek.belisko, gregkh, joe, tapaswenipathak, gdonald, aybuke.147,
devel, linux-kernel
Cc: Bilel DRIRA
This patch fix the checkpatch.pl error:
ERROR: else should follow close brace '}'
Signed-off-by: Bilel DRIRA <bilel.dr@gmail.com>
---
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
index e9a37ee..cf0683f 100644
--- a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
+++ b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
@@ -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;
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: ft1000: fix else style error
2015-01-13 11:57 ` [PATCH] staging: ft1000: fix else style error Bilel DRIRA
@ 2015-01-13 16:01 ` Joe Perches
2015-01-13 21:21 ` bill
0 siblings, 1 reply; 3+ messages in thread
From: Joe Perches @ 2015-01-13 16:01 UTC (permalink / raw)
To: Bilel DRIRA
Cc: marek.belisko, gregkh, tapaswenipathak, gdonald, aybuke.147,
devel, linux-kernel
On Tue, 2015-01-13 at 12:57 +0100, Bilel DRIRA wrote:
> ERROR: else should follow close brace '}'
[]
> diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
[]
> @@ -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>;
}
> @@ -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...
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] staging: ft1000: fix else style error
2015-01-13 16:01 ` Joe Perches
@ 2015-01-13 21:21 ` bill
0 siblings, 0 replies; 3+ messages in thread
From: bill @ 2015-01-13 21:21 UTC (permalink / raw)
To: Joe Perches
Cc: Bilel DRIRA, marek.belisko, gregkh, tapaswenipathak, gdonald,
aybuke.147, devel, linux-kernel
On Tue, Jan 13, 2015 at 08:01:39AM -0800, Joe Perches wrote:
> On Tue, 2015-01-13 at 12:57 +0100, Bilel DRIRA wrote:
> > ERROR: else should follow close brace '}'
> []
> > diff --git a/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c b/drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c
> []
> > @@ -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>;
> }
>
> > @@ -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.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-13 21:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ft1000else_style>
2015-01-13 11:57 ` [PATCH] staging: ft1000: fix else style error Bilel DRIRA
2015-01-13 16:01 ` Joe Perches
2015-01-13 21:21 ` bill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox