From: Peter Seiderer <ps.report@gmx.net>
To: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
"David S . Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>,
"Simon Horman" <horms@kernel.org>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
"Peter Seiderer" <ps.report@gmx.net>
Subject: [PATCH net-next v2 1/3] net: pktgen: fix code style (ERROR: else should follow close brace '}')
Date: Tue, 15 Apr 2025 13:29:14 +0200 [thread overview]
Message-ID: <20250415112916.113455-2-ps.report@gmx.net> (raw)
In-Reply-To: <20250415112916.113455-1-ps.report@gmx.net>
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(-)
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")) {
--
2.49.0
next prev parent reply other threads:[~2025-04-15 11:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-15 11:29 [PATCH net-next v2 0/3] net: pktgen: fix checkpatch code style errors/warnings Peter Seiderer
2025-04-15 11:29 ` Peter Seiderer [this message]
2025-04-16 17:18 ` [PATCH net-next v2 1/3] net: pktgen: fix code style (ERROR: else should follow close brace '}') Simon Horman
2025-04-15 11:29 ` [PATCH net-next v2 2/3] net: pktgen: fix code style (WARNING: please, no space before tabs) Peter Seiderer
2025-04-16 17:18 ` Simon Horman
2025-04-15 11:29 ` [PATCH net-next v2 3/3] net: pktgen: fix code style (WARNING: Prefer strscpy over strcpy) Peter Seiderer
2025-04-16 17:18 ` Simon Horman
2025-04-17 11:20 ` [PATCH net-next v2 0/3] net: pktgen: fix checkpatch code style errors/warnings patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250415112916.113455-2-ps.report@gmx.net \
--to=ps.report@gmx.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=toke@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).