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

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).