staging: dgnc: Fixed braces {} are not necessary for single statement [email protected],
A message that is not in the archive (sent off-list or not yet received): [email protected]
Quoted 46 lines · Aparna
From
59e894efbd2fc3e85edab2e142f7193b6a238789Mon Sep 17 00:00:00 2001
From: Aparna Karuthodi <[email protected]>
Date: Sat, 6 Jun 2015 11:01:16 +0530
Subject: [PATCH 3/3] [PATCH] staging: dgnc: Fixed braces {} are not necessary
for single statement blocksRemoved the braces of if else statements which contain only one statement
Signed-off-by Aparna Karuthodi <[email protected]>--- drivers/staging/dgnc/dgnc_tty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/staging/dgnc/dgnc_tty.c +4
-4@@ -907,7 +907,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch)* 3) NONE - Do nothing. Since we didn't do anything to turn off the * other side, we don't need to do anything now. */ -if (qleft > (RQUEUESIZE /2 )) { +if (qleft > (RQUEUESIZE /2 ))/* HWFLOW */ if (ch->ch_digi.digi_flags &RTSPACE || ch->ch_c_cflag &CRTSCTS ) {if (ch->ch_flags &CH_RECEIVER_OFF ) {@@ -921,10 +921,10 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) ch->ch_bd->bd_ops->send_start_character (ch); }/* No FLOW */ -else { + else/* Nothing needed. */ - } - } + + }Signature · 4 lines
1.7.9.5 From 59e894efbd2fc3e85edab2e142f7193b6a238789 Mon Sep 17 00:00:00 2001
From: Aparna Karuthodi <[email protected]>
Date: Sat, 6 Jun 2015 11:01:16 +0530
Subject: [PATCH 3/3] [PATCH] staging: dgnc: Fixed braces {} are not necessary
for single statement blocks
Removed the braces of if else statements which contain only one statement
--- drivers/staging/dgnc/dgnc_tty.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +4 -4
@@ -907,7 +907,7 @@ void dgnc_check_queue_flow_control(struct channel_t *ch)* 3) NONE - Do nothing. Since we didn't do anything to turn off the * other side, we don't need to do anything now. */ -if (qleft > (RQUEUESIZE /2 )) { +if (qleft > (RQUEUESIZE /2 ))/* HWFLOW */ if (ch->ch_digi.digi_flags &RTSPACE || ch->ch_c_cflag &CRTSCTS ) {if (ch->ch_flags &CH_RECEIVER_OFF ) {
@@ -921,10 +921,10 @@ void dgnc_check_queue_flow_control(struct channel_t *ch) ch->ch_bd->bd_ops->send_start_character (ch); }/* No FLOW */ -else { + else/* Nothing needed. */ - } - } + + }
Signature · 1 line
1.7.9.5
Send the patch to yourself. Apply it with git am. Review the git log and then send it to the list.
But actually this change is not correct at all. The prefered style in staging is that multi-line indent blocks get curly braces for readability even when they are not required by the compiler. The patch introduces other coding style violations. Did you run checkpatch.pl over it?
regards,
dan carpenter