All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/imx: make static read-only array channel_offsets const
@ 2022-01-23 22:34 Colin Ian King
  2022-03-29 16:52 ` Philipp Zabel
  0 siblings, 1 reply; 2+ messages in thread
From: Colin Ian King @ 2022-01-23 22:34 UTC (permalink / raw)
  To: Philipp Zabel, David Airlie, Daniel Vetter, dri-devel
  Cc: kernel-janitors, linux-kernel

The static array channel_offsets is read-only so it make sense to make
it const.

Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
---
 drivers/gpu/ipu-v3/ipu-dc.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-dc.c
index ca96b235491a..b038a6d7307b 100644
--- a/drivers/gpu/ipu-v3/ipu-dc.c
+++ b/drivers/gpu/ipu-v3/ipu-dc.c
@@ -344,8 +344,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct device *dev,
 		unsigned long base, unsigned long template_base)
 {
 	struct ipu_dc_priv *priv;
-	static int channel_offsets[] = { 0, 0x1c, 0x38, 0x54, 0x58, 0x5c,
-		0x78, 0, 0x94, 0xb4};
+	static const int channel_offsets[] = {
+		0, 0x1c, 0x38, 0x54, 0x58, 0x5c, 0x78, 0, 0x94, 0xb4
+	};
 	int i;
 
 	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-- 
2.33.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/imx: make static read-only array channel_offsets const
  2022-01-23 22:34 [PATCH] drm/imx: make static read-only array channel_offsets const Colin Ian King
@ 2022-03-29 16:52 ` Philipp Zabel
  0 siblings, 0 replies; 2+ messages in thread
From: Philipp Zabel @ 2022-03-29 16:52 UTC (permalink / raw)
  To: Colin Ian King, David Airlie, Daniel Vetter, dri-devel
  Cc: kernel-janitors, linux-kernel

On So, 2022-01-23 at 22:34 +0000, Colin Ian King wrote:
> The static array channel_offsets is read-only so it make sense to
> make
> it const.
> 
> Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
> ---
>  drivers/gpu/ipu-v3/ipu-dc.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/ipu-v3/ipu-dc.c b/drivers/gpu/ipu-v3/ipu-
> dc.c
> index ca96b235491a..b038a6d7307b 100644
> --- a/drivers/gpu/ipu-v3/ipu-dc.c
> +++ b/drivers/gpu/ipu-v3/ipu-dc.c
> @@ -344,8 +344,9 @@ int ipu_dc_init(struct ipu_soc *ipu, struct
> device *dev,
>                 unsigned long base, unsigned long template_base)
>  {
>         struct ipu_dc_priv *priv;
> -       static int channel_offsets[] = { 0, 0x1c, 0x38, 0x54, 0x58,
> 0x5c,
> -               0x78, 0, 0x94, 0xb4};
> +       static const int channel_offsets[] = {
> +               0, 0x1c, 0x38, 0x54, 0x58, 0x5c, 0x78, 0, 0x94, 0xb4
> +       };
>         int i;
>  
>         priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);

Thank you, applied to imx-drm/next.

regards
Philipp

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-03-29 16:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-23 22:34 [PATCH] drm/imx: make static read-only array channel_offsets const Colin Ian King
2022-03-29 16:52 ` Philipp Zabel

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.