[PATCH net-next v1 03/11] net: pktgen: fix code style (ERROR: else should follow close brace '}')

Peter Seiderer posted 11 patches 8 months, 1 week ago
There is a newer version of this series
[PATCH net-next v1 03/11] net: pktgen: fix code style (ERROR: else should follow close brace '}')
Posted by Peter Seiderer 8 months, 1 week ago
Fix checkpatch code style errors:

  ERROR: else should follow close brace '}'
  #1311: FILE: net/core/pktgen.c:1311:
  +               }
  +               else

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 net/core/pktgen.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index a54683d9d44a..50ed4eb792a8 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1307,8 +1307,7 @@ static ssize_t pktgen_if_write(struct file *file,
 				put_page(pkt_dev->page);
 				pkt_dev->page = NULL;
 			}
-		}
-		else
+		} else
 			sprintf(pg_result, "ERROR: node not possible");
 		return count;
 	}
-- 
2.49.0

Re: [PATCH net-next v1 03/11] net: pktgen: fix code style (ERROR: else should follow close brace '}')
Posted by Jakub Kicinski 8 months, 1 week ago
On Thu, 10 Apr 2025 09:17:40 +0200 Peter Seiderer wrote:
> -		}
> -		else
> +		} else
>  			sprintf(pg_result, "ERROR: node not possible");

While you touch this you should add brackets around the else