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 |
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 --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")) {
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(-)