From: Thomas Zimmermann <tzimmermann@suse.de>
To: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
linux@weissschuh.net, broonie@kernel.org, lee@kernel.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
dri-devel@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i2c: tda9950: Constify struct i2c_device_id
Date: Tue, 19 Nov 2024 10:58:45 +0100 [thread overview]
Message-ID: <62557e58-55f1-4260-9357-30a222bb204e@suse.de> (raw)
In-Reply-To: <d0f63518a053a817cec0ad0e7d9241f9eb2a4a8e.1731689044.git.christophe.jaillet@wanadoo.fr>
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@wanadoo.fr>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.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)
prev parent reply other threads:[~2024-11-19 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-15 17:17 Christophe JAILLET
2024-11-19 9:58 ` Thomas Zimmermann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62557e58-55f1-4260-9357-30a222bb204e@suse.de \
--to=tzimmermann@suse.de \
--cc=airlied@gmail.com \
--cc=broonie@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®