* [PATCH net-next,RESEND] net/smc: make smc_hash_sk/smc_unhash_sk static
@ 2024-03-26 7:29 Zhengchao Shao
2024-03-27 14:32 ` Simon Horman
2024-03-29 9:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Zhengchao Shao @ 2024-03-26 7:29 UTC (permalink / raw)
To: netdev, linux-s390, davem, edumazet, kuba, pabeni
Cc: wenjia, jaka, alibuda, tonylu, guwen, weiyongjun1, yuehaibing,
shaozhengchao
smc_hash_sk and smc_unhash_sk are only used in af_smc.c, so make them
static and remove the output symbol. They can be called under the path
.prot->hash()/unhash().
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
---
include/net/smc.h | 3 ---
net/smc/af_smc.c | 6 ++----
2 files changed, 2 insertions(+), 7 deletions(-)
diff --git a/include/net/smc.h b/include/net/smc.h
index c9dcb30e3fd9..10684d0a33df 100644
--- a/include/net/smc.h
+++ b/include/net/smc.h
@@ -26,9 +26,6 @@ struct smc_hashinfo {
struct hlist_head ht;
};
-int smc_hash_sk(struct sock *sk);
-void smc_unhash_sk(struct sock *sk);
-
/* SMCD/ISM device driver interface */
struct smcd_dmb {
u64 dmb_tok;
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 4b52b3b159c0..e8dcd28a554c 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -177,7 +177,7 @@ static struct smc_hashinfo smc_v6_hashinfo = {
.lock = __RW_LOCK_UNLOCKED(smc_v6_hashinfo.lock),
};
-int smc_hash_sk(struct sock *sk)
+static int smc_hash_sk(struct sock *sk)
{
struct smc_hashinfo *h = sk->sk_prot->h.smc_hash;
struct hlist_head *head;
@@ -191,9 +191,8 @@ int smc_hash_sk(struct sock *sk)
return 0;
}
-EXPORT_SYMBOL_GPL(smc_hash_sk);
-void smc_unhash_sk(struct sock *sk)
+static void smc_unhash_sk(struct sock *sk)
{
struct smc_hashinfo *h = sk->sk_prot->h.smc_hash;
@@ -202,7 +201,6 @@ void smc_unhash_sk(struct sock *sk)
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, -1);
write_unlock_bh(&h->lock);
}
-EXPORT_SYMBOL_GPL(smc_unhash_sk);
/* This will be called before user really release sock_lock. So do the
* work which we didn't do because of user hold the sock_lock in the
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH net-next,RESEND] net/smc: make smc_hash_sk/smc_unhash_sk static
2024-03-26 7:29 [PATCH net-next,RESEND] net/smc: make smc_hash_sk/smc_unhash_sk static Zhengchao Shao
@ 2024-03-27 14:32 ` Simon Horman
2024-03-29 9:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Simon Horman @ 2024-03-27 14:32 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, linux-s390, davem, edumazet, kuba, pabeni, wenjia, jaka,
alibuda, tonylu, guwen, weiyongjun1, yuehaibing
On Tue, Mar 26, 2024 at 03:29:52PM +0800, Zhengchao Shao wrote:
> smc_hash_sk and smc_unhash_sk are only used in af_smc.c, so make them
> static and remove the output symbol. They can be called under the path
> .prot->hash()/unhash().
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next,RESEND] net/smc: make smc_hash_sk/smc_unhash_sk static
2024-03-26 7:29 [PATCH net-next,RESEND] net/smc: make smc_hash_sk/smc_unhash_sk static Zhengchao Shao
2024-03-27 14:32 ` Simon Horman
@ 2024-03-29 9:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-03-29 9:50 UTC (permalink / raw)
To: Zhengchao Shao
Cc: netdev, linux-s390, davem, edumazet, kuba, pabeni, wenjia, jaka,
alibuda, tonylu, guwen, weiyongjun1, yuehaibing
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 26 Mar 2024 15:29:52 +0800 you wrote:
> smc_hash_sk and smc_unhash_sk are only used in af_smc.c, so make them
> static and remove the output symbol. They can be called under the path
> .prot->hash()/unhash().
>
> Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
> Reviewed-by: Wen Gu <guwen@linux.alibaba.com>
>
> [...]
Here is the summary with links:
- [net-next,RESEND] net/smc: make smc_hash_sk/smc_unhash_sk static
https://git.kernel.org/netdev/net-next/c/af398bd0cb21
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-29 9:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-26 7:29 [PATCH net-next,RESEND] net/smc: make smc_hash_sk/smc_unhash_sk static Zhengchao Shao
2024-03-27 14:32 ` Simon Horman
2024-03-29 9:50 ` patchwork-bot+netdevbpf
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).