linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/16] constify copied structure
@ 2020-01-01  7:43 Julia Lawall
  2020-01-01  7:43 ` [PATCH 01/16] ALSA: ad1816a: " Julia Lawall
                   ` (15 more replies)
  0 siblings, 16 replies; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Jernej Skrabec
  Cc: kernel-janitors, Jonas Karlman, Laurent Pinchart, linuxppc-dev,
	linux-fbdev, dri-devel, linux-media, linux-kernel, alsa-devel,
	linux-arm-kernel, linux-usb, linux-arm-msm, linux-gpio,
	linux-nfs, netdev

Make const static structures that are just copied into other structures.

The semantic patch that detects the opportunity for this change is as
follows: (http://coccinelle.lip6.fr/)

<smpl>
@r disable optional_qualifier@
identifier i,j;
position p;
@@
static struct i j@p = { ... };

@upd@
position p1;
identifier r.j;
expression e;
@@
e = j@p1

@ref@
position p2 != {r.p,upd.p1};
identifier r.j;
@@
j@p2

@script:ocaml depends on upd && !ref@
i << r.i;
j << r.j;
p << r.p;
@@
if j = (List.hd p).current_element
then Coccilib.print_main i p
</smpl>

---

 arch/powerpc/sysdev/mpic.c                          |    4 ++--
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c |    2 +-
 drivers/media/i2c/mt9v111.c                         |    2 +-
 drivers/media/platform/davinci/isif.c               |    2 +-
 drivers/media/usb/cx231xx/cx231xx-dvb.c             |    2 +-
 drivers/media/usb/dvb-usb-v2/anysee.c               |    4 ++--
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c           |    2 +-
 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c            |    2 +-
 drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c             |    2 +-
 drivers/ptp/ptp_clockmatrix.c                       |    2 +-
 drivers/usb/gadget/udc/atmel_usba_udc.c             |    2 +-
 drivers/video/fbdev/sa1100fb.c                      |    2 +-
 net/sunrpc/xdr.c                                    |    2 +-
 sound/isa/ad1816a/ad1816a_lib.c                     |    2 +-
 sound/pci/hda/hda_controller.c                      |    2 +-
 sound/soc/qcom/qdsp6/q6asm-dai.c                    |    2 +-
 16 files changed, 18 insertions(+), 18 deletions(-)

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

* [PATCH 01/16] ALSA: ad1816a: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01 11:38   ` Takashi Iwai
  2020-01-01  7:43 ` [PATCH 02/16] ALSA: " Julia Lawall
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel

The snd_ad1816a_timer_table structure is only copied into
another structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 sound/isa/ad1816a/ad1816a_lib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index e1aa5372c483..da6f68b8c248 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -409,7 +409,7 @@ static int snd_ad1816a_timer_stop(struct snd_timer *timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_ad1816a_timer_table = {
+static const struct snd_timer_hardware snd_ad1816a_timer_table = {
 	.flags =	SNDRV_TIMER_HW_AUTO,
 	.resolution =	10000,
 	.ticks =	65535,


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

* [PATCH 02/16] ALSA: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
  2020-01-01  7:43 ` [PATCH 01/16] ALSA: ad1816a: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01 11:39   ` Takashi Iwai
  2020-01-01  7:43 ` [PATCH 03/16] [media] anysee: " Julia Lawall
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel

The azx_pcm_hw structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 sound/pci/hda/hda_controller.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index a74c85867eb3..9757667cdd58 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -548,7 +548,7 @@ static int azx_get_time_info(struct snd_pcm_substream *substream,
 	return 0;
 }
 
-static struct snd_pcm_hardware azx_pcm_hw = {
+static const struct snd_pcm_hardware azx_pcm_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP |
 				 SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_BLOCK_TRANSFER |


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

* [PATCH 03/16] [media] anysee: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
  2020-01-01  7:43 ` [PATCH 01/16] ALSA: ad1816a: " Julia Lawall
  2020-01-01  7:43 ` [PATCH 02/16] ALSA: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01  7:43 ` [PATCH 04/16] usb: gadget: udc: atmel: " Julia Lawall
                   ` (12 subsequent siblings)
  15 siblings, 0 replies; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Antti Palosaari
  Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, linux-kernel

The anysee_tda18212_config and anysee_tda18212_config2 structures
are only copied into other structures, so make them const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/usb/dvb-usb-v2/anysee.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c
index fb6d99dea31a..94b8d3e5d8f7 100644
--- a/drivers/media/usb/dvb-usb-v2/anysee.c
+++ b/drivers/media/usb/dvb-usb-v2/anysee.c
@@ -318,14 +318,14 @@ static struct tda10023_config anysee_tda10023_tda18212_config = {
 	.deltaf = 0xba02,
 };
 
-static struct tda18212_config anysee_tda18212_config = {
+static const struct tda18212_config anysee_tda18212_config = {
 	.if_dvbt_6 = 4150,
 	.if_dvbt_7 = 4150,
 	.if_dvbt_8 = 4150,
 	.if_dvbc = 5000,
 };
 
-static struct tda18212_config anysee_tda18212_config2 = {
+static const struct tda18212_config anysee_tda18212_config2 = {
 	.if_dvbt_6 = 3550,
 	.if_dvbt_7 = 3700,
 	.if_dvbt_8 = 4150,


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

* [PATCH 04/16] usb: gadget: udc: atmel: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (2 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 03/16] [media] anysee: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-06 11:16   ` Cristian.Birsan
  2020-01-01  7:43 ` [PATCH 05/16] media: isif: " Julia Lawall
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Cristian Birsan
  Cc: kernel-janitors, Felipe Balbi, Greg Kroah-Hartman, Nicolas Ferre,
	Alexandre Belloni, Ludovic Desroches, linux-arm-kernel,
	linux-usb, linux-kernel

The usba_gadget_template structure is only copied into another
structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/usb/gadget/udc/atmel_usba_udc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 8a42768e3213..6e0432141c40 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -1122,7 +1122,7 @@ static struct usb_endpoint_descriptor usba_ep0_desc = {
 	.bInterval = 1,
 };
 
-static struct usb_gadget usba_gadget_template = {
+static const struct usb_gadget usba_gadget_template = {
 	.ops		= &usba_udc_ops,
 	.max_speed	= USB_SPEED_HIGH,
 	.name		= "atmel_usba_udc",


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

* [PATCH 05/16] media: isif: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (3 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 04/16] usb: gadget: udc: atmel: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-09  7:13   ` Lad, Prabhakar
  2020-01-01  7:43 ` [PATCH 06/16] media: mt9v111: " Julia Lawall
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, linux-kernel

The isif_config_defaults structure is only copied into another
structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/platform/davinci/isif.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c
index b49378b18e5d..c98edb67cfb2 100644
--- a/drivers/media/platform/davinci/isif.c
+++ b/drivers/media/platform/davinci/isif.c
@@ -29,7 +29,7 @@
 #include "ccdc_hw_device.h"
 
 /* Defaults for module configuration parameters */
-static struct isif_config_params_raw isif_config_defaults = {
+static const struct isif_config_params_raw isif_config_defaults = {
 	.linearize = {
 		.en = 0,
 		.corr_shft = ISIF_NO_SHIFT,


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

* [PATCH 06/16] media: mt9v111: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (4 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 05/16] media: isif: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-02  8:11   ` Jacopo Mondi
  2020-01-01  7:43 ` [PATCH 07/16] video: sa1100fb: " Julia Lawall
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Jacopo Mondi
  Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, linux-kernel

The mt9v111_def_fmt structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/i2c/mt9v111.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
index bb41bea950ac..61ae6a0d5679 100644
--- a/drivers/media/i2c/mt9v111.c
+++ b/drivers/media/i2c/mt9v111.c
@@ -103,7 +103,7 @@
 #define MT9V111_MAX_CLKIN				27000000
 
 /* The default sensor configuration at startup time. */
-static struct v4l2_mbus_framefmt mt9v111_def_fmt = {
+static const struct v4l2_mbus_framefmt mt9v111_def_fmt = {
 	.width		= 640,
 	.height		= 480,
 	.code		= MEDIA_BUS_FMT_UYVY8_2X8,


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

* [PATCH 07/16] video: sa1100fb: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (5 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 06/16] media: mt9v111: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-15 16:04   ` Bartlomiej Zolnierkiewicz
  2020-01-01  7:43 ` [PATCH 08/16] pinctrl: ssbi-mpp: " Julia Lawall
                   ` (8 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: kernel-janitors, dri-devel, linux-fbdev, linux-kernel

The monspecs structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/video/fbdev/sa1100fb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c
index 4680cc3efb81..c77b43dbc256 100644
--- a/drivers/video/fbdev/sa1100fb.c
+++ b/drivers/video/fbdev/sa1100fb.c
@@ -1053,7 +1053,7 @@ static int sa1100fb_map_video_memory(struct sa1100fb_info *fbi)
 }
 
 /* Fake monspecs to fill in fbinfo structure */
-static struct fb_monspecs monspecs = {
+static const struct fb_monspecs monspecs = {
 	.hfmin	= 30000,
 	.hfmax	= 70000,
 	.vfmin	= 50,


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

* [PATCH 08/16] pinctrl: ssbi-mpp: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (6 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 07/16] video: sa1100fb: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-07 10:43   ` Linus Walleij
  2020-01-01  7:43 ` [PATCH 09/16] powerpc/mpic: " Julia Lawall
                   ` (7 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Andy Gross
  Cc: kernel-janitors, Bjorn Andersson, Linus Walleij, linux-arm-msm,
	linux-gpio, linux-kernel

The pm8xxx_pinctrl_desc structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
index 3d8b1d74fa2f..681d8dcf37e3 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c
@@ -430,7 +430,7 @@ static const struct pinconf_ops pm8xxx_pinconf_ops = {
 	.pin_config_group_set = pm8xxx_pin_config_set,
 };
 
-static struct pinctrl_desc pm8xxx_pinctrl_desc = {
+static const struct pinctrl_desc pm8xxx_pinctrl_desc = {
 	.name = "pm8xxx_mpp",
 	.pctlops = &pm8xxx_pinctrl_ops,
 	.pmxops = &pm8xxx_pinmux_ops,


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

* [PATCH 09/16] powerpc/mpic: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (7 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 08/16] pinctrl: ssbi-mpp: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-29  5:17   ` Michael Ellerman
  2020-01-01  7:43 ` [PATCH 10/16] ASoC: qdsp6: q6asm-dai: " Julia Lawall
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Benjamin Herrenschmidt
  Cc: kernel-janitors, Paul Mackerras, Michael Ellerman, linuxppc-dev,
	linux-kernel

The mpic_ipi_chip and mpic_irq_ht_chip structures are only copied
into other structures, so make them const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 arch/powerpc/sysdev/mpic.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index 934a77324f6b..a3a72b780e67 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -964,7 +964,7 @@ static struct irq_chip mpic_irq_chip = {
 };
 
 #ifdef CONFIG_SMP
-static struct irq_chip mpic_ipi_chip = {
+static const struct irq_chip mpic_ipi_chip = {
 	.irq_mask	= mpic_mask_ipi,
 	.irq_unmask	= mpic_unmask_ipi,
 	.irq_eoi	= mpic_end_ipi,
@@ -978,7 +978,7 @@ static struct irq_chip mpic_tm_chip = {
 };
 
 #ifdef CONFIG_MPIC_U3_HT_IRQS
-static struct irq_chip mpic_irq_ht_chip = {
+static const struct irq_chip mpic_irq_ht_chip = {
 	.irq_startup	= mpic_startup_ht_irq,
 	.irq_shutdown	= mpic_shutdown_ht_irq,
 	.irq_mask	= mpic_mask_irq,


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

* [PATCH 10/16] ASoC: qdsp6: q6asm-dai: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (8 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 09/16] powerpc/mpic: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01 21:41   ` Applied "ASoC: qdsp6: q6asm-dai: constify copied structure" to the asoc tree Mark Brown
  2020-01-01  7:43 ` [PATCH 11/16] media: cx231xx: constify copied structure Julia Lawall
                   ` (5 subsequent siblings)
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Patrick Lai
  Cc: kernel-janitors, Banajit Goswami, Liam Girdwood, Mark Brown,
	Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel

The q6asm_dai_hardware_capture structure is only copied into another
structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 sound/soc/qcom/qdsp6/q6asm-dai.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
index 5e2327708772..c0d422d0ab94 100644
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -72,7 +72,7 @@ struct q6asm_dai_data {
 	long long int sid;
 };
 
-static struct snd_pcm_hardware q6asm_dai_hardware_capture = {
+static const struct snd_pcm_hardware q6asm_dai_hardware_capture = {
 	.info =                 (SNDRV_PCM_INFO_MMAP |
 				SNDRV_PCM_INFO_BLOCK_TRANSFER |
 				SNDRV_PCM_INFO_MMAP_VALID |


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

* [PATCH 11/16] media: cx231xx: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (9 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 10/16] ASoC: qdsp6: q6asm-dai: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01  7:43 ` [PATCH 12/16] SUNRPC: " Julia Lawall
                   ` (4 subsequent siblings)
  15 siblings, 0 replies; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Mauro Carvalho Chehab; +Cc: kernel-janitors, linux-media, linux-kernel

The hauppauge_955q_lgdt3306a_config structure is only copied
into another structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/media/usb/cx231xx/cx231xx-dvb.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index e205f7f0a56a..0037b4b1381e 100644
--- a/drivers/media/usb/cx231xx/cx231xx-dvb.c
+++ b/drivers/media/usb/cx231xx/cx231xx-dvb.c
@@ -147,7 +147,7 @@ static struct tda18271_config pv_tda18271_config = {
 	.small_i2c = TDA18271_03_BYTE_CHUNK_INIT,
 };
 
-static struct lgdt3306a_config hauppauge_955q_lgdt3306a_config = {
+static const struct lgdt3306a_config hauppauge_955q_lgdt3306a_config = {
 	.qam_if_khz         = 4000,
 	.vsb_if_khz         = 3250,
 	.spectral_inversion = 1,


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

* [PATCH 12/16] SUNRPC: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (10 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 11/16] media: cx231xx: constify copied structure Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01  7:43 ` [PATCH 13/16] ptp: ptp_clockmatrix: " Julia Lawall
                   ` (3 subsequent siblings)
  15 siblings, 0 replies; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: kernel-janitors, Chuck Lever, Trond Myklebust, Anna Schumaker,
	David S. Miller, linux-nfs, netdev, linux-kernel

The empty_iov structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 net/sunrpc/xdr.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sunrpc/xdr.c b/net/sunrpc/xdr.c
index f3104be8ff5d..e5497dc2475b 100644
--- a/net/sunrpc/xdr.c
+++ b/net/sunrpc/xdr.c
@@ -1079,7 +1079,7 @@ void xdr_enter_page(struct xdr_stream *xdr, unsigned int len)
 }
 EXPORT_SYMBOL_GPL(xdr_enter_page);
 
-static struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0};
+static const struct kvec empty_iov = {.iov_base = NULL, .iov_len = 0};
 
 void
 xdr_buf_from_iov(struct kvec *iov, struct xdr_buf *buf)


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

* [PATCH 13/16] ptp: ptp_clockmatrix: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (11 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 12/16] SUNRPC: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01 15:43   ` Richard Cochran
  2020-01-03  0:31   ` David Miller
  2020-01-01  7:43 ` [PATCH 14/16] pinctrl: qcom: ssbi-gpio: " Julia Lawall
                   ` (2 subsequent siblings)
  15 siblings, 2 replies; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Richard Cochran; +Cc: kernel-janitors, netdev, linux-kernel

The idtcm_caps structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/ptp/ptp_clockmatrix.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ptp_clockmatrix.c
index a5110b7b4ece..e85836715f0b 100644
--- a/drivers/ptp/ptp_clockmatrix.c
+++ b/drivers/ptp/ptp_clockmatrix.c
@@ -1102,7 +1102,7 @@ static void idtcm_display_version_info(struct idtcm *idtcm)
 		 product_id, hw_rev_id, bond_id, csr_id, irq_id);
 }
 
-static struct ptp_clock_info idtcm_caps = {
+static const struct ptp_clock_info idtcm_caps = {
 	.owner		= THIS_MODULE,
 	.max_adj	= 244000,
 	.n_per_out	= 1,


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

* [PATCH 14/16] pinctrl: qcom: ssbi-gpio: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (12 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 13/16] ptp: ptp_clockmatrix: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-07 10:44   ` Linus Walleij
  2020-01-01  7:43 ` [PATCH 15/16] drm: bridge: dw-hdmi: " Julia Lawall
  2020-01-01  7:43 ` [PATCH 16/16] pinctrl: nuvoton: npcm7xx: " Julia Lawall
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: kernel-janitors, Andy Gross, Linus Walleij, linux-arm-msm,
	linux-gpio, linux-kernel

The pm8xxx_pinctrl_desc structure is only copied into another
structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
index dca86886b1f9..c7912135bbfb 100644
--- a/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
+++ b/drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c
@@ -439,7 +439,7 @@ static const struct pinconf_ops pm8xxx_pinconf_ops = {
 	.pin_config_group_set = pm8xxx_pin_config_set,
 };
 
-static struct pinctrl_desc pm8xxx_pinctrl_desc = {
+static const struct pinctrl_desc pm8xxx_pinctrl_desc = {
 	.name = "pm8xxx_gpio",
 	.pctlops = &pm8xxx_pinctrl_ops,
 	.pmxops = &pm8xxx_pinmux_ops,


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

* [PATCH 15/16] drm: bridge: dw-hdmi: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (13 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 14/16] pinctrl: qcom: ssbi-gpio: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-01 14:52   ` Laurent Pinchart
  2020-01-01  7:43 ` [PATCH 16/16] pinctrl: nuvoton: npcm7xx: " Julia Lawall
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Andrzej Hajda
  Cc: kernel-janitors, Neil Armstrong, Laurent Pinchart, Jonas Karlman,
	Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
	linux-kernel

The dw_hdmi_hw structure is only copied into another structure,
so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
index 2b7539701b42..dd56996fe9c7 100644
--- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
+++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
@@ -291,7 +291,7 @@ static irqreturn_t snd_dw_hdmi_irq(int irq, void *data)
 	return IRQ_HANDLED;
 }
 
-static struct snd_pcm_hardware dw_hdmi_hw = {
+static const struct snd_pcm_hardware dw_hdmi_hw = {
 	.info = SNDRV_PCM_INFO_INTERLEAVED |
 		SNDRV_PCM_INFO_BLOCK_TRANSFER |
 		SNDRV_PCM_INFO_MMAP |


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

* [PATCH 16/16] pinctrl: nuvoton: npcm7xx: constify copied structure
  2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
                   ` (14 preceding siblings ...)
  2020-01-01  7:43 ` [PATCH 15/16] drm: bridge: dw-hdmi: " Julia Lawall
@ 2020-01-01  7:43 ` Julia Lawall
  2020-01-07 10:45   ` Linus Walleij
  15 siblings, 1 reply; 32+ messages in thread
From: Julia Lawall @ 2020-01-01  7:43 UTC (permalink / raw)
  To: Linus Walleij; +Cc: kernel-janitors, linux-gpio, linux-kernel

The npcmgpio_irqchip structure is only copied into another
structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

---
 drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
index 22077cbe6880..a935065cdac4 100644
--- a/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
+++ b/drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c
@@ -331,7 +331,7 @@ static unsigned int npcmgpio_irq_startup(struct irq_data *d)
 	return 0;
 }
 
-static struct irq_chip npcmgpio_irqchip = {
+static const struct irq_chip npcmgpio_irqchip = {
 	.name = "NPCM7XX-GPIO-IRQ",
 	.irq_ack = npcmgpio_irq_ack,
 	.irq_unmask = npcmgpio_irq_unmask,


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

* Re: [PATCH 01/16] ALSA: ad1816a: constify copied structure
  2020-01-01  7:43 ` [PATCH 01/16] ALSA: ad1816a: " Julia Lawall
@ 2020-01-01 11:38   ` Takashi Iwai
  0 siblings, 0 replies; 32+ messages in thread
From: Takashi Iwai @ 2020-01-01 11:38 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Jaroslav Kysela, kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel

On Wed, 01 Jan 2020 08:43:19 +0100,
Julia Lawall wrote:
> 
> The snd_ad1816a_timer_table structure is only copied into
> another structure, so make it const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied, thanks.


Takashi

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

* Re: [PATCH 02/16] ALSA: constify copied structure
  2020-01-01  7:43 ` [PATCH 02/16] ALSA: " Julia Lawall
@ 2020-01-01 11:39   ` Takashi Iwai
  0 siblings, 0 replies; 32+ messages in thread
From: Takashi Iwai @ 2020-01-01 11:39 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Jaroslav Kysela, kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel

On Wed, 01 Jan 2020 08:43:20 +0100,
Julia Lawall wrote:
> 
> The azx_pcm_hw structure is only copied into another structure,
> so make it const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied now.  Thanks.


Takashi

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

* Re: [PATCH 15/16] drm: bridge: dw-hdmi: constify copied structure
  2020-01-01  7:43 ` [PATCH 15/16] drm: bridge: dw-hdmi: " Julia Lawall
@ 2020-01-01 14:52   ` Laurent Pinchart
  2020-01-06 14:40     ` Neil Armstrong
  0 siblings, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-01-01 14:52 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Andrzej Hajda, kernel-janitors, Neil Armstrong, Jonas Karlman,
	Jernej Skrabec, David Airlie, Daniel Vetter, dri-devel,
	linux-kernel

Hi Julia,

Thank you for the patch.

On Wed, Jan 01, 2020 at 08:43:33AM +0100, Julia Lawall wrote:
> The dw_hdmi_hw structure is only copied into another structure,
> so make it const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
> index 2b7539701b42..dd56996fe9c7 100644
> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
> @@ -291,7 +291,7 @@ static irqreturn_t snd_dw_hdmi_irq(int irq, void *data)
>  	return IRQ_HANDLED;
>  }
>  
> -static struct snd_pcm_hardware dw_hdmi_hw = {
> +static const struct snd_pcm_hardware dw_hdmi_hw = {
>  	.info = SNDRV_PCM_INFO_INTERLEAVED |
>  		SNDRV_PCM_INFO_BLOCK_TRANSFER |
>  		SNDRV_PCM_INFO_MMAP |

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 13/16] ptp: ptp_clockmatrix: constify copied structure
  2020-01-01  7:43 ` [PATCH 13/16] ptp: ptp_clockmatrix: " Julia Lawall
@ 2020-01-01 15:43   ` Richard Cochran
  2020-01-03  0:31   ` David Miller
  1 sibling, 0 replies; 32+ messages in thread
From: Richard Cochran @ 2020-01-01 15:43 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, netdev, linux-kernel

On Wed, Jan 01, 2020 at 08:43:31AM +0100, Julia Lawall wrote:
> The idtcm_caps structure is only copied into another structure,
> so make it const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Acked-by: Richard Cochran <richardcochran@gmail.com>

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

* Applied "ASoC: qdsp6: q6asm-dai: constify copied structure" to the asoc tree
  2020-01-01  7:43 ` [PATCH 10/16] ASoC: qdsp6: q6asm-dai: " Julia Lawall
@ 2020-01-01 21:41   ` Mark Brown
  0 siblings, 0 replies; 32+ messages in thread
From: Mark Brown @ 2020-01-01 21:41 UTC (permalink / raw)
  To: Julia Lawall
  Cc: alsa-devel, Banajit Goswami, kernel-janitors, Liam Girdwood,
	linux-kernel, Mark Brown, Patrick Lai, Takashi Iwai

The patch

   ASoC: qdsp6: q6asm-dai: constify copied structure

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 0da390ba86d841b1f9770c0a67bdebb4d8dc8be5 Mon Sep 17 00:00:00 2001
From: Julia Lawall <Julia.Lawall@inria.fr>
Date: Wed, 1 Jan 2020 08:43:28 +0100
Subject: [PATCH] ASoC: qdsp6: q6asm-dai: constify copied structure

The q6asm_dai_hardware_capture structure is only copied into another
structure, so make it const.

The opportunity for this change was found using Coccinelle.

Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
Link: https://lore.kernel.org/r/1577864614-5543-11-git-send-email-Julia.Lawall@inria.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/qcom/qdsp6/q6asm-dai.c b/sound/soc/qcom/qdsp6/q6asm-dai.c
index 5e2327708772..c0d422d0ab94 100644
--- a/sound/soc/qcom/qdsp6/q6asm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6asm-dai.c
@@ -72,7 +72,7 @@ struct q6asm_dai_data {
 	long long int sid;
 };
 
-static struct snd_pcm_hardware q6asm_dai_hardware_capture = {
+static const struct snd_pcm_hardware q6asm_dai_hardware_capture = {
 	.info =                 (SNDRV_PCM_INFO_MMAP |
 				SNDRV_PCM_INFO_BLOCK_TRANSFER |
 				SNDRV_PCM_INFO_MMAP_VALID |
-- 
2.20.1


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

* Re: [PATCH 06/16] media: mt9v111: constify copied structure
  2020-01-01  7:43 ` [PATCH 06/16] media: mt9v111: " Julia Lawall
@ 2020-01-02  8:11   ` Jacopo Mondi
  0 siblings, 0 replies; 32+ messages in thread
From: Jacopo Mondi @ 2020-01-02  8:11 UTC (permalink / raw)
  To: Julia Lawall
  Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 982 bytes --]

Hi Julia,
   thanks for the patch

On Wed, Jan 01, 2020 at 08:43:24AM +0100, Julia Lawall wrote:
> The mt9v111_def_fmt structure is only copied into another structure,
> so make it const.
>
> The opportunity for this change was found using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Acked-by: Jacopo Mondi <jacopo+renesas@jmondi.org>

Thanks
   j

>
> ---
>  drivers/media/i2c/mt9v111.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/i2c/mt9v111.c b/drivers/media/i2c/mt9v111.c
> index bb41bea950ac..61ae6a0d5679 100644
> --- a/drivers/media/i2c/mt9v111.c
> +++ b/drivers/media/i2c/mt9v111.c
> @@ -103,7 +103,7 @@
>  #define MT9V111_MAX_CLKIN				27000000
>
>  /* The default sensor configuration at startup time. */
> -static struct v4l2_mbus_framefmt mt9v111_def_fmt = {
> +static const struct v4l2_mbus_framefmt mt9v111_def_fmt = {
>  	.width		= 640,
>  	.height		= 480,
>  	.code		= MEDIA_BUS_FMT_UYVY8_2X8,
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 13/16] ptp: ptp_clockmatrix: constify copied structure
  2020-01-01  7:43 ` [PATCH 13/16] ptp: ptp_clockmatrix: " Julia Lawall
  2020-01-01 15:43   ` Richard Cochran
@ 2020-01-03  0:31   ` David Miller
  1 sibling, 0 replies; 32+ messages in thread
From: David Miller @ 2020-01-03  0:31 UTC (permalink / raw)
  To: Julia.Lawall; +Cc: richardcochran, kernel-janitors, netdev, linux-kernel

From: Julia Lawall <Julia.Lawall@inria.fr>
Date: Wed,  1 Jan 2020 08:43:31 +0100

> The idtcm_caps structure is only copied into another structure,
> so make it const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied to net-next.

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

* Re: [PATCH 04/16] usb: gadget: udc: atmel: constify copied structure
  2020-01-01  7:43 ` [PATCH 04/16] usb: gadget: udc: atmel: " Julia Lawall
@ 2020-01-06 11:16   ` Cristian.Birsan
  0 siblings, 0 replies; 32+ messages in thread
From: Cristian.Birsan @ 2020-01-06 11:16 UTC (permalink / raw)
  To: Julia.Lawall
  Cc: kernel-janitors, balbi, gregkh, Nicolas.Ferre, alexandre.belloni,
	Ludovic.Desroches, linux-arm-kernel, linux-usb, linux-kernel


On 1/1/20 9:43 AM, Julia Lawall wrote:

> The usba_gadget_template structure is only copied into another
> structure, so make it const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Acked-by: Cristian Birsan <cristian.birsan@microchip.com>

> 
> ---
>   drivers/usb/gadget/udc/atmel_usba_udc.c |    2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> index 8a42768e3213..6e0432141c40 100644
> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> @@ -1122,7 +1122,7 @@ static struct usb_endpoint_descriptor usba_ep0_desc = {
>          .bInterval = 1,
>   };
> 
> -static struct usb_gadget usba_gadget_template = {
> +static const struct usb_gadget usba_gadget_template = {
>          .ops            = &usba_udc_ops,
>          .max_speed      = USB_SPEED_HIGH,
>          .name           = "atmel_usba_udc",
> 

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

* Re: [PATCH 15/16] drm: bridge: dw-hdmi: constify copied structure
  2020-01-01 14:52   ` Laurent Pinchart
@ 2020-01-06 14:40     ` Neil Armstrong
  0 siblings, 0 replies; 32+ messages in thread
From: Neil Armstrong @ 2020-01-06 14:40 UTC (permalink / raw)
  To: Laurent Pinchart, Julia Lawall
  Cc: Andrzej Hajda, kernel-janitors, Jonas Karlman, Jernej Skrabec,
	David Airlie, Daniel Vetter, dri-devel, linux-kernel

On 01/01/2020 15:52, Laurent Pinchart wrote:
> Hi Julia,
> 
> Thank you for the patch.
> 
> On Wed, Jan 01, 2020 at 08:43:33AM +0100, Julia Lawall wrote:
>> The dw_hdmi_hw structure is only copied into another structure,
>> so make it const.
>>
>> The opportunity for this change was found using Coccinelle.
>>
>> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
>> ---
>>  drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
>> index 2b7539701b42..dd56996fe9c7 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c
>> @@ -291,7 +291,7 @@ static irqreturn_t snd_dw_hdmi_irq(int irq, void *data)
>>  	return IRQ_HANDLED;
>>  }
>>  
>> -static struct snd_pcm_hardware dw_hdmi_hw = {
>> +static const struct snd_pcm_hardware dw_hdmi_hw = {
>>  	.info = SNDRV_PCM_INFO_INTERLEAVED |
>>  		SNDRV_PCM_INFO_BLOCK_TRANSFER |
>>  		SNDRV_PCM_INFO_MMAP |
> 

Applied to drm-misc-next

Neil

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

* Re: [PATCH 08/16] pinctrl: ssbi-mpp: constify copied structure
  2020-01-01  7:43 ` [PATCH 08/16] pinctrl: ssbi-mpp: " Julia Lawall
@ 2020-01-07 10:43   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2020-01-07 10:43 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Andy Gross, kernel-janitors, Bjorn Andersson, MSM,
	open list:GPIO SUBSYSTEM, linux-kernel

On Wed, Jan 1, 2020 at 9:20 AM Julia Lawall <Julia.Lawall@inria.fr> wrote:

> The pm8xxx_pinctrl_desc structure is only copied into another structure,
> so make it const.
>
> The opportunity for this change was found using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

That's a pretty cool semantic check finding things like this!

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 14/16] pinctrl: qcom: ssbi-gpio: constify copied structure
  2020-01-01  7:43 ` [PATCH 14/16] pinctrl: qcom: ssbi-gpio: " Julia Lawall
@ 2020-01-07 10:44   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2020-01-07 10:44 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Bjorn Andersson, kernel-janitors, Andy Gross, MSM,
	open list:GPIO SUBSYSTEM, linux-kernel

On Wed, Jan 1, 2020 at 9:20 AM Julia Lawall <Julia.Lawall@inria.fr> wrote:

> The pm8xxx_pinctrl_desc structure is only copied into another
> structure, so make it const.
>
> The opportunity for this change was found using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 16/16] pinctrl: nuvoton: npcm7xx: constify copied structure
  2020-01-01  7:43 ` [PATCH 16/16] pinctrl: nuvoton: npcm7xx: " Julia Lawall
@ 2020-01-07 10:45   ` Linus Walleij
  0 siblings, 0 replies; 32+ messages in thread
From: Linus Walleij @ 2020-01-07 10:45 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, open list:GPIO SUBSYSTEM, linux-kernel

On Wed, Jan 1, 2020 at 9:20 AM Julia Lawall <Julia.Lawall@inria.fr> wrote:

> The npcmgpio_irqchip structure is only copied into another
> structure, so make it const.
>
> The opportunity for this change was found using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Patch applied.

Yours,
Linus Walleij

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

* Re: [PATCH 05/16] media: isif: constify copied structure
  2020-01-01  7:43 ` [PATCH 05/16] media: isif: " Julia Lawall
@ 2020-01-09  7:13   ` Lad, Prabhakar
  0 siblings, 0 replies; 32+ messages in thread
From: Lad, Prabhakar @ 2020-01-09  7:13 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, Mauro Carvalho Chehab, linux-media, LKML

On Wed, Jan 1, 2020 at 8:20 AM Julia Lawall <Julia.Lawall@inria.fr> wrote:
>
> The isif_config_defaults structure is only copied into another
> structure, so make it const.
>
> The opportunity for this change was found using Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>
>

Acked-by: Lad Prabhakar <prabhakar.csengg@gmail.com>

Cheers,
--Prabhakar Lad

> ---
>  drivers/media/platform/davinci/isif.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/media/platform/davinci/isif.c b/drivers/media/platform/davinci/isif.c
> index b49378b18e5d..c98edb67cfb2 100644
> --- a/drivers/media/platform/davinci/isif.c
> +++ b/drivers/media/platform/davinci/isif.c
> @@ -29,7 +29,7 @@
>  #include "ccdc_hw_device.h"
>
>  /* Defaults for module configuration parameters */
> -static struct isif_config_params_raw isif_config_defaults = {
> +static const struct isif_config_params_raw isif_config_defaults = {
>         .linearize = {
>                 .en = 0,
>                 .corr_shft = ISIF_NO_SHIFT,
>

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

* Re: [PATCH 07/16] video: sa1100fb: constify copied structure
  2020-01-01  7:43 ` [PATCH 07/16] video: sa1100fb: " Julia Lawall
@ 2020-01-15 16:04   ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 32+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2020-01-15 16:04 UTC (permalink / raw)
  To: Julia Lawall; +Cc: kernel-janitors, dri-devel, linux-fbdev, linux-kernel


On 1/1/20 8:43 AM, Julia Lawall wrote:
> The monspecs structure is only copied into another structure,
> so make it const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Patch queued for v5.6, thanks.
 
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

> ---
>  drivers/video/fbdev/sa1100fb.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/video/fbdev/sa1100fb.c b/drivers/video/fbdev/sa1100fb.c
> index 4680cc3efb81..c77b43dbc256 100644
> --- a/drivers/video/fbdev/sa1100fb.c
> +++ b/drivers/video/fbdev/sa1100fb.c
> @@ -1053,7 +1053,7 @@ static int sa1100fb_map_video_memory(struct sa1100fb_info *fbi)
>  }
>  
>  /* Fake monspecs to fill in fbinfo structure */
> -static struct fb_monspecs monspecs = {
> +static const struct fb_monspecs monspecs = {
>  	.hfmin	= 30000,
>  	.hfmax	= 70000,
>  	.vfmin	= 50,
> 

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

* Re: [PATCH 09/16] powerpc/mpic: constify copied structure
  2020-01-01  7:43 ` [PATCH 09/16] powerpc/mpic: " Julia Lawall
@ 2020-01-29  5:17   ` Michael Ellerman
  0 siblings, 0 replies; 32+ messages in thread
From: Michael Ellerman @ 2020-01-29  5:17 UTC (permalink / raw)
  To: Julia Lawall, Benjamin Herrenschmidt
  Cc: Paul Mackerras, kernel-janitors, linuxppc-dev, linux-kernel

On Wed, 2020-01-01 at 07:43:27 UTC, Julia Lawall wrote:
> The mpic_ipi_chip and mpic_irq_ht_chip structures are only copied
> into other structures, so make them const.
> 
> The opportunity for this change was found using Coccinelle.
> 
> Signed-off-by: Julia Lawall <Julia.Lawall@inria.fr>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/5084ff33cac0988c1b979814501dcc2e1ecbf9c0

cheers

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

end of thread, other threads:[~2020-01-29  5:17 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-01  7:43 [PATCH 00/16] constify copied structure Julia Lawall
2020-01-01  7:43 ` [PATCH 01/16] ALSA: ad1816a: " Julia Lawall
2020-01-01 11:38   ` Takashi Iwai
2020-01-01  7:43 ` [PATCH 02/16] ALSA: " Julia Lawall
2020-01-01 11:39   ` Takashi Iwai
2020-01-01  7:43 ` [PATCH 03/16] [media] anysee: " Julia Lawall
2020-01-01  7:43 ` [PATCH 04/16] usb: gadget: udc: atmel: " Julia Lawall
2020-01-06 11:16   ` Cristian.Birsan
2020-01-01  7:43 ` [PATCH 05/16] media: isif: " Julia Lawall
2020-01-09  7:13   ` Lad, Prabhakar
2020-01-01  7:43 ` [PATCH 06/16] media: mt9v111: " Julia Lawall
2020-01-02  8:11   ` Jacopo Mondi
2020-01-01  7:43 ` [PATCH 07/16] video: sa1100fb: " Julia Lawall
2020-01-15 16:04   ` Bartlomiej Zolnierkiewicz
2020-01-01  7:43 ` [PATCH 08/16] pinctrl: ssbi-mpp: " Julia Lawall
2020-01-07 10:43   ` Linus Walleij
2020-01-01  7:43 ` [PATCH 09/16] powerpc/mpic: " Julia Lawall
2020-01-29  5:17   ` Michael Ellerman
2020-01-01  7:43 ` [PATCH 10/16] ASoC: qdsp6: q6asm-dai: " Julia Lawall
2020-01-01 21:41   ` Applied "ASoC: qdsp6: q6asm-dai: constify copied structure" to the asoc tree Mark Brown
2020-01-01  7:43 ` [PATCH 11/16] media: cx231xx: constify copied structure Julia Lawall
2020-01-01  7:43 ` [PATCH 12/16] SUNRPC: " Julia Lawall
2020-01-01  7:43 ` [PATCH 13/16] ptp: ptp_clockmatrix: " Julia Lawall
2020-01-01 15:43   ` Richard Cochran
2020-01-03  0:31   ` David Miller
2020-01-01  7:43 ` [PATCH 14/16] pinctrl: qcom: ssbi-gpio: " Julia Lawall
2020-01-07 10:44   ` Linus Walleij
2020-01-01  7:43 ` [PATCH 15/16] drm: bridge: dw-hdmi: " Julia Lawall
2020-01-01 14:52   ` Laurent Pinchart
2020-01-06 14:40     ` Neil Armstrong
2020-01-01  7:43 ` [PATCH 16/16] pinctrl: nuvoton: npcm7xx: " Julia Lawall
2020-01-07 10:45   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).