Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1711956 > unrolled thread

[PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2017-08-15 10:40 +0200
Last post2017-08-15 14:10 +0200
Articles 6 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2017-08-15 10:40 +0200
    Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops  structures Takashi Sakamoto <o-takashi@sakamocchi.jp> - 2017-08-15 11:00 +0200
    Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures Takashi Iwai <tiwai@suse.de> - 2017-08-15 11:00 +0200
      Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops  structures Julia Lawall <julia.lawall@lip6.fr> - 2017-08-15 11:10 +0200
        Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures Takashi Iwai <tiwai@suse.de> - 2017-08-15 11:30 +0200
    Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures Takashi Iwai <tiwai@suse.de> - 2017-08-15 14:10 +0200

#1711956 — [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2017-08-15 10:40 +0200
Subject[PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures
Message-ID<ueFyi-7nU-7@gated-at.bofh.it>
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@lip6.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,

[toc] | [next] | [standalone]


#1711972 — Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures

FromTakashi Sakamoto <o-takashi@sakamocchi.jp>
Date2017-08-15 11:00 +0200
SubjectRe: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures
Message-ID<ueFRD-7wU-1@gated-at.bofh.it>
In reply to#1711956
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@lip6.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@sakamocchi.jp>


Thanks

Takashi Sakamoto

[toc] | [prev] | [next] | [standalone]


#1711976

FromTakashi Iwai <tiwai@suse.de>
Date2017-08-15 11:00 +0200
Message-ID<ueFRE-7wU-25@gated-at.bofh.it>
In reply to#1711956
On Tue, 15 Aug 2017 10:09:54 +0200,
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@lip6.fr>

What are other two patches?  Since I haven't received a cover letter,
no idea whether I overlooked them or not relevant with my tree...


thanks,

Takashi

[toc] | [prev] | [next] | [standalone]


#1711982 — Re: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures

FromJulia Lawall <julia.lawall@lip6.fr>
Date2017-08-15 11:10 +0200
SubjectRe: [PATCH 3/3] ALSA: firewire-motu: constify snd_rawmidi_ops structures
Message-ID<ueG1k-7QP-15@gated-at.bofh.it>
In reply to#1711976

On Tue, 15 Aug 2017, Takashi Iwai wrote:

> On Tue, 15 Aug 2017 10:09:54 +0200,
> 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@lip6.fr>
>
> What are other two patches?  Since I haven't received a cover letter,
> no idea whether I overlooked them or not relevant with my tree...

Oops, I forgot to make a cover letter for this.  The others are:

drivers/hid/hid-prodikeys.c
drivers/usb/gadget/function/f_midi.c

julia

[toc] | [prev] | [next] | [standalone]


#1712005

FromTakashi Iwai <tiwai@suse.de>
Date2017-08-15 11:30 +0200
Message-ID<ueGkF-7Xk-5@gated-at.bofh.it>
In reply to#1711982
On Tue, 15 Aug 2017 11:00:17 +0200,
Julia Lawall wrote:
> 
> 
> 
> On Tue, 15 Aug 2017, Takashi Iwai wrote:
> 
> > On Tue, 15 Aug 2017 10:09:54 +0200,
> > 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@lip6.fr>
> >
> > What are other two patches?  Since I haven't received a cover letter,
> > no idea whether I overlooked them or not relevant with my tree...
> 
> Oops, I forgot to make a cover letter for this.  The others are:
> 
> drivers/hid/hid-prodikeys.c
> drivers/usb/gadget/function/f_midi.c

OK, thanks!


Takashi

[toc] | [prev] | [next] | [standalone]


#1712120

FromTakashi Iwai <tiwai@suse.de>
Date2017-08-15 14:10 +0200
Message-ID<ueIPv-19O-7@gated-at.bofh.it>
In reply to#1711956
On Tue, 15 Aug 2017 10:09:54 +0200,
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@lip6.fr>

Thanks, applied now.


Takashi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web