* [PATCH] Staging: wilc1000: Remove unnecessary else after return
@ 2016-02-19 13:18 Dilek Uzulmez
2016-02-20 1:07 ` [Outreachy kernel] " Greg KH
2016-02-20 3:45 ` Julia Lawall
0 siblings, 2 replies; 3+ messages in thread
From: Dilek Uzulmez @ 2016-02-19 13:18 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Dilek Uzulmez
This patch fixes checkpatch.pl warning in files of wilc1000
WARNING: else is not generally useful after a break or return
Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
---
drivers/staging/wilc1000/coreconfigurator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
index 544c12d..b0cefe1 100644
--- a/drivers/staging/wilc1000/coreconfigurator.c
+++ b/drivers/staging/wilc1000/coreconfigurator.c
@@ -939,9 +939,9 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
gpstrWlanOps->wlan_cfg_get == NULL) {
PRINT_D(CORECONFIG_DBG, "Set and Get is still not initialized\n");
return 1;
- } else {
- PRINT_D(CORECONFIG_DBG, "SET is initialized\n");
}
+ PRINT_D(CORECONFIG_DBG, "SET is initialized\n");
+
if (u8Mode == GET_CFG) {
for (counter = 0; counter < u32WIDsCount; counter++) {
PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: wilc1000: Remove unnecessary else after return
2016-02-19 13:18 [PATCH] Staging: wilc1000: Remove unnecessary else after return Dilek Uzulmez
@ 2016-02-20 1:07 ` Greg KH
2016-02-20 3:45 ` Julia Lawall
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2016-02-20 1:07 UTC (permalink / raw)
To: Dilek Uzulmez; +Cc: outreachy-kernel
On Fri, Feb 19, 2016 at 03:18:25PM +0200, Dilek Uzulmez wrote:
> This patch fixes checkpatch.pl warning in files of wilc1000
> WARNING: else is not generally useful after a break or return
>
> Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
> ---
> drivers/staging/wilc1000/coreconfigurator.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
> index 544c12d..b0cefe1 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -939,9 +939,9 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
> gpstrWlanOps->wlan_cfg_get == NULL) {
> PRINT_D(CORECONFIG_DBG, "Set and Get is still not initialized\n");
> return 1;
> - } else {
> - PRINT_D(CORECONFIG_DBG, "SET is initialized\n");
> }
> + PRINT_D(CORECONFIG_DBG, "SET is initialized\n");
> +
Does that indentation look correct to you? It doesn't to me...
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Outreachy kernel] [PATCH] Staging: wilc1000: Remove unnecessary else after return
2016-02-19 13:18 [PATCH] Staging: wilc1000: Remove unnecessary else after return Dilek Uzulmez
2016-02-20 1:07 ` [Outreachy kernel] " Greg KH
@ 2016-02-20 3:45 ` Julia Lawall
1 sibling, 0 replies; 3+ messages in thread
From: Julia Lawall @ 2016-02-20 3:45 UTC (permalink / raw)
To: Dilek Uzulmez; +Cc: outreachy-kernel
On Fri, 19 Feb 2016, Dilek Uzulmez wrote:
> This patch fixes checkpatch.pl warning in files of wilc1000
> WARNING: else is not generally useful after a break or return
>
> Signed-off-by: Dilek Uzulmez <dilekuzulmez@gmail.com>
> ---
> drivers/staging/wilc1000/coreconfigurator.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/wilc1000/coreconfigurator.c b/drivers/staging/wilc1000/coreconfigurator.c
> index 544c12d..b0cefe1 100644
> --- a/drivers/staging/wilc1000/coreconfigurator.c
> +++ b/drivers/staging/wilc1000/coreconfigurator.c
> @@ -939,9 +939,9 @@ s32 SendConfigPkt(u8 u8Mode, tstrWID *pstrWIDs,
> gpstrWlanOps->wlan_cfg_get == NULL) {
> PRINT_D(CORECONFIG_DBG, "Set and Get is still not initialized\n");
> return 1;
> - } else {
> - PRINT_D(CORECONFIG_DBG, "SET is initialized\n");
> }
> + PRINT_D(CORECONFIG_DBG, "SET is initialized\n");
> +
If you drop the else, the PRINT_D should be less indented. Also there is
probably no need for a blank line.
julia
> if (u8Mode == GET_CFG) {
> for (counter = 0; counter < u32WIDsCount; counter++) {
> PRINT_INFO(CORECONFIG_DBG, "Sending CFG packet [%d][%d]\n", !counter,
> --
> 1.9.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To post to this group, send email to outreachy-kernel@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1455887905-7002-1-git-send-email-dilekuzulmez%40gmail.com.
> For more options, visit https://groups.google.com/d/optout.
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-02-20 3:46 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-19 13:18 [PATCH] Staging: wilc1000: Remove unnecessary else after return Dilek Uzulmez
2016-02-20 1:07 ` [Outreachy kernel] " Greg KH
2016-02-20 3:45 ` Julia Lawall
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.