constify copied structure
Subsystems (27)
cover constify copied structure
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(-)
PATCH 1/16 ALSA: ad1816a: constify copied structure
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.
--- sound/isa/ad1816a/ad1816a_lib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/isa/ad1816a/ad1816a_lib.c +1 -1
@@ -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 ,
Takashi Iwai
AppliedRe: [PATCH 01/16] ALSA: ad1816a: constify copied structure
Quoted 7 lines · Julia Lawall
The
snd_ad1816a_timer_tablestructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Applied, thanks.
Takashi
PATCH 2/16 ALSA: constify copied structure
In reply to Julia LawallThe azx_pcm_hw structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- sound/pci/hda/hda_controller.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/pci/hda/hda_controller.c +1 -1
@@ -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 |
Re: [PATCH 02/16] ALSA: constify copied structure
Quoted 7 lines · Julia Lawall
The
azx_pcm_hwstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Applied now. Thanks.
Takashi
PATCH 3/16 anysee: constify copied structure
In reply to Julia LawallThe 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.
--- drivers/media/usb/dvb-usb-v2/anysee.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/usb/dvb-usb-v2/anysee.c +2 -2
@@ -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 ,
PATCH 4/16 usb: gadget: udc: atmel: constify copied structure
In reply to Julia LawallThe usba_gadget_template structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/usb/gadget/udc/atmel_usba_udc.c +1 -1
@@ -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" ,
Re: [PATCH 04/16] usb: gadget: udc: atmel: constify copied structure
Quoted 6 lines · Julia Lawall
The
usba_gadget_templatestructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Quoted 19 lines
--- drivers/usb/gadget/udc/atmel_usba_udc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/usb/gadget/udc/atmel_usba_udc.c +1
-1@@ -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" ,
PATCH 5/16 media: isif: constify copied structure
In reply to Julia LawallThe isif_config_defaults structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/media/platform/davinci/isif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/platform/davinci/isif.c +1 -1
@@ -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 ,
Re: [PATCH 05/16] media: isif: constify copied structure
Quoted 8 lines · Julia Lawall
The
isif_config_defaultsstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Cheers,
--Prabhakar Lad
Quoted 18 lines
--- drivers/media/platform/davinci/isif.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/platform/davinci/isif.c +1
-1@@ -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 ,
PATCH 6/16 media: mt9v111: constify copied structure
In reply to Julia LawallThe mt9v111_def_fmt structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/media/i2c/mt9v111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/mt9v111.c +1 -1
@@ -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 ,
Re: [PATCH 06/16] media: mt9v111: constify copied structure
Hi Julia,
thanks for the patch
Quoted 6 lines · Julia Lawall
The
mt9v111_def_fmtstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Thanks
j
Quoted 19 lines
--- drivers/media/i2c/mt9v111.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/media/i2c/mt9v111.c +1
-1@@ -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 ,
PATCH 7/16 video: sa1100fb: constify copied structure
In reply to Julia LawallThe monspecs structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/video/fbdev/sa1100fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/video/fbdev/sa1100fb.c +1 -1
@@ -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 ,
Re: [PATCH 07/16] video: sa1100fb: constify copied structure
Quoted 6 lines · Julia Lawall
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 <[email protected]>
Patch queued for v5.6, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
Quoted 18 lines
--- drivers/video/fbdev/sa1100fb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/video/fbdev/sa1100fb.c +1
-1@@ -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 ,
PATCH 8/16 pinctrl: ssbi-mpp: constify copied structure
In reply to Julia LawallThe pm8xxx_pinctrl_desc structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-ssbi-mpp.c +1 -1
@@ -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,
Re: [PATCH 08/16] pinctrl: ssbi-mpp: constify copied structure
Quoted 6 lines · Julia Lawall
The
pm8xxx_pinctrl_descstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
That's a pretty cool semantic check finding things like this!
Patch applied.
Yours,
Linus Walleij
PATCH 9/16 powerpc/mpic: constify copied structure
In reply to Julia LawallThe 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.
--- arch/powerpc/sysdev/mpic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/powerpc/sysdev/mpic.c +2 -2
@@ -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,
Michael Ellerman
AppliedRe: [PATCH 09/16] powerpc/mpic: constify copied structure
Quoted 6 lines · Julia Lawall
The
mpic_ipi_chipandmpic_irq_ht_chipstructures are only copied into other structures, so make them const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/5084ff33cac0988c1b979814501dcc2e1ecbf9c0
cheers
PATCH 10/16 ASoC: qdsp6: q6asm-dai: constify copied structure
In reply to Julia LawallThe q6asm_dai_hardware_capture structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6asm-dai.c +1 -1
@@ -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 |
Mark Brown
maintainerApplied "ASoC: qdsp6: q6asm-dai: constify copied structure" to the asoc tree
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 <[email protected]>
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.
--- sound/soc/qcom/qdsp6/q6asm-dai.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/qcom/qdsp6/q6asm-dai.c +1 -1
@@ -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 |
Signature · 1 line
2.20.1
PATCH 11/16 media: cx231xx: constify copied structure
In reply to Julia LawallThe hauppauge_955q_lgdt3306a_config structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/media/usb/cx231xx/cx231xx-dvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/usb/cx231xx/cx231xx-dvb.c +1 -1
@@ -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 ,
PATCH 12/16 SUNRPC: constify copied structure
In reply to Julia LawallThe empty_iov structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- net/sunrpc/xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/sunrpc/xdr.c +1 -1
@@ -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)
PATCH 13/16 ptp: ptp_clockmatrix: constify copied structure
In reply to Julia LawallThe idtcm_caps structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/ptp/ptp_clockmatrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/ptp/ptp_clockmatrix.c +1 -1
@@ -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 ,
Re: [PATCH 13/16] ptp: ptp_clockmatrix: constify copied structure
Quoted 6 lines · Julia Lawall
The
idtcm_capsstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Re: [PATCH 13/16] ptp: ptp_clockmatrix: constify copied structure
In reply to Julia LawallFrom: Julia Lawall <[email protected]>
Date: Wed, 1 Jan 2020 08:43:31 +0100
Quoted 6 lines
The
idtcm_capsstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Applied to net-next.
PATCH 14/16 pinctrl: qcom: ssbi-gpio: constify copied structure
In reply to Julia LawallThe pm8xxx_pinctrl_desc structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/qcom/pinctrl-ssbi-gpio.c +1 -1
@@ -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,
Re: [PATCH 14/16] pinctrl: qcom: ssbi-gpio: constify copied structure
Quoted 6 lines · Julia Lawall
The
pm8xxx_pinctrl_descstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Patch applied.
Yours,
Linus Walleij
PATCH 15/16 drm: bridge: dw-hdmi: constify copied structure
In reply to Julia LawallThe dw_hdmi_hw structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +1 -1
@@ -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 |
Re: [PATCH 15/16] drm: bridge: dw-hdmi: constify copied structure
Hi Julia,
Thank you for the patch.
Quoted 6 lines · Julia Lawall
The
dw_hdmi_hwstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Quoted 17 lines
--- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +1
-1@@ -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 |
Signature · 3 lines
Regards, Laurent Pinchart
Neil Armstrong
AppliedRe: [PATCH 15/16] drm: bridge: dw-hdmi: constify copied structure
Quoted 26 lines · Laurent Pinchart
Hi Julia,
Thank you for the patch.
Quoted 6 lines · Julia Lawall
The
dw_hdmi_hwstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>Reviewed-by Laurent Pinchart <[email protected]>Quoted 12 lines
--- drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +0
-0@@ -291,7 +291,7 @@ static irqreturn_t snd_dw_hdmi_irq(int irq, void *data)return IRQ_HANDLED ; }
Quoted 6 lines
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c static irqreturn_t snd_dw_hdmi_irq(int irq, void *data) · line 297
Quoted 5 lines
drivers/gpu/drm/bridge/synopsys/dw-hdmi-ahb-audio.c +1
-1-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
PATCH 16/16 pinctrl: nuvoton: npcm7xx: constify copied structure
In reply to Julia LawallThe npcmgpio_irqchip structure is only copied into another structure, so make it const.
The opportunity for this change was found using Coccinelle.
--- drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/nuvoton/pinctrl-npcm7xx.c +1 -1
@@ -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,
Re: [PATCH 16/16] pinctrl: nuvoton: npcm7xx: constify copied structure
Quoted 6 lines · Julia Lawall
The
npcmgpio_irqchipstructure is only copied into another structure, so make it const.The opportunity for this change was found using Coccinelle.
Signed-off-by Julia Lawall <[email protected]>
Patch applied.
Yours,
Linus Walleij