diff mbox series

[net-next,v2,1/3] net: pktgen: fix code style (ERROR: else should follow close brace '}')

Message ID 20250415112916.113455-2-ps.report@gmx.net (mailing list archive)
State Accepted
Commit 3bc1ca7e173c10dab03b17d5e8ce9df390721288
Delegated to: Netdev Maintainers
Headers show
Series net: pktgen: fix checkpatch code style errors/warnings | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1 this patch: 1
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 6 of 6 maintainers
netdev/build_clang success Errors and warnings before: 2 this patch: 2
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 2 this patch: 2
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest warning net-next-2025-04-16--09-00 (tests: 795)

Commit Message

Peter Seiderer April 15, 2025, 11:29 a.m. UTC
Fix checkpatch code style errors:

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

And checkpatch follow up code style check:

  CHECK: Unbalanced braces around else statement
  #1316: FILE: net/core/pktgen.c:1316:
  +               } else

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
Changes v1 -> v2:
  - Additional add braces around the else statement (as suggested by a follow
    up checkpatch run and by Jakub Kicinski from code review).
---
 net/core/pktgen.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Simon Horman April 16, 2025, 5:18 p.m. UTC | #1
On Tue, Apr 15, 2025 at 01:29:14PM +0200, Peter Seiderer wrote:
> Fix checkpatch code style errors:
> 
>   ERROR: else should follow close brace '}'
>   #1317: FILE: net/core/pktgen.c:1317:
>   +               }
>   +               else
> 
> And checkpatch follow up code style check:
> 
>   CHECK: Unbalanced braces around else statement
>   #1316: FILE: net/core/pktgen.c:1316:
>   +               } else
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
> Changes v1 -> v2:
>   - Additional add braces around the else statement (as suggested by a follow
>     up checkpatch run and by Jakub Kicinski from code review).

Reviewed-by: Simon Horman <horms@kernel.org>
diff mbox series

Patch

diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index fa30ff0f2464..21206a567843 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -1313,9 +1313,9 @@  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;
 	}
 	if (!strcmp(name, "xmit_mode")) {