[PATCH] watchdog: apple: Constify some structures

Guenter Roeck linux at roeck-us.net
Sun Aug 9 08:00:18 PDT 2026


On Sun, Aug 09, 2026 at 03:49:10PM +0200, Christophe JAILLET wrote:
> 'struct watchdog_ops' and 'struct watchdog_info' are not modified in this
> driver.
> 
> Constifying these structure moves some data to a read-only section, so
> increases overall security, especially when the structure holds some
> function pointers.
> 
> On a x86_64, with allmodconfig:
> Before:
> ======
>    text	   data	    bss	    dec	    hex	filename
>    7319	   1768	      0	   9087	   237f	drivers/watchdog/apple_wdt.o
> 
> After:
> =====
>    text	   data	    bss	    dec	    hex	filename
>    7543	   1544	      0	   9087	   237f	drivers/watchdog/apple_wdt.o
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet at wanadoo.fr>

Applied.

Thanks,
Guenter



More information about the linux-arm-kernel mailing list