* Re: [PATCH -next 1/2] net/ipv4: fix macro definition sk_for_each_bound_bhash
2024-08-23 7:00 [PATCH -next 1/2] net/ipv4: fix macro definition sk_for_each_bound_bhash Hongbo Li
@ 2024-08-23 6:54 ` Hongbo Li
2024-08-23 16:27 ` Simon Horman
1 sibling, 0 replies; 3+ messages in thread
From: Hongbo Li @ 2024-08-23 6:54 UTC (permalink / raw)
To: edumazet, davem, dsahern, kuba, pabeni; +Cc: netdev
Sorry, wrong subject, just ignore this.
Thanks,
Hongbo
On 2024/8/23 15:00, Hongbo Li wrote:
> The macro sk_for_each_bound_bhash accepts a parameter
> __sk, but it was not used, rather the sk2 is directly
> used, so we replace the sk2 with __sk in macro.
>
> Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
> ---
> net/ipv4/inet_connection_sock.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
> index 64d07b842e73..ce4d77f49243 100644
> --- a/net/ipv4/inet_connection_sock.c
> +++ b/net/ipv4/inet_connection_sock.c
> @@ -236,7 +236,7 @@ static bool inet_bhash2_conflict(const struct sock *sk,
>
> #define sk_for_each_bound_bhash(__sk, __tb2, __tb) \
> hlist_for_each_entry(__tb2, &(__tb)->bhash2, bhash_node) \
> - sk_for_each_bound(sk2, &(__tb2)->owners)
> + sk_for_each_bound((__sk), &(__tb2)->owners)
>
> /* This should be called only when the tb and tb2 hashbuckets' locks are held */
> static int inet_csk_bind_conflict(const struct sock *sk,
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH -next 1/2] net/ipv4: fix macro definition sk_for_each_bound_bhash
@ 2024-08-23 7:00 Hongbo Li
2024-08-23 6:54 ` Hongbo Li
2024-08-23 16:27 ` Simon Horman
0 siblings, 2 replies; 3+ messages in thread
From: Hongbo Li @ 2024-08-23 7:00 UTC (permalink / raw)
To: edumazet, davem, dsahern, kuba, pabeni; +Cc: lihongbo22, netdev
The macro sk_for_each_bound_bhash accepts a parameter
__sk, but it was not used, rather the sk2 is directly
used, so we replace the sk2 with __sk in macro.
Signed-off-by: Hongbo Li <lihongbo22@huawei.com>
---
net/ipv4/inet_connection_sock.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index 64d07b842e73..ce4d77f49243 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -236,7 +236,7 @@ static bool inet_bhash2_conflict(const struct sock *sk,
#define sk_for_each_bound_bhash(__sk, __tb2, __tb) \
hlist_for_each_entry(__tb2, &(__tb)->bhash2, bhash_node) \
- sk_for_each_bound(sk2, &(__tb2)->owners)
+ sk_for_each_bound((__sk), &(__tb2)->owners)
/* This should be called only when the tb and tb2 hashbuckets' locks are held */
static int inet_csk_bind_conflict(const struct sock *sk,
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH -next 1/2] net/ipv4: fix macro definition sk_for_each_bound_bhash
2024-08-23 7:00 [PATCH -next 1/2] net/ipv4: fix macro definition sk_for_each_bound_bhash Hongbo Li
2024-08-23 6:54 ` Hongbo Li
@ 2024-08-23 16:27 ` Simon Horman
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-08-23 16:27 UTC (permalink / raw)
To: Hongbo Li; +Cc: edumazet, davem, dsahern, kuba, pabeni, netdev
On Fri, Aug 23, 2024 at 03:00:42PM +0800, Hongbo Li wrote:
> The macro sk_for_each_bound_bhash accepts a parameter
> __sk, but it was not used, rather the sk2 is directly
> used, so we replace the sk2 with __sk in macro.
Thanks.
I checked and there is only one user of this macro,
a little further down in the same file in inet_csk_bind_conflict().
It's usage matches the change you have made - it passes sk2 as __sk.
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-23 16:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-23 7:00 [PATCH -next 1/2] net/ipv4: fix macro definition sk_for_each_bound_bhash Hongbo Li
2024-08-23 6:54 ` Hongbo Li
2024-08-23 16:27 ` Simon Horman
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).