[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d51599f7-0cd3-15e4-3faa-a85ffe593823@sakamocchi.jp>
Date: Tue, 15 Aug 2017 17:50:13 +0900
From: Takashi Sakamoto <o-takashi@...amocchi.jp>
To: Julia Lawall <Julia.Lawall@...6.fr>,
Clemens Ladisch <clemens@...isch.de>
Cc: alsa-devel@...a-project.org, kernel-janitors@...r.kernel.org,
linux-kernel@...r.kernel.org, Takashi Iwai <tiwai@...e.com>,
bhumirks@...il.com
Subject: Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops
structures
Hi,
On Aug 15 2017 17:09, Julia Lawall wrote:
> These snd_rawmidi_ops structures are only passed as the third
> argument of snd_rawmidi_set_ops. This argument is const, so the
> snd_rawmidi_ops structures can be const too.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@...6.fr>
>
> ---
> sound/firewire/motu/motu-midi.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/firewire/motu/motu-midi.c b/sound/firewire/motu/motu-midi.c
> index e3acfcc..e55cab6 100644
> --- a/sound/firewire/motu/motu-midi.c
> +++ b/sound/firewire/motu/motu-midi.c
> @@ -128,12 +128,12 @@ static void set_midi_substream_names(struct snd_motu *motu,
>
> int snd_motu_create_midi_devices(struct snd_motu *motu)
> {
> - static struct snd_rawmidi_ops capture_ops = {
> + static const struct snd_rawmidi_ops capture_ops = {
> .open = midi_capture_open,
> .close = midi_capture_close,
> .trigger = midi_capture_trigger,
> };
> - static struct snd_rawmidi_ops playback_ops = {
> + static const struct snd_rawmidi_ops playback_ops = {
> .open = midi_playback_open,
> .close = midi_playback_close,
> .trigger = midi_playback_trigger,
Reviewed-by: Takashi Sakamoto <o-takashi@...amocchi.jp>
Thanks
Takashi Sakamoto
Powered by blists - more mailing lists