* [PATCH] netdevsim: make nsim_bus const
@ 2024-02-04 20:16 Ricardo B. Marliere
2024-02-05 12:48 ` Greg Kroah-Hartman
2024-02-07 13:50 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 3+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 20:16 UTC (permalink / raw)
To: Jakub Kicinski, David S. Miller, Eric Dumazet, Paolo Abeni
Cc: netdev, linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere
Now that the driver core can properly handle constant struct bus_type,
move the nsim_bus variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
drivers/net/netdevsim/bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c
index bcbc1e19edde..aedab1d9623a 100644
--- a/drivers/net/netdevsim/bus.c
+++ b/drivers/net/netdevsim/bus.c
@@ -260,7 +260,7 @@ static int nsim_num_vf(struct device *dev)
return nsim_bus_dev->num_vfs;
}
-static struct bus_type nsim_bus = {
+static const struct bus_type nsim_bus = {
.name = DRV_NAME,
.dev_name = DRV_NAME,
.bus_groups = nsim_bus_groups,
---
base-commit: ffabe98cb576097b77d404d39e8b3df03caa986a
change-id: 20240204-bus_cleanup-net-9361456dbe19
Best regards,
--
Ricardo B. Marliere <ricardo@marliere.net>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] netdevsim: make nsim_bus const
2024-02-04 20:16 [PATCH] netdevsim: make nsim_bus const Ricardo B. Marliere
@ 2024-02-05 12:48 ` Greg Kroah-Hartman
2024-02-07 13:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2024-02-05 12:48 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: Jakub Kicinski, David S. Miller, Eric Dumazet, Paolo Abeni,
netdev, linux-kernel
On Sun, Feb 04, 2024 at 05:16:34PM -0300, Ricardo B. Marliere wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the nsim_bus variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] netdevsim: make nsim_bus const
2024-02-04 20:16 [PATCH] netdevsim: make nsim_bus const Ricardo B. Marliere
2024-02-05 12:48 ` Greg Kroah-Hartman
@ 2024-02-07 13:50 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-02-07 13:50 UTC (permalink / raw)
To: Ricardo B. Marliere
Cc: kuba, davem, edumazet, pabeni, netdev, linux-kernel, gregkh
Hello:
This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:
On Sun, 04 Feb 2024 17:16:34 -0300 you wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the nsim_bus variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
>
> [...]
Here is the summary with links:
- netdevsim: make nsim_bus const
https://git.kernel.org/netdev/net-next/c/56b93cd358b3
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-02-07 13:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-04 20:16 [PATCH] netdevsim: make nsim_bus const Ricardo B. Marliere
2024-02-05 12:48 ` Greg Kroah-Hartman
2024-02-07 13: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