[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1d59986e-8ac0-4b9c-9006-ad1f41784a08@gmail.com>
Date: Fri, 12 Apr 2024 12:17:57 +0200
From: Heiner Kallweit <hkallweit1@...il.com>
To: Eric Dumazet <edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>,
Jakub Kicinski <kuba@...nel.org>, David Miller <davem@...emloft.net>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: [PATCH net-next] net: constify net_class
AFAICS all users of net_class take a const struct class * argument.
Therefore fully constify net_class.
Signed-off-by: Heiner Kallweit <hkallweit1@...il.com>
---
net/core/net-sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/net-sysfs.c b/net/core/net-sysfs.c
index e3d7a8cfa..427185c24 100644
--- a/net/core/net-sysfs.c
+++ b/net/core/net-sysfs.c
@@ -2046,7 +2046,7 @@ static void net_get_ownership(const struct device *d, kuid_t *uid, kgid_t *gid)
net_ns_get_ownership(net, uid, gid);
}
-static struct class net_class __ro_after_init = {
+static const struct class net_class = {
.name = "net",
.dev_release = netdev_release,
.dev_groups = net_class_groups,
--
2.44.0
Powered by blists - more mailing lists