[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <62557e58-55f1-4260-9357-30a222bb204e@suse.de>
Date: Tue, 19 Nov 2024 10:58:45 +0100
From: Thomas Zimmermann <tzimmermann@...e.de>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>, linux@...ssschuh.net,
broonie@...nel.org, lee@...nel.org,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, David Airlie <airlied@...il.com>,
Simona Vetter <simona@...ll.ch>
Cc: linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org,
dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH v2] drm/i2c: tda9950: Constify struct i2c_device_id
Am 15.11.24 um 18:17 schrieb Christophe JAILLET:
> 'struct i2c_device_id' is not modified in this driver.
>
> Constifying this structure moves some data to a read-only section, so
> increase overall security.
>
> On a x86_64, with allmodconfig:
> Before:
> ======
> text data bss dec hex filename
> 12136 822 0 12958 329e drivers/gpu/drm/i2c/tda9950.o
>
> After:
> =====
> text data bss dec hex filename
> 12200 758 0 12958 329e drivers/gpu/drm/i2c/tda9950.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Reviewed-by: Thomas Zimmermann <tzimmermann@...e.de>
> ---
> Compile tested-only.
>
> v2: fix missing const :(
> ---
> drivers/gpu/drm/i2c/tda9950.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i2c/tda9950.c b/drivers/gpu/drm/i2c/tda9950.c
> index 82d618c40dce..5065d6212fe4 100644
> --- a/drivers/gpu/drm/i2c/tda9950.c
> +++ b/drivers/gpu/drm/i2c/tda9950.c
> @@ -485,7 +485,7 @@ static void tda9950_remove(struct i2c_client *client)
> cec_unregister_adapter(priv->adap);
> }
>
> -static struct i2c_device_id tda9950_ids[] = {
> +static const struct i2c_device_id tda9950_ids[] = {
> { "tda9950", 0 },
> { },
> };
--
--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Frankenstrasse 146, 90461 Nuernberg, Germany
GF: Ivo Totev, Andrew Myers, Andrew McDonald, Boudien Moerman
HRB 36809 (AG Nuernberg)
Powered by blists - more mailing lists