From: Qingshuang Fu <fffsqian@163.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>,
Florian Westphal <fw@strlen.de>,
davem@davemloft.net, Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: netfilter-devel@vger.kernel.org, coreteam@netfilter.org,
netdev@vger.kernel.org, linux-kselftest@vger.kernel.org,
linux-kernel@vger.kernel.org,
Qingshuang Fu <fuqingshuang@kylinos.cn>,
Qingshuang Fu <fffsqian@163.com>
Subject: [PATCH] selftests: netfilter: Remove unused variables in conntrack_dump_flush
Date: Thu, 6 Aug 2026 15:50:52 +0800 [thread overview]
Message-ID: <20260806075052.1934904-1-fffsqian@163.com> (raw)
From: Qingshuang Fu <fuqingshuang@kylinos.cn>
The variables 'rplnlh' in conntrack_data_insert() and 'rplnlh' together
with 'nest' in conntracK_count_zone() and conntrack_flush_zone() were
declared but never used since they were introduced.
Similarly, commit 76342e842587 ("selftests: netfilter: remove unused
parameter") removed the unused 'err' variable from these functions but
overlooked the remaining unused 'rplnlh' and 'nest' variables. Remove
them to clean up the code.
Fixes: eff3c558bb7e ("netfilter: ctnetlink: support filtering by zone")
Signed-off-by: Qingshuang Fu <fuqingshuang@kylinos.cn>
---
.../testing/selftests/net/netfilter/conntrack_dump_flush.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
index 5cecb8a1bc94..c8e4794ec5cb 100644
--- a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
+++ b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
@@ -102,7 +102,6 @@ static int conntrack_data_insert(struct mnl_socket *sock, struct nlmsghdr *nlh,
uint16_t zone)
{
char buf[MNL_SOCKET_BUFFER_SIZE];
- struct nlmsghdr *rplnlh;
unsigned int portid;
int ret;
@@ -219,9 +218,8 @@ static int count_entries(const struct nlmsghdr *nlh, void *data)
static int conntracK_count_zone(struct mnl_socket *sock, uint16_t zone)
{
char buf[MNL_SOCKET_BUFFER_SIZE];
- struct nlmsghdr *nlh, *rplnlh;
+ struct nlmsghdr *nlh;
struct nfgenmsg *nfh;
- struct nlattr *nest;
unsigned int portid;
int ret;
@@ -266,9 +264,8 @@ static int conntracK_count_zone(struct mnl_socket *sock, uint16_t zone)
static int conntrack_flush_zone(struct mnl_socket *sock, uint16_t zone)
{
char buf[MNL_SOCKET_BUFFER_SIZE];
- struct nlmsghdr *nlh, *rplnlh;
+ struct nlmsghdr *nlh;
struct nfgenmsg *nfh;
- struct nlattr *nest;
unsigned int portid;
int ret;
base-commit: 0d839570765118029aa8bf4a95444c6a11aacf85
--
2.25.1
next reply other threads:[~2026-08-06 7:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-06 7:50 Qingshuang Fu [this message]
2026-08-06 8:45 ` Fernando Fernandez Mancera
2026-08-06 9:03 ` Fernando Fernandez Mancera
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=20260806075052.1934904-1-fffsqian@163.com \
--to=fffsqian@163.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=fuqingshuang@kylinos.cn \
--cc=fw@strlen.de \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pablo@netfilter.org \
--cc=shuah@kernel.org \
/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
all inboxes | Powered by JetHome®