* [PATCH] arcnet: com90xx: Mark cards and numcards variables as __ro_after_init
@ 2026-05-16 13:46 Len Bao
0 siblings, 0 replies; only message in thread
From: Len Bao @ 2026-05-16 13:46 UTC (permalink / raw)
To: Michael Grzeschik, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: Len Bao, netdev, linux-kernel
The 'cards' and 'numcards' variables are initialized only during the
init phase in the 'com90xx_found' function and never changed. So, mark
these as __ro_after_init.
Signed-off-by: Len Bao <len.bao@gmx.us>
---
drivers/net/arcnet/com90xx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/arcnet/com90xx.c b/drivers/net/arcnet/com90xx.c
index b3b287c16..bdcdccbfb 100644
--- a/drivers/net/arcnet/com90xx.c
+++ b/drivers/net/arcnet/com90xx.c
@@ -67,8 +67,8 @@ static void com90xx_copy_from_card(struct net_device *dev, int bufnum,
/* Known ARCnet cards */
-static struct net_device *cards[16];
-static int numcards;
+static struct net_device *cards[16] __ro_after_init;
+static int numcards __ro_after_init;
/* Handy defines for ARCnet specific stuff */
--
2.43.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-05-16 13:47 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 13:46 [PATCH] arcnet: com90xx: Mark cards and numcards variables as __ro_after_init Len Bao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox