* [PATCH] Code cleanup - else is not generally useful after a break or return
@ 2015-07-01 15:55 Leung Timothy Chi King
2015-07-01 16:07 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Leung Timothy Chi King @ 2015-07-01 15:55 UTC (permalink / raw)
To: gregkh, fabio.falzoi84, joe, lambert.quentin, tinajohnson.1234
Cc: contact, devel, linux-kernel
Ran checkpatch.pl on driver/staging/rts5208/sd.c and foudn a WARNING
'else is not generally useful after a break or return' on line 3523. I
removed the else without affecting the logic and the WARNING is gone. I
had compiled and modprobe rts5208 to double check as well.
Regards,
Tim
Signed-off-by: Leung Timothy Chi King <contact@timothyleung.co>
---
drivers/staging/rts5208/sd.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/rts5208/sd.c b/drivers/staging/rts5208/sd.c
index a8d657b..cb41579 100644
--- a/drivers/staging/rts5208/sd.c
+++ b/drivers/staging/rts5208/sd.c
@@ -3520,12 +3520,11 @@ int reset_sd_card(struct rtsx_chip *chip)
if (chip->sd_io) {
rtsx_trace(chip);
return STATUS_FAIL;
- } else {
- retval = reset_mmc(chip);
- if (retval != STATUS_SUCCESS) {
- rtsx_trace(chip);
- return STATUS_FAIL;
- }
+ }
+ retval = reset_mmc(chip);
+ if (retval != STATUS_SUCCESS) {
+ rtsx_trace(chip);
+ return STATUS_FAIL;
}
}
}
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Code cleanup - else is not generally useful after a break or return
2015-07-01 15:55 [PATCH] Code cleanup - else is not generally useful after a break or return Leung Timothy Chi King
@ 2015-07-01 16:07 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2015-07-01 16:07 UTC (permalink / raw)
To: Leung Timothy Chi King
Cc: fabio.falzoi84, joe, lambert.quentin, tinajohnson.1234, devel,
linux-kernel
Your subject needs a hint as to what part of the kernel it is changing,
please fix that up to match what other patches have looked like for this
file.
On Wed, Jul 01, 2015 at 08:55:21AM -0700, Leung Timothy Chi King wrote:
> Ran checkpatch.pl on driver/staging/rts5208/sd.c and foudn a WARNING
> 'else is not generally useful after a break or return' on line 3523. I
> removed the else without affecting the logic and the WARNING is gone. I
> had compiled and modprobe rts5208 to double check as well.
That's good, but not needed here, please say why you did what you did,
but not in a narrative like you did.
>
> Regards,
> Tim
This isn't needed either.
Can you fix up and resend?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-07-01 16:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-01 15:55 [PATCH] Code cleanup - else is not generally useful after a break or return Leung Timothy Chi King
2015-07-01 16:07 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.