kernel-hacking-2024-linux-s.../sound/firewire
Julia Lawall 5116ffc32d ALSA: firewire: constify snd_pcm_ops structures
Check for snd_pcm_ops structures that are only stored in the ops field of a
snd_soc_platform_driver structure or passed as the third argument to
snd_pcm_set_ops.  The corresponding field or parameter is declared const,
so snd_pcm_ops structures that have this property can be declared as const
also.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

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

@ok1@
identifier r.i;
struct snd_soc_platform_driver e;
position p;
@@
e.ops = &i@p;

@ok2@
identifier r.i;
expression e1, e2;
position p;
@@
snd_pcm_set_ops(e1, e2, &i@p)

@bad@
position p != {r.p,ok1.p,ok2.p};
identifier r.i;
struct snd_pcm_ops e;
@@
e@i@p

@depends on !bad disable optional_qualifier@
identifier r.i;
@@
static
+const
 struct snd_pcm_ops i = { ... };
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-09-02 11:50:11 +02:00
..
bebob ALSA: bebob: unify configurations for some models produced by Yamaha/Terratec 2016-08-24 15:35:11 +02:00
dice ALSA: firewire: constify snd_pcm_ops structures 2016-09-02 11:50:11 +02:00
digi00x ALSA: firewire: constify snd_pcm_ops structures 2016-09-02 11:50:11 +02:00
fireworks ALSA: fireworks: drop reuse of incoming packet parameter for ougoing packet parameter 2016-05-10 17:03:58 +02:00
oxfw ALSA: firewire: constify snd_pcm_ops structures 2016-09-02 11:50:11 +02:00
tascam ALSA: firewire: constify snd_pcm_ops structures 2016-09-02 11:50:11 +02:00
amdtp-am824.c ALSA: firewire-lib: process_rx_data_blocks() can be static 2015-09-29 16:52:52 +02:00
amdtp-am824.h ALSA: firewire-lib: complete AM824 data block processing layer 2015-09-29 12:51:20 +02:00
amdtp-stream-trace.h ALSA: firewire-lib: change a member of event structure to suppress sparse wanings to bool type 2016-05-18 16:32:09 +02:00
amdtp-stream.c ALSA: firewire-lib: drop skip argument from helper functions to queue a packet 2016-05-11 20:36:28 +02:00
amdtp-stream.h ALSA: firewire-lib: permit to flush queued packets only in process context for better PCM period granularity 2016-05-11 20:34:53 +02:00
cmp.c
cmp.h
fcp.c ALSA: firewire-lib: rename 'amdtp' to 'amdtp-stream' to prepare for functional separation 2015-09-29 12:47:11 +02:00
fcp.h
isight.c
iso-resources.c ALSA: firewire-lib: leave unit reference counting completely 2015-03-10 15:27:19 +01:00
iso-resources.h
Kconfig ALSA: firewire-tascam: add Kconfig entry for TASCAM FW-1804 2016-03-28 09:39:41 +02:00
lib.c ALSA: firewire-lib: add new function to schedule a work for sound card registration 2016-03-31 15:36:18 +02:00
lib.h ALSA: firewire-lib: add new function to schedule a work for sound card registration 2016-03-31 15:36:18 +02:00
Makefile ALSA: firewire-lib: add tracepoints to dump a part of isochronous packet data 2016-05-09 15:18:25 +02:00
packets-buffer.c
packets-buffer.h