Skip to contentSkip to conversation

Staging: dgnc: Removed necessary braces {}

PATCH Superseded Melike Yurtoglu 2 participants 2 messages Feb 19, 2015 Staging

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: dgnc: Removed necessary braces {}

The following patch fixes the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/dgnc/dgnc_tty.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +0 -4
index f81a375..9ae1656 100644
@@ -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
#1 lore raw

In the subject, it should be "removed unnecessary braces".

Also, the focus on braces is a bit misleading. Actually you are removing the complete else.

julia

Quoted 42 lines · Melike Yurtoglu

The following patch fixes the checkpatch.pl warning:
WARNING: braces {} are not necessary for single statement blocks

---
 drivers/staging/dgnc/dgnc_tty.c | 4 ----
 1 file changed, 4 deletions(-)
drivers/staging/dgnc/dgnc_tty.c +0 -5
index f81a375..9ae1656 100644
@@ -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. */
-		}
 	}
 }
 
--

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/1424336983-10853-1-git-send-email-aysemelikeyurtoglu%40gmail.com.
For more options, visit https://groups.google.com/d/optout.