Staging: dgnc: Removed unnecessary braces
PATCH v2 1/1 Staging: dgnc: Removed unnecessary braces
The following patch fixes the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks
Signed-off-by Melike Yurtoglu <[email protected]>
---
v2:changed the subject
drivers/staging/dgnc/dgnc_tty.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +0 -4
@@ -887,9 +887,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) } }/* No FLOW */ -else {/* Empty... Can't do anything about the impending overflow... */ - } }/*
@@ -921,9 +919,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) ch->ch_bd->bd_ops->send_start_character (ch); }/* No FLOW */ -else {/* Nothing needed. */ - } } }
Signature · 1 line
1.8.3.2
Quoted 2 lines · Melike Yurtoglu
The following patch fixes the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks
I think it would be much clearer to say eg "remove empty else branch". In this case, if you remove the braces and leave the else, you have invalid code. Also, what is in the braces is not a statement, it is only comments. So the checkpatch message is overall more misleading than useful.
julia
Quoted 43 lines
Signed-off-by Melike Yurtoglu <[email protected]>---
v2:changed the subject
drivers/staging/dgnc/dgnc_tty.c | 4 ---- 1 file changed, 4 deletions(-)drivers/staging/dgnc/dgnc_tty.c +0
-4@@ -887,9 +887,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) } }/* No FLOW */ -else {/* Empty... Can't do anything about the impending overflow... */ - } }/* @@ -921,9 +919,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) ch->ch_bd->bd_ops->send_start_character (ch); }/* No FLOW */ -else {/* Nothing needed. */ - } } }Signature · 8 lines
1.8.3.2 -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/1424370082-14359-1-git-send-email-aysemelikeyurtoglu%40gmail.com. For more options, visit https://groups.google.com/d/optout.