Re: [PATCH] mfd: 88pm886: Constify struct regmap_irq_chip and some other structures

From: Karel Balej
Date: Mon May 19 2025 - 06:01:53 EST


Christophe JAILLET, 2025-05-11T22:42:30+02:00:
> 'struct regmap_irq_chip' is not modified in this driver.
>
> Constifying this structure moves some data to a read-only section, so
> increase overall security, especially when the structure holds some

increases

> function pointers.
>
> While at it, also constify some other structures.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 5032 3304 64 8400 20d0 drivers/mfd/88pm886.o
>
> After:
> =====
> text data bss dec hex filename
> 5800 2536 64 8400 20d0 drivers/mfd/88pm886.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
> ---
> Compile tested-only.
> ---
> drivers/mfd/88pm886.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Karel Balej <balejk@xxxxxxxxx>

Thanks,
K. B.