Skip to contentSkip to conversation

staging: hp100: braces {} are not necessary for single statement blocks

PATCH In review Gokce Kuler 2 participants 2 messages Mar 22, 2020 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: hp100: braces {} are not necessary for single statement blocks

Remove unnecessary braces for single statement block

---
 drivers/staging/hp/hp100.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/hp/hp100.c +2 -2
index 8aadb5b..1b957aa 100644
@@ -1332,9 +1332,9 @@ static void hp100_rxfill(struct net_device *dev)
 		   ** Attempt to get a buffer and build a Rx PDL.
 		 */
 		ringptr = lp->rxrtail;
-		if (0 == hp100_build_rx_pdl(ringptr, dev)) {
+		if (0 == hp100_build_rx_pdl(ringptr, dev)) 
 			return;	/* None available, return */
-		}
+		
 
 		/* Hand this PDL over to the card */
 		/* Note: This needs performance page selected! */
Signature · 1 line
2.7.4
#1 lore raw
Quoted 12 lines · Gokce Kuler

Remove unnecessary braces for single statement block

---
 drivers/staging/hp/hp100.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/hp/hp100.c +0 -0
index 8aadb5b..1b957aa 100644

drivers/staging/hp/hp100.c static void hp100_rxfill(struct net_device *dev) · line 1337

Quoted 8 lines
drivers/staging/hp/hp100.c +2 -2
@@ -1332,9 +1332,9 @@ static void hp100_rxfill(struct net_device *dev)
 		   ** Attempt to get a buffer and build a Rx PDL.
 		 */
 		ringptr = lp->rxrtail;
-		if (0 == hp100_build_rx_pdl(ringptr, dev)) {
+		if (0 == hp100_build_rx_pdl(ringptr, dev))
 			return;	/* None available, return */
-		}
+

There is no need to add a blank line here. Indeed there is a blank line already, so I would have thought that checkpatch would have complained. Do you run checkpatch on your patches?

julia

Quoted 11 lines
drivers/staging/hp/hp100.c +0 -1
 		/* Hand this PDL over to the card */
 		/* Note: This needs performance page selected! */
--

2.7.4

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/20200322012624.GA5040%40siyah2.