* [PATCH] drm/bridge: Constify struct i2c_device_id
@ 2024-11-12 21:12 Christophe JAILLET
2024-11-12 22:29 ` Doug Anderson
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Christophe JAILLET @ 2024-11-12 21:12 UTC (permalink / raw)
To: Jagan Teki, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, Douglas Anderson
Cc: linux-kernel, kernel-janitors, Christophe JAILLET, dri-devel
'struct i2c_device_id' is not modified in these drivers.
Constifying this structure moves some data to a read-only section, so
increase overall security.
On a x86_64, with allmodconfig, as an example:
Before:
======
text data bss dec hex filename
15566 987 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
After:
=====
text data bss dec hex filename
15630 923 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
Compile tested-only.
---
drivers/gpu/drm/bridge/chipone-icn6211.c | 2 +-
drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +-
drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +-
drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
6 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c
index 9eecac457dcf..d47703559b0d 100644
--- a/drivers/gpu/drm/bridge/chipone-icn6211.c
+++ b/drivers/gpu/drm/bridge/chipone-icn6211.c
@@ -785,7 +785,7 @@ static struct mipi_dsi_driver chipone_dsi_driver = {
},
};
-static struct i2c_device_id chipone_i2c_id[] = {
+static const struct i2c_device_id chipone_i2c_id[] = {
{ "chipone,icn6211" },
{},
};
diff --git a/drivers/gpu/drm/bridge/lontium-lt9211.c b/drivers/gpu/drm/bridge/lontium-lt9211.c
index c8881796fba4..999ddebb832d 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9211.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9211.c
@@ -773,7 +773,7 @@ static void lt9211_remove(struct i2c_client *client)
drm_bridge_remove(&ctx->bridge);
}
-static struct i2c_device_id lt9211_id[] = {
+static const struct i2c_device_id lt9211_id[] = {
{ "lontium,lt9211" },
{},
};
diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
index 1b31fdebe164..8f25b338a8d8 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
@@ -1235,7 +1235,7 @@ static void lt9611_remove(struct i2c_client *client)
of_node_put(lt9611->dsi0_node);
}
-static struct i2c_device_id lt9611_id[] = {
+static const struct i2c_device_id lt9611_id[] = {
{ "lontium,lt9611", 0 },
{}
};
diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
index 4d1d40e1f1b4..f89af8203c9d 100644
--- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
+++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
@@ -913,7 +913,7 @@ static void lt9611uxc_remove(struct i2c_client *client)
of_node_put(lt9611uxc->dsi0_node);
}
-static struct i2c_device_id lt9611uxc_id[] = {
+static const struct i2c_device_id lt9611uxc_id[] = {
{ "lontium,lt9611uxc", 0 },
{ /* sentinel */ }
};
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
index 57a7ed13f996..00d3bfa645f5 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
@@ -732,7 +732,7 @@ static void sn65dsi83_remove(struct i2c_client *client)
drm_bridge_remove(&ctx->bridge);
}
-static struct i2c_device_id sn65dsi83_id[] = {
+static const struct i2c_device_id sn65dsi83_id[] = {
{ "ti,sn65dsi83", MODEL_SN65DSI83 },
{ "ti,sn65dsi84", MODEL_SN65DSI84 },
{},
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 9e31f750fd88..ce4c026b064f 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -1970,7 +1970,7 @@ static int ti_sn65dsi86_probe(struct i2c_client *client)
return ti_sn65dsi86_add_aux_device(pdata, &pdata->aux_aux, "aux");
}
-static struct i2c_device_id ti_sn65dsi86_id[] = {
+static const struct i2c_device_id ti_sn65dsi86_id[] = {
{ "ti,sn65dsi86", 0},
{},
};
--
2.47.0
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] drm/bridge: Constify struct i2c_device_id
2024-11-12 21:12 [PATCH] drm/bridge: Constify struct i2c_device_id Christophe JAILLET
@ 2024-11-12 22:29 ` Doug Anderson
2024-11-12 22:43 ` Laurent Pinchart
2024-11-20 23:18 ` Doug Anderson
2 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2024-11-12 22:29 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Jagan Teki, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, linux-kernel, kernel-janitors,
dri-devel
Hi,
On Tue, Nov 12, 2024 at 1:12 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> 'struct i2c_device_id' is not modified in these drivers.
>
> Constifying this structure moves some data to a read-only section, so
> increase overall security.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 15566 987 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>
> After:
> =====
> text data bss dec hex filename
> 15630 923 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested-only.
> ---
> drivers/gpu/drm/bridge/chipone-icn6211.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
Acked-by: Douglas Anderson <dianders@chromium.org>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/bridge: Constify struct i2c_device_id
2024-11-12 21:12 [PATCH] drm/bridge: Constify struct i2c_device_id Christophe JAILLET
2024-11-12 22:29 ` Doug Anderson
@ 2024-11-12 22:43 ` Laurent Pinchart
2024-11-13 21:19 ` Christophe JAILLET
2024-11-20 23:18 ` Doug Anderson
2 siblings, 1 reply; 6+ messages in thread
From: Laurent Pinchart @ 2024-11-12 22:43 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Jagan Teki, Andrzej Hajda, Neil Armstrong, Robert Foss,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
linux-kernel, kernel-janitors, dri-devel
Hi Christophe,
Thank you for the patch.
On Tue, Nov 12, 2024 at 10:12:25PM +0100, Christophe JAILLET wrote:
> 'struct i2c_device_id' is not modified in these drivers.
>
> Constifying this structure moves some data to a read-only section, so
> increase overall security.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 15566 987 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>
> After:
> =====
> text data bss dec hex filename
> 15630 923 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested-only.
> ---
> drivers/gpu/drm/bridge/chipone-icn6211.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
While at it, could you address drivers/gpu/drm/i2c/tda9950.c too ? If I
were to push a tad more, there are only two other drivers in the kernel
with the same issues outside of drivers/gpu/ according to
$ git grep '^static struct i2c_device_id'
drivers/gpu/drm/bridge/chipone-icn6211.c:static struct i2c_device_id chipone_i2c_id[] = {
drivers/gpu/drm/bridge/lontium-lt9211.c:static struct i2c_device_id lt9211_id[] = {
drivers/gpu/drm/bridge/lontium-lt9611.c:static struct i2c_device_id lt9611_id[] = {
drivers/gpu/drm/bridge/lontium-lt9611uxc.c:static struct i2c_device_id lt9611uxc_id[] = {
drivers/gpu/drm/bridge/ti-sn65dsi83.c:static struct i2c_device_id sn65dsi83_id[] = {
drivers/gpu/drm/bridge/ti-sn65dsi86.c:static struct i2c_device_id ti_sn65dsi86_id[] = {
drivers/gpu/drm/i2c/tda9950.c:static struct i2c_device_id tda9950_ids[] = {
drivers/input/keyboard/cypress-sf.c:static struct i2c_device_id cypress_sf_id_table[] = {
sound/soc/codecs/cs42l51-i2c.c:static struct i2c_device_id cs42l51_i2c_id[] = {
:-)
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 6 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/chipone-icn6211.c b/drivers/gpu/drm/bridge/chipone-icn6211.c
> index 9eecac457dcf..d47703559b0d 100644
> --- a/drivers/gpu/drm/bridge/chipone-icn6211.c
> +++ b/drivers/gpu/drm/bridge/chipone-icn6211.c
> @@ -785,7 +785,7 @@ static struct mipi_dsi_driver chipone_dsi_driver = {
> },
> };
>
> -static struct i2c_device_id chipone_i2c_id[] = {
> +static const struct i2c_device_id chipone_i2c_id[] = {
> { "chipone,icn6211" },
> {},
> };
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9211.c b/drivers/gpu/drm/bridge/lontium-lt9211.c
> index c8881796fba4..999ddebb832d 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9211.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9211.c
> @@ -773,7 +773,7 @@ static void lt9211_remove(struct i2c_client *client)
> drm_bridge_remove(&ctx->bridge);
> }
>
> -static struct i2c_device_id lt9211_id[] = {
> +static const struct i2c_device_id lt9211_id[] = {
> { "lontium,lt9211" },
> {},
> };
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611.c b/drivers/gpu/drm/bridge/lontium-lt9611.c
> index 1b31fdebe164..8f25b338a8d8 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611.c
> @@ -1235,7 +1235,7 @@ static void lt9611_remove(struct i2c_client *client)
> of_node_put(lt9611->dsi0_node);
> }
>
> -static struct i2c_device_id lt9611_id[] = {
> +static const struct i2c_device_id lt9611_id[] = {
> { "lontium,lt9611", 0 },
> {}
> };
> diff --git a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
> index 4d1d40e1f1b4..f89af8203c9d 100644
> --- a/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
> +++ b/drivers/gpu/drm/bridge/lontium-lt9611uxc.c
> @@ -913,7 +913,7 @@ static void lt9611uxc_remove(struct i2c_client *client)
> of_node_put(lt9611uxc->dsi0_node);
> }
>
> -static struct i2c_device_id lt9611uxc_id[] = {
> +static const struct i2c_device_id lt9611uxc_id[] = {
> { "lontium,lt9611uxc", 0 },
> { /* sentinel */ }
> };
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi83.c b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> index 57a7ed13f996..00d3bfa645f5 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi83.c
> @@ -732,7 +732,7 @@ static void sn65dsi83_remove(struct i2c_client *client)
> drm_bridge_remove(&ctx->bridge);
> }
>
> -static struct i2c_device_id sn65dsi83_id[] = {
> +static const struct i2c_device_id sn65dsi83_id[] = {
> { "ti,sn65dsi83", MODEL_SN65DSI83 },
> { "ti,sn65dsi84", MODEL_SN65DSI84 },
> {},
> diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> index 9e31f750fd88..ce4c026b064f 100644
> --- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> +++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
> @@ -1970,7 +1970,7 @@ static int ti_sn65dsi86_probe(struct i2c_client *client)
> return ti_sn65dsi86_add_aux_device(pdata, &pdata->aux_aux, "aux");
> }
>
> -static struct i2c_device_id ti_sn65dsi86_id[] = {
> +static const struct i2c_device_id ti_sn65dsi86_id[] = {
> { "ti,sn65dsi86", 0},
> {},
> };
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] drm/bridge: Constify struct i2c_device_id
2024-11-12 22:43 ` Laurent Pinchart
@ 2024-11-13 21:19 ` Christophe JAILLET
2024-11-14 11:06 ` Laurent Pinchart
0 siblings, 1 reply; 6+ messages in thread
From: Christophe JAILLET @ 2024-11-13 21:19 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Jagan Teki, Andrzej Hajda, Neil Armstrong, Robert Foss,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
linux-kernel, kernel-janitors, dri-devel
Le 12/11/2024 à 23:43, Laurent Pinchart a écrit :
> Hi Christophe,
>
> Thank you for the patch.
>
> On Tue, Nov 12, 2024 at 10:12:25PM +0100, Christophe JAILLET wrote:
>> 'struct i2c_device_id' is not modified in these drivers.
>>
>> Constifying this structure moves some data to a read-only section, so
>> increase overall security.
>>
>> On a x86_64, with allmodconfig, as an example:
>> Before:
>> ======
>> text data bss dec hex filename
>> 15566 987 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>>
>> After:
>> =====
>> text data bss dec hex filename
>> 15630 923 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>>
>> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
>> ---
>> Compile tested-only.
>> ---
>> drivers/gpu/drm/bridge/chipone-icn6211.c | 2 +-
>> drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +-
>> drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +-
>> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
>> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
>> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
>
> While at it, could you address drivers/gpu/drm/i2c/tda9950.c too ? If I
> were to push a tad more, there are only two other drivers in the kernel
> with the same issues outside of drivers/gpu/ according to
Hi Laurent,
this is in my todo list. I wanted to send it separately because all
these files are in gpu/drm/bridge/ and tda9950.c is in gpu/drm/.
Most of the times, maintainers ask for separate patches when several
drivers are patched. For such clean-ups, I try at least to group them by
directory.
Same answer the other files in input and sound. Patches will be sent in
a few days.
I've also sent one for the documentation [1] and will send one for
const_structs.checkpatch as well.
CJ
[1]:
https://lore.kernel.org/linux-kernel/c8e6da4adb7381ee27e8e11854c9d856382cdc93.1731445244.git.christophe.jaillet@wanadoo.fr/
>
> $ git grep '^static struct i2c_device_id'
> drivers/gpu/drm/bridge/chipone-icn6211.c:static struct i2c_device_id chipone_i2c_id[] = {
> drivers/gpu/drm/bridge/lontium-lt9211.c:static struct i2c_device_id lt9211_id[] = {
> drivers/gpu/drm/bridge/lontium-lt9611.c:static struct i2c_device_id lt9611_id[] = {
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c:static struct i2c_device_id lt9611uxc_id[] = {
> drivers/gpu/drm/bridge/ti-sn65dsi83.c:static struct i2c_device_id sn65dsi83_id[] = {
> drivers/gpu/drm/bridge/ti-sn65dsi86.c:static struct i2c_device_id ti_sn65dsi86_id[] = {
> drivers/gpu/drm/i2c/tda9950.c:static struct i2c_device_id tda9950_ids[] = {
> drivers/input/keyboard/cypress-sf.c:static struct i2c_device_id cypress_sf_id_table[] = {
> sound/soc/codecs/cs42l51-i2c.c:static struct i2c_device_id cs42l51_i2c_id[] = {
>
> :-)
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
>
>> 6 files changed, 6 insertions(+), 6 deletions(-)
...
CJ
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] drm/bridge: Constify struct i2c_device_id
2024-11-13 21:19 ` Christophe JAILLET
@ 2024-11-14 11:06 ` Laurent Pinchart
0 siblings, 0 replies; 6+ messages in thread
From: Laurent Pinchart @ 2024-11-14 11:06 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Jagan Teki, Andrzej Hajda, Neil Armstrong, Robert Foss,
Jonas Karlman, Jernej Skrabec, Maarten Lankhorst, Maxime Ripard,
Thomas Zimmermann, David Airlie, Simona Vetter, Douglas Anderson,
linux-kernel, kernel-janitors, dri-devel
Hi Christophe,
On Wed, Nov 13, 2024 at 10:19:24PM +0100, Christophe JAILLET wrote:
> Le 12/11/2024 à 23:43, Laurent Pinchart a écrit :
> > On Tue, Nov 12, 2024 at 10:12:25PM +0100, Christophe JAILLET wrote:
> >> 'struct i2c_device_id' is not modified in these drivers.
> >>
> >> Constifying this structure moves some data to a read-only section, so
> >> increase overall security.
> >>
> >> On a x86_64, with allmodconfig, as an example:
> >> Before:
> >> ======
> >> text data bss dec hex filename
> >> 15566 987 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
> >>
> >> After:
> >> =====
> >> text data bss dec hex filename
> >> 15630 923 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
> >>
> >> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> >> ---
> >> Compile tested-only.
> >> ---
> >> drivers/gpu/drm/bridge/chipone-icn6211.c | 2 +-
> >> drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +-
> >> drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +-
> >> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
> >> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
> >> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
> >
> > While at it, could you address drivers/gpu/drm/i2c/tda9950.c too ? If I
> > were to push a tad more, there are only two other drivers in the kernel
> > with the same issues outside of drivers/gpu/ according to
>
> Hi Laurent,
>
> this is in my todo list. I wanted to send it separately because all
> these files are in gpu/drm/bridge/ and tda9950.c is in gpu/drm/.
>
> Most of the times, maintainers ask for separate patches when several
> drivers are patched. For such clean-ups, I try at least to group them by
> directory.
I would probably have included tda9950.c in this patch, but I'm also
fine handling it separately.
> Same answer the other files in input and sound. Patches will be sent in
> a few days.
Thank you. If you have extra time, there are also a handful of similar
issues with of_device_id :-)
> I've also sent one for the documentation [1] and will send one for
> const_structs.checkpatch as well.
Thank you for that.
> CJ
>
> [1]: https://lore.kernel.org/linux-kernel/c8e6da4adb7381ee27e8e11854c9d856382cdc93.1731445244.git.christophe.jaillet@wanadoo.fr/
>
> > $ git grep '^static struct i2c_device_id'
> > drivers/gpu/drm/bridge/chipone-icn6211.c:static struct i2c_device_id chipone_i2c_id[] = {
> > drivers/gpu/drm/bridge/lontium-lt9211.c:static struct i2c_device_id lt9211_id[] = {
> > drivers/gpu/drm/bridge/lontium-lt9611.c:static struct i2c_device_id lt9611_id[] = {
> > drivers/gpu/drm/bridge/lontium-lt9611uxc.c:static struct i2c_device_id lt9611uxc_id[] = {
> > drivers/gpu/drm/bridge/ti-sn65dsi83.c:static struct i2c_device_id sn65dsi83_id[] = {
> > drivers/gpu/drm/bridge/ti-sn65dsi86.c:static struct i2c_device_id ti_sn65dsi86_id[] = {
> > drivers/gpu/drm/i2c/tda9950.c:static struct i2c_device_id tda9950_ids[] = {
> > drivers/input/keyboard/cypress-sf.c:static struct i2c_device_id cypress_sf_id_table[] = {
> > sound/soc/codecs/cs42l51-i2c.c:static struct i2c_device_id cs42l51_i2c_id[] = {
> >
> > :-)
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> >
> >> 6 files changed, 6 insertions(+), 6 deletions(-)
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/bridge: Constify struct i2c_device_id
2024-11-12 21:12 [PATCH] drm/bridge: Constify struct i2c_device_id Christophe JAILLET
2024-11-12 22:29 ` Doug Anderson
2024-11-12 22:43 ` Laurent Pinchart
@ 2024-11-20 23:18 ` Doug Anderson
2 siblings, 0 replies; 6+ messages in thread
From: Doug Anderson @ 2024-11-20 23:18 UTC (permalink / raw)
To: Christophe JAILLET
Cc: Jagan Teki, Andrzej Hajda, Neil Armstrong, Robert Foss,
Laurent Pinchart, Jonas Karlman, Jernej Skrabec,
Maarten Lankhorst, Maxime Ripard, Thomas Zimmermann,
David Airlie, Simona Vetter, linux-kernel, kernel-janitors,
dri-devel
Hi,
On Tue, Nov 12, 2024 at 1:12 PM Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> 'struct i2c_device_id' is not modified in these drivers.
>
> Constifying this structure moves some data to a read-only section, so
> increase overall security.
>
> On a x86_64, with allmodconfig, as an example:
> Before:
> ======
> text data bss dec hex filename
> 15566 987 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>
> After:
> =====
> text data bss dec hex filename
> 15630 923 32 16585 40c9 drivers/gpu/drm/bridge/chipone-icn6211.o
>
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
> ---
> Compile tested-only.
> ---
> drivers/gpu/drm/bridge/chipone-icn6211.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9211.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9611.c | 2 +-
> drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 2 +-
> drivers/gpu/drm/bridge/ti-sn65dsi83.c | 2 +-
> drivers/gpu/drm/bridge/ti-sn65dsi86.c | 2 +-
> 6 files changed, 6 insertions(+), 6 deletions(-)
I figured it didn't hurt if I just pushed this so I did. Now in drm-misc-next:
[1/1] drm/bridge: Constify struct i2c_device_id
commit: dbf7986f8a56ce47465bb6e0f2b2d166b931d707
-Doug
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-11-20 23:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-11-12 21:12 [PATCH] drm/bridge: Constify struct i2c_device_id Christophe JAILLET
2024-11-12 22:29 ` Doug Anderson
2024-11-12 22:43 ` Laurent Pinchart
2024-11-13 21:19 ` Christophe JAILLET
2024-11-14 11:06 ` Laurent Pinchart
2024-11-20 23:18 ` Doug Anderson
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®