* [PATCH] drm/msm: dsi: Constify dsi_host_ops
@ 2020-11-08 22:37 ` Rikard Falkeborn
0 siblings, 0 replies; 5+ messages in thread
From: Rikard Falkeborn @ 2020-11-08 22:37 UTC (permalink / raw)
To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel, Rikard Falkeborn
The only usage of dsi_host_ops is to assign its address to the ops field
in the mipi_dsi_host struct, which is a const pointer. Make it const to
allow the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 198db8d4cf3d..ab281cba0f08 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1657,7 +1657,7 @@ static ssize_t dsi_host_transfer(struct mipi_dsi_host *host,
return ret;
}
-static struct mipi_dsi_host_ops dsi_host_ops = {
+static const struct mipi_dsi_host_ops dsi_host_ops = {
.attach = dsi_host_attach,
.detach = dsi_host_detach,
.transfer = dsi_host_transfer,
--
2.29.2
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH] drm/msm: dsi: Constify dsi_host_ops
@ 2020-11-08 22:37 ` Rikard Falkeborn
0 siblings, 0 replies; 5+ messages in thread
From: Rikard Falkeborn @ 2020-11-08 22:37 UTC (permalink / raw)
To: Rob Clark, Sean Paul, David Airlie, Daniel Vetter
Cc: Rikard Falkeborn, linux-arm-msm, freedreno, linux-kernel, dri-devel
The only usage of dsi_host_ops is to assign its address to the ops field
in the mipi_dsi_host struct, which is a const pointer. Make it const to
allow the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index 198db8d4cf3d..ab281cba0f08 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -1657,7 +1657,7 @@ static ssize_t dsi_host_transfer(struct mipi_dsi_host *host,
return ret;
}
-static struct mipi_dsi_host_ops dsi_host_ops = {
+static const struct mipi_dsi_host_ops dsi_host_ops = {
.attach = dsi_host_attach,
.detach = dsi_host_detach,
.transfer = dsi_host_transfer,
--
2.29.2
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/msm: dsi: Constify dsi_host_ops
2020-11-08 22:37 ` Rikard Falkeborn
@ 2020-11-09 7:32 ` Sam Ravnborg
-1 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2020-11-09 7:32 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: Rob Clark, Sean Paul, David Airlie, Daniel Vetter, linux-arm-msm,
freedreno, linux-kernel, dri-devel
On Sun, Nov 08, 2020 at 11:37:38PM +0100, Rikard Falkeborn wrote:
> The only usage of dsi_host_ops is to assign its address to the ops field
> in the mipi_dsi_host struct, which is a const pointer. Make it const to
> allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
With this patch all struct mipi_dsi_host_ops are const - good.
I expect the msm folks to pick it up.
Sam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/msm: dsi: Constify dsi_host_ops
@ 2020-11-09 7:32 ` Sam Ravnborg
0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2020-11-09 7:32 UTC (permalink / raw)
To: Rikard Falkeborn
Cc: Sean Paul, David Airlie, linux-arm-msm, linux-kernel, dri-devel,
freedreno
On Sun, Nov 08, 2020 at 11:37:38PM +0100, Rikard Falkeborn wrote:
> The only usage of dsi_host_ops is to assign its address to the ops field
> in the mipi_dsi_host struct, which is a const pointer. Make it const to
> allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
With this patch all struct mipi_dsi_host_ops are const - good.
I expect the msm folks to pick it up.
Sam
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] drm/msm: dsi: Constify dsi_host_ops
2020-11-08 22:37 ` Rikard Falkeborn
(?)
(?)
@ 2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
-1 siblings, 0 replies; 5+ messages in thread
From: patchwork-bot+linux-arm-msm @ 2020-12-29 20:15 UTC (permalink / raw)
To: Rikard Falkeborn; +Cc: linux-arm-msm
Hello:
This patch was applied to qcom/linux.git (refs/heads/for-next):
On Sun, 8 Nov 2020 23:37:38 +0100 you wrote:
> The only usage of dsi_host_ops is to assign its address to the ops field
> in the mipi_dsi_host struct, which is a const pointer. Make it const to
> allow the compiler to put it in read-only memory.
>
> Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
> ---
> drivers/gpu/drm/msm/dsi/dsi_host.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Here is the summary with links:
- drm/msm: dsi: Constify dsi_host_ops
https://git.kernel.org/qcom/c/8b6947a81e56
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-12-29 20:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-08 22:37 [PATCH] drm/msm: dsi: Constify dsi_host_ops Rikard Falkeborn
2020-11-08 22:37 ` Rikard Falkeborn
2020-11-09 7:32 ` Sam Ravnborg
2020-11-09 7:32 ` Sam Ravnborg
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.