* [PATCH] gpio: viperboard: mark gpioa_clk variable as __ro_after_init
@ 2026-05-16 10:01 Len Bao
2026-06-06 17:27 ` Len Bao
0 siblings, 1 reply; 2+ messages in thread
From: Len Bao @ 2026-05-16 10:01 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski; +Cc: Len Bao, linux-gpio, linux-kernel
The 'gpioa_clk' variable is initialized only during the init phase in
the 'vprbrd_gpio_init' function and never changed. So, mark it as
__ro_after_init.
Signed-off-by: Len Bao <len.bao@gmx.us>
---
drivers/gpio/gpio-viperboard.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c
index 89087fd48..4e6442390 100644
--- a/drivers/gpio/gpio-viperboard.c
+++ b/drivers/gpio/gpio-viperboard.c
@@ -70,7 +70,7 @@ struct vprbrd_gpio {
};
/* gpioa sampling clock module parameter */
-static unsigned char gpioa_clk;
+static unsigned char gpioa_clk __ro_after_init;
static unsigned int gpioa_freq = VPRBRD_GPIOA_FREQ_DEFAULT;
module_param(gpioa_freq, uint, 0);
MODULE_PARM_DESC(gpioa_freq,
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gpio: viperboard: mark gpioa_clk variable as __ro_after_init
2026-05-16 10:01 [PATCH] gpio: viperboard: mark gpioa_clk variable as __ro_after_init Len Bao
@ 2026-06-06 17:27 ` Len Bao
0 siblings, 0 replies; 2+ messages in thread
From: Len Bao @ 2026-06-06 17:27 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Kees Cook
Cc: Len Bao, linux-gpio, linux-hardening, linux-kernel
Hi,
On Sat, May 16, 2026 at 10:01:12AM +0000, Len Bao wrote:
> The 'gpioa_clk' variable is initialized only during the init phase in
> the 'vprbrd_gpio_init' function and never changed. So, mark it as
> __ro_after_init.
>
> Signed-off-by: Len Bao <len.bao@gmx.us>
> ---
Friendly ping.
Any comments are welcome.
Regards,
Len
> drivers/gpio/gpio-viperboard.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpio/gpio-viperboard.c b/drivers/gpio/gpio-viperboard.c
> index 89087fd48..4e6442390 100644
> --- a/drivers/gpio/gpio-viperboard.c
> +++ b/drivers/gpio/gpio-viperboard.c
> @@ -70,7 +70,7 @@ struct vprbrd_gpio {
> };
>
> /* gpioa sampling clock module parameter */
> -static unsigned char gpioa_clk;
> +static unsigned char gpioa_clk __ro_after_init;
> static unsigned int gpioa_freq = VPRBRD_GPIOA_FREQ_DEFAULT;
> module_param(gpioa_freq, uint, 0);
> MODULE_PARM_DESC(gpioa_freq,
> --
> 2.43.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-06 17:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-16 10:01 [PATCH] gpio: viperboard: mark gpioa_clk variable as __ro_after_init Len Bao
2026-06-06 17:27 ` Len Bao
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.