linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ricardo B. Marliere" <ricardo@marliere.net>
To: Oliver Neukum <oneukum@suse.com>,
	 "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	 Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,  Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	 Vladimir Oltean <olteanv@gmail.com>,
	Roopa Prabhu <roopa@nvidia.com>,
	 Nikolay Aleksandrov <razor@blackwall.org>,
	 Loic Poulain <loic.poulain@linaro.org>,
	 Sergey Ryazanov <ryazanov.s.a@gmail.com>,
	 Johannes Berg <johannes@sipsolutions.net>
Cc: netdev@vger.kernel.org, linux-usb@vger.kernel.org,
	 linux-kernel@vger.kernel.org, bridge@lists.linux.dev,
	 linux-ppp@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	 "Ricardo B. Marliere" <ricardo@marliere.net>
Subject: [PATCH 10/12] net: netdevsim: constify the struct device_type usage
Date: Sat, 17 Feb 2024 17:13:32 -0300	[thread overview]
Message-ID: <20240217-device_cleanup-net-v1-10-1eb31fb689f7@marliere.net> (raw)
In-Reply-To: <20240217-device_cleanup-net-v1-0-1eb31fb689f7@marliere.net>

Since commit aed65af1cc2f ("drivers: make device_type const"), the driver
core can properly handle constant struct device_type. Move the
nsim_bus_dev_type 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>
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 aedab1d9623a..0c5aff63d242 100644
--- a/drivers/net/netdevsim/bus.c
+++ b/drivers/net/netdevsim/bus.c
@@ -129,7 +129,7 @@ static void nsim_bus_dev_release(struct device *dev)
 		complete(&nsim_bus_devs_released);
 }
 
-static struct device_type nsim_bus_dev_type = {
+static const struct device_type nsim_bus_dev_type = {
 	.groups = nsim_bus_dev_attr_groups,
 	.release = nsim_bus_dev_release,
 };

-- 
2.43.0


  parent reply	other threads:[~2024-02-17 20:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-17 20:13 [PATCH 00/12] net: constify struct device_type usage Ricardo B. Marliere
2024-02-17 20:13 ` [PATCH 01/12] net: usbnet: constify the " Ricardo B. Marliere
2024-02-20 11:18   ` Simon Horman
2024-02-17 20:13 ` [PATCH 02/12] net: dsa: " Ricardo B. Marliere
2024-02-18 21:46   ` Florian Fainelli
2024-02-17 20:13 ` [PATCH 03/12] net: bridge: " Ricardo B. Marliere
2024-02-20 11:20   ` Simon Horman
2024-02-17 20:13 ` [PATCH 04/12] net: vxlan: " Ricardo B. Marliere
2024-02-19 11:43   ` Guillaume Nault
2024-02-19 11:49     ` Ricardo B. Marliere
2024-02-17 20:13 ` [PATCH 05/12] net: ppp: " Ricardo B. Marliere
2024-02-19 11:44   ` Guillaume Nault
2024-02-17 20:13 ` [PATCH 06/12] net: geneve: " Ricardo B. Marliere
2024-02-19 11:45   ` Guillaume Nault
2024-02-17 20:13 ` [PATCH 07/12] net: hsr: " Ricardo B. Marliere
2024-02-20 11:21   ` Simon Horman
2024-02-17 20:13 ` [PATCH 08/12] net: l2tp: " Ricardo B. Marliere
2024-02-19 11:46   ` Guillaume Nault
2024-02-17 20:13 ` [PATCH 09/12] net: vlan: " Ricardo B. Marliere
2024-02-20 11:21   ` Simon Horman
2024-02-17 20:13 ` Ricardo B. Marliere [this message]
2024-02-20 11:22   ` [PATCH 10/12] net: netdevsim: " Simon Horman
2024-02-17 20:13 ` [PATCH 11/12] net: wwan: core: " Ricardo B. Marliere
2024-02-20 11:22   ` Simon Horman
2024-02-21  0:07   ` Sergey Ryazanov
2024-02-17 20:13 ` [PATCH 12/12] net: hso: " Ricardo B. Marliere
2024-02-20 11:22   ` Simon Horman
2024-02-21  9:50 ` [PATCH 00/12] net: constify " patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240217-device_cleanup-net-v1-10-1eb31fb689f7@marliere.net \
    --to=ricardo@marliere.net \
    --cc=andrew@lunn.ch \
    --cc=bridge@lists.linux.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-ppp@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=oneukum@suse.com \
    --cc=pabeni@redhat.com \
    --cc=razor@blackwall.org \
    --cc=roopa@nvidia.com \
    --cc=ryazanov.s.a@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).