Re: [PATCH] watchdog: apple: Constify some structures

From: Guenter Roeck

Date: Sun Aug 09 2026 - 11:00:29 EST


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@xxxxxxxxxx>

Applied.

Thanks,
Guenter