Hi Len,

thanks for your patch!

On Sat, May 16, 2026 at 12:58 PM Len Bao <[email protected]> wrote:

> The 'gpio_devt' and 'gpiolib_initialized' variables are initialized only
> during the init phase in the 'gpiolib_dev_init' function and never
> changed. So, mark these as __ro_after_init.
>
> The 'gpio_stub_drv' variable is initialized only in the declaration and
> never changed. So, this variable could be 'const', but using the
> 'driver_register' and 'driver_unregister' functions discards the 'const'
> qualifier. Therefore, as an alternative, mark it as a __ro_after_init.
>
> Signed-off-by: Len Bao <[email protected]>

Patches like this should be CC to linux-hardening.

Anyways it looks good to me!
Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

Reply via email to