diff mbox series

selftests: netfilter: remove unused rplnlh parameter

Message ID 20241017072534.127519-1-liujing@cmss.chinamobile.com (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series selftests: netfilter: remove unused rplnlh parameter | expand

Checks

Context Check Description
netdev/series_format warning Single patches do not need cover letters; Target tree name not specified in the subject
netdev/tree_selection success Guessed tree name to be 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: 5 this patch: 5
netdev/build_tools success Errors and warnings before: 0 (+1) this patch: 0 (+1)
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 3 this patch: 3
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: 3 this patch: 3
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 23 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 success net-next-2024-10-19--00-00 (tests: 777)

Commit Message

liujing Oct. 17, 2024, 7:25 a.m. UTC
The rplnlh parameter is not used in many functions, so delete it.

Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
---
 tools/testing/selftests/net/netfilter/conntrack_dump_flush.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Antoine Tenart Oct. 18, 2024, 12:29 p.m. UTC | #1
Quoting Liu Jing (2024-10-17 09:25:34)
> The rplnlh parameter is not used in many functions, so delete it.
> 
> Signed-off-by: Liu Jing <liujing@cmss.chinamobile.com>
> ---
>  tools/testing/selftests/net/netfilter/conntrack_dump_flush.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
> index bd9317bf5ada..e03ddc60b5d4 100644
> --- a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
> +++ b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
> @@ -96,7 +96,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 err, ret;

While at it, it seems 'err' is not used as well. In the two other
functions as well.

Thanks!
Antoine

> @@ -212,7 +211,7 @@ 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;
> @@ -259,7 +258,7 @@ 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;
diff mbox series

Patch

diff --git a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
index bd9317bf5ada..e03ddc60b5d4 100644
--- a/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
+++ b/tools/testing/selftests/net/netfilter/conntrack_dump_flush.c
@@ -96,7 +96,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 err, ret;
 
@@ -212,7 +211,7 @@  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;
@@ -259,7 +258,7 @@  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;