mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH mptcp-next] Squash to "mptcp: remote addresses fullmesh"
@ 2021-08-04  7:37 Matthieu Baerts
  2021-08-04 11:31 ` Geliang Tang
  0 siblings, 1 reply; 3+ messages in thread
From: Matthieu Baerts @ 2021-08-04  7:37 UTC (permalink / raw)
  To: mptcp; +Cc: Matthieu Baerts, Jenkins Tessares, kernel test robot

This fixes 'unused-but-set-variable' warning.

Jenkins Tessares reported [1] this error:

  net/mptcp/pm_netlink.c: In function 'fill_remote_addresses_vec':
  net/mptcp/pm_netlink.c:435:23: error: variable 'pernet' set but not  used [-Werror=unused-but-set-variable]
    435 |  struct pm_nl_pernet *pernet;
        |                       ^~~~~~
  cc1: all warnings being treated as errors

Indeed, this variable is defined and set but not used. We can remove it.

[1] https://github.com/multipath-tcp/mptcp_net-next/actions/runs/1096568275

Reported-by: Jenkins Tessares <kernel-dev@tessares.net>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
---

Notes:
    to be squashed in "mptcp: remote addresses fullmesh"

 net/mptcp/pm_netlink.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
index cbef50fff6e8..29ff454411b1 100644
--- a/net/mptcp/pm_netlink.c
+++ b/net/mptcp/pm_netlink.c
@@ -432,11 +432,9 @@ static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk, bool fullm
 	struct sock *sk = (struct sock *)msk, *ssk;
 	struct mptcp_subflow_context *subflow;
 	struct mptcp_addr_info remote = { 0 };
-	struct pm_nl_pernet *pernet;
 	unsigned int subflows_max;
 	int i = 0;
 
-	pernet = net_generic(sock_net(sk), pm_nl_pernet_id);
 	subflows_max = mptcp_pm_get_subflows_max(msk);
 
 	/* Non-fullmesh endpoint, fill in the single entry
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH mptcp-next] Squash to "mptcp: remote addresses fullmesh"
  2021-08-04  7:37 [PATCH mptcp-next] Squash to "mptcp: remote addresses fullmesh" Matthieu Baerts
@ 2021-08-04 11:31 ` Geliang Tang
  2021-08-04 13:06   ` Matthieu Baerts
  0 siblings, 1 reply; 3+ messages in thread
From: Geliang Tang @ 2021-08-04 11:31 UTC (permalink / raw)
  To: Matthieu Baerts; +Cc: mptcp, Jenkins Tessares, kernel test robot

Hi Matt,

Thanks for fixing this.

Acked-by: Geliang Tang <geliangtang@xiaomi.com>

-Geliang

Matthieu Baerts <matthieu.baerts@tessares.net> 于2021年8月4日周三 下午3:37写道:
>
> This fixes 'unused-but-set-variable' warning.
>
> Jenkins Tessares reported [1] this error:
>
>   net/mptcp/pm_netlink.c: In function 'fill_remote_addresses_vec':
>   net/mptcp/pm_netlink.c:435:23: error: variable 'pernet' set but not  used [-Werror=unused-but-set-variable]
>     435 |  struct pm_nl_pernet *pernet;
>         |                       ^~~~~~
>   cc1: all warnings being treated as errors
>
> Indeed, this variable is defined and set but not used. We can remove it.
>
> [1] https://github.com/multipath-tcp/mptcp_net-next/actions/runs/1096568275
>
> Reported-by: Jenkins Tessares <kernel-dev@tessares.net>
> Reported-by: kernel test robot <lkp@intel.com>
> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
> ---
>
> Notes:
>     to be squashed in "mptcp: remote addresses fullmesh"
>
>  net/mptcp/pm_netlink.c | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/net/mptcp/pm_netlink.c b/net/mptcp/pm_netlink.c
> index cbef50fff6e8..29ff454411b1 100644
> --- a/net/mptcp/pm_netlink.c
> +++ b/net/mptcp/pm_netlink.c
> @@ -432,11 +432,9 @@ static unsigned int fill_remote_addresses_vec(struct mptcp_sock *msk, bool fullm
>         struct sock *sk = (struct sock *)msk, *ssk;
>         struct mptcp_subflow_context *subflow;
>         struct mptcp_addr_info remote = { 0 };
> -       struct pm_nl_pernet *pernet;
>         unsigned int subflows_max;
>         int i = 0;
>
> -       pernet = net_generic(sock_net(sk), pm_nl_pernet_id);
>         subflows_max = mptcp_pm_get_subflows_max(msk);
>
>         /* Non-fullmesh endpoint, fill in the single entry
> --
> 2.31.1
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH mptcp-next] Squash to "mptcp: remote addresses fullmesh"
  2021-08-04 11:31 ` Geliang Tang
@ 2021-08-04 13:06   ` Matthieu Baerts
  0 siblings, 0 replies; 3+ messages in thread
From: Matthieu Baerts @ 2021-08-04 13:06 UTC (permalink / raw)
  To: Geliang Tang; +Cc: mptcp, Jenkins Tessares, kernel test robot

Hi Geliang,

On 04/08/2021 13:31, Geliang Tang wrote:
> Hi Matt,
> 
> Thanks for fixing this.
> 
> Acked-by: Geliang Tang <geliangtang@xiaomi.com>

Thank you for the review!

Now in our tree:

- 40ca9c61f1b1: "squashed" in "mptcp: remote addresses fullmesh"
- (no co-dev for that, it was reported by CIs)
- Results: d2d5ed438884..90dec655986b

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-04 13:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-04  7:37 [PATCH mptcp-next] Squash to "mptcp: remote addresses fullmesh" Matthieu Baerts
2021-08-04 11:31 ` Geliang Tang
2021-08-04 13:06   ` Matthieu Baerts

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).