* [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init()
@ 2025-10-23 15:06 Alexandra Winter
2025-10-23 15:06 ` [PATCH net-next 2/2] dibs: Use subsys_initcall() Alexandra Winter
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Alexandra Winter @ 2025-10-23 15:06 UTC (permalink / raw)
To: Julian Ruess, Mete Durlu, D. Wythe, Dust Li, Sidraya Jayagond,
Wenjia Zhang, David Miller, Jakub Kicinski, Paolo Abeni,
Eric Dumazet, Andrew Lunn
Cc: Mahanta Jambigi, Tony Lu, Wen Gu, linux-rdma, netdev, linux-s390,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Simon Horman
'clients' and 'max_client' are static variables and therefore don't need to
be initialized.
Reported-by: Mete Durlu <meted@linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
---
drivers/dibs/dibs_main.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/dibs/dibs_main.c b/drivers/dibs/dibs_main.c
index 0374f8350ff7..b015578b4d2e 100644
--- a/drivers/dibs/dibs_main.c
+++ b/drivers/dibs/dibs_main.c
@@ -254,9 +254,6 @@ static int __init dibs_init(void)
{
int rc;
- memset(clients, 0, sizeof(clients));
- max_client = 0;
-
dibs_class = class_create("dibs");
if (IS_ERR(dibs_class))
return PTR_ERR(dibs_class);
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH net-next 2/2] dibs: Use subsys_initcall()
2025-10-23 15:06 [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexandra Winter
@ 2025-10-23 15:06 ` Alexandra Winter
2025-10-23 15:18 ` Alexander Lobakin
2025-10-23 15:16 ` [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexander Lobakin
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Alexandra Winter @ 2025-10-23 15:06 UTC (permalink / raw)
To: Julian Ruess, Mete Durlu, D. Wythe, Dust Li, Sidraya Jayagond,
Wenjia Zhang, David Miller, Jakub Kicinski, Paolo Abeni,
Eric Dumazet, Andrew Lunn
Cc: Mahanta Jambigi, Tony Lu, Wen Gu, linux-rdma, netdev, linux-s390,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Simon Horman
In the case of built-in modules, the order of module_init() calls are
derived from the Makefiles.
Use subsys_initcall() for the dibs module, to make sure dibs_init() is
executed before dibs clients like smc and dibs devices like ism are
initialized. So future dibs client or dibs device modules can use
module_init() without the risk of getting the order in the Makefiles wrong.
Reported-by: Mete Durlu <meted@linux.ibm.com>
Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
---
drivers/dibs/dibs_main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dibs/dibs_main.c b/drivers/dibs/dibs_main.c
index b015578b4d2e..dac14d843af7 100644
--- a/drivers/dibs/dibs_main.c
+++ b/drivers/dibs/dibs_main.c
@@ -271,5 +271,5 @@ static void __exit dibs_exit(void)
class_destroy(dibs_class);
}
-module_init(dibs_init);
+subsys_initcall(dibs_init);
module_exit(dibs_exit);
--
2.48.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init()
2025-10-23 15:06 [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexandra Winter
2025-10-23 15:06 ` [PATCH net-next 2/2] dibs: Use subsys_initcall() Alexandra Winter
@ 2025-10-23 15:16 ` Alexander Lobakin
2025-10-24 2:26 ` Dust Li
2025-10-28 12:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 7+ messages in thread
From: Alexander Lobakin @ 2025-10-23 15:16 UTC (permalink / raw)
To: Alexandra Winter
Cc: Julian Ruess, Mete Durlu, D. Wythe, Dust Li, Sidraya Jayagond,
Wenjia Zhang, David Miller, Jakub Kicinski, Paolo Abeni,
Eric Dumazet, Andrew Lunn, Mahanta Jambigi, Tony Lu, Wen Gu,
linux-rdma, netdev, linux-s390, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Simon Horman
From: Alexandra Winter <wintera@linux.ibm.com>
Date: Thu, 23 Oct 2025 17:06:35 +0200
> 'clients' and 'max_client' are static variables and therefore don't need to
> be initialized.
>
> Reported-by: Mete Durlu <meted@linux.ibm.com>
> Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> ---
> drivers/dibs/dibs_main.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/dibs/dibs_main.c b/drivers/dibs/dibs_main.c
> index 0374f8350ff7..b015578b4d2e 100644
> --- a/drivers/dibs/dibs_main.c
> +++ b/drivers/dibs/dibs_main.c
> @@ -254,9 +254,6 @@ static int __init dibs_init(void)
> {
> int rc;
>
> - memset(clients, 0, sizeof(clients));
> - max_client = 0;
> -
> dibs_class = class_create("dibs");
> if (IS_ERR(dibs_class))
> return PTR_ERR(dibs_class);
Thanks,
Olek
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/2] dibs: Use subsys_initcall()
2025-10-23 15:06 ` [PATCH net-next 2/2] dibs: Use subsys_initcall() Alexandra Winter
@ 2025-10-23 15:18 ` Alexander Lobakin
2025-10-24 9:07 ` Alexandra Winter
0 siblings, 1 reply; 7+ messages in thread
From: Alexander Lobakin @ 2025-10-23 15:18 UTC (permalink / raw)
To: Alexandra Winter
Cc: Julian Ruess, Mete Durlu, D. Wythe, Dust Li, Sidraya Jayagond,
Wenjia Zhang, David Miller, Jakub Kicinski, Paolo Abeni,
Eric Dumazet, Andrew Lunn, Mahanta Jambigi, Tony Lu, Wen Gu,
linux-rdma, netdev, linux-s390, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Simon Horman
From: Alexandra Winter <wintera@linux.ibm.com>
Date: Thu, 23 Oct 2025 17:06:36 +0200
> In the case of built-in modules, the order of module_init() calls are
> derived from the Makefiles.
>
> Use subsys_initcall() for the dibs module, to make sure dibs_init() is
> executed before dibs clients like smc and dibs devices like ism are
> initialized. So future dibs client or dibs device modules can use
> module_init() without the risk of getting the order in the Makefiles wrong.
>
> Reported-by: Mete Durlu <meted@linux.ibm.com>
Was this reported on LKML, so that you could add a 'Closes:' tag with
the link here or the report was internal?
> Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Either way,
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> ---
> drivers/dibs/dibs_main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/dibs/dibs_main.c b/drivers/dibs/dibs_main.c
> index b015578b4d2e..dac14d843af7 100644
> --- a/drivers/dibs/dibs_main.c
> +++ b/drivers/dibs/dibs_main.c
> @@ -271,5 +271,5 @@ static void __exit dibs_exit(void)
> class_destroy(dibs_class);
> }
>
> -module_init(dibs_init);
> +subsys_initcall(dibs_init);
> module_exit(dibs_exit);
Thanks,
Olek
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init()
2025-10-23 15:06 [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexandra Winter
2025-10-23 15:06 ` [PATCH net-next 2/2] dibs: Use subsys_initcall() Alexandra Winter
2025-10-23 15:16 ` [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexander Lobakin
@ 2025-10-24 2:26 ` Dust Li
2025-10-28 12:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 7+ messages in thread
From: Dust Li @ 2025-10-24 2:26 UTC (permalink / raw)
To: Alexandra Winter, Julian Ruess, Mete Durlu, D. Wythe,
Sidraya Jayagond, Wenjia Zhang, David Miller, Jakub Kicinski,
Paolo Abeni, Eric Dumazet, Andrew Lunn
Cc: Mahanta Jambigi, Tony Lu, Wen Gu, linux-rdma, netdev, linux-s390,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Christian Borntraeger, Sven Schnelle, Simon Horman
On 2025-10-23 17:06:35, Alexandra Winter wrote:
>'clients' and 'max_client' are static variables and therefore don't need to
>be initialized.
>
>Reported-by: Mete Durlu <meted@linux.ibm.com>
>Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
Reviewed-by: Dust Li <dust.li@linux.alibaba.com>
Best regards,
Dust
>---
> drivers/dibs/dibs_main.c | 3 ---
> 1 file changed, 3 deletions(-)
>
>diff --git a/drivers/dibs/dibs_main.c b/drivers/dibs/dibs_main.c
>index 0374f8350ff7..b015578b4d2e 100644
>--- a/drivers/dibs/dibs_main.c
>+++ b/drivers/dibs/dibs_main.c
>@@ -254,9 +254,6 @@ static int __init dibs_init(void)
> {
> int rc;
>
>- memset(clients, 0, sizeof(clients));
>- max_client = 0;
>-
> dibs_class = class_create("dibs");
> if (IS_ERR(dibs_class))
> return PTR_ERR(dibs_class);
>--
>2.48.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 2/2] dibs: Use subsys_initcall()
2025-10-23 15:18 ` Alexander Lobakin
@ 2025-10-24 9:07 ` Alexandra Winter
0 siblings, 0 replies; 7+ messages in thread
From: Alexandra Winter @ 2025-10-24 9:07 UTC (permalink / raw)
To: Alexander Lobakin
Cc: Julian Ruess, Mete Durlu, D. Wythe, Dust Li, Sidraya Jayagond,
Wenjia Zhang, David Miller, Jakub Kicinski, Paolo Abeni,
Eric Dumazet, Andrew Lunn, Mahanta Jambigi, Tony Lu, Wen Gu,
linux-rdma, netdev, linux-s390, Heiko Carstens, Vasily Gorbik,
Alexander Gordeev, Christian Borntraeger, Sven Schnelle,
Simon Horman
On 23.10.25 17:18, Alexander Lobakin wrote:
>> Reported-by: Mete Durlu <meted@linux.ibm.com>
> Was this reported on LKML, so that you could add a 'Closes:' tag with
> the link here or the report was internal?
It was an internal report, so no link available.
We still want to give credit for the colleague who spent time to report
this issue outside of his main area.
>
>> Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
> Either way,
>
> Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Thank you very much.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init()
2025-10-23 15:06 [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexandra Winter
` (2 preceding siblings ...)
2025-10-24 2:26 ` Dust Li
@ 2025-10-28 12:50 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 7+ messages in thread
From: patchwork-bot+netdevbpf @ 2025-10-28 12:50 UTC (permalink / raw)
To: Alexandra Winter
Cc: julianr, meted, alibuda, dust.li, sidraya, wenjia, davem, kuba,
pabeni, edumazet, andrew+netdev, mjambigi, tonylu, guwen,
linux-rdma, netdev, linux-s390, hca, gor, agordeev, borntraeger,
svens, horms
Hello:
This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Thu, 23 Oct 2025 17:06:35 +0200 you wrote:
> 'clients' and 'max_client' are static variables and therefore don't need to
> be initialized.
>
> Reported-by: Mete Durlu <meted@linux.ibm.com>
> Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
> ---
> drivers/dibs/dibs_main.c | 3 ---
> 1 file changed, 3 deletions(-)
Here is the summary with links:
- [net-next,1/2] dibs: Remove reset of static vars in dibs_init()
https://git.kernel.org/netdev/net-next/c/182663bbff78
- [net-next,2/2] dibs: Use subsys_initcall()
https://git.kernel.org/netdev/net-next/c/968822086b74
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] 7+ messages in thread
end of thread, other threads:[~2025-10-28 12:50 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-23 15:06 [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexandra Winter
2025-10-23 15:06 ` [PATCH net-next 2/2] dibs: Use subsys_initcall() Alexandra Winter
2025-10-23 15:18 ` Alexander Lobakin
2025-10-24 9:07 ` Alexandra Winter
2025-10-23 15:16 ` [PATCH net-next 1/2] dibs: Remove reset of static vars in dibs_init() Alexander Lobakin
2025-10-24 2:26 ` Dust Li
2025-10-28 12: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).