[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <f6c39166-19bb-4e63-97ce-abf50c6f915d@roeck-us.net>
Date: Sun, 8 Sep 2024 16:38:10 -0700
From: Guenter Roeck <linux@...ck-us.net>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Saravanan Sekar <sravanhome@...il.com>,
Jean Delvare <jdelvare@...e.com>, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org, linux-hwmon@...r.kernel.org
Subject: Re: [PATCH] hwmon: (pmbus/mpq7932) Constify struct regulator_desc
On Sun, Sep 08, 2024 at 10:32:38AM +0200, Christophe JAILLET wrote:
> 'struct regulator_desc' 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
> function pointers.
>
> This also makes mpq7932_regulators_desc consistent with
> mpq7932_regulators_desc_one which is already a "static const struct
> regulator_desc".
>
> On a x86_64, with allmodconfig:
> Before:
> ======
> text data bss dec hex filename
> 3516 2264 0 5780 1694 drivers/hwmon/pmbus/mpq7932.o
>
> After:
> =====
> text data bss dec hex filename
> 5396 384 0 5780 1694 drivers/hwmon/pmbus/mpq7932.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
> ---
Applied.
Thanks,
Guenter
Powered by blists - more mailing lists