* [PATCH] ASLA: emu10k1: constify snd_emux_operators structure
@ 2017-02-19 10:21 Bhumika Goyal
2017-02-19 12:18 ` Takashi Iwai
2017-02-19 12:35 ` Takashi Sakamoto
0 siblings, 2 replies; 3+ messages in thread
From: Bhumika Goyal @ 2017-02-19 10:21 UTC (permalink / raw)
To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal
Declare snd_emux_operators structure as const as it is only copied into
another structure. So, snd_emux_operators structures having this property
can be made const.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
sound/pci/emu10k1/emu10k1_callback.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c
index d2c7ea3..aa2cc27 100644
--- a/sound/pci/emu10k1/emu10k1_callback.c
+++ b/sound/pci/emu10k1/emu10k1_callback.c
@@ -61,7 +61,7 @@ static struct snd_emux_voice *get_voice(struct snd_emux *emux,
/*
* set up operators
*/
-static struct snd_emux_operators emu10k1_ops = {
+static const struct snd_emux_operators emu10k1_ops = {
.owner = THIS_MODULE,
.get_voice = get_voice,
.prepare = start_voice,
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASLA: emu10k1: constify snd_emux_operators structure
2017-02-19 10:21 [PATCH] ASLA: emu10k1: constify snd_emux_operators structure Bhumika Goyal
@ 2017-02-19 12:18 ` Takashi Iwai
2017-02-19 12:35 ` Takashi Sakamoto
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2017-02-19 12:18 UTC (permalink / raw)
To: Bhumika Goyal; +Cc: alsa-devel, julia.lawall, perex, linux-kernel
On Sun, 19 Feb 2017 11:21:30 +0100,
Bhumika Goyal wrote:
>
> Declare snd_emux_operators structure as const as it is only copied into
> another structure. So, snd_emux_operators structures having this property
> can be made const.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Applied now (with a typo fix in the subject :)
thanks,
Takashi
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ASLA: emu10k1: constify snd_emux_operators structure
2017-02-19 10:21 [PATCH] ASLA: emu10k1: constify snd_emux_operators structure Bhumika Goyal
2017-02-19 12:18 ` Takashi Iwai
@ 2017-02-19 12:35 ` Takashi Sakamoto
1 sibling, 0 replies; 3+ messages in thread
From: Takashi Sakamoto @ 2017-02-19 12:35 UTC (permalink / raw)
To: Bhumika Goyal, julia.lawall, perex, tiwai, alsa-devel, linux-kernel
On Feb 19 2016 19:21, Bhumika Goyal wrote:
> Declare snd_emux_operators structure as const as it is only copied into
> another structure. So, snd_emux_operators structures having this property
> can be made const.
>
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
...The 'ASLA' reminds me of the god in Indian myth[0]. When Buddhism
disseminated to Japan via China, the god changed its name and became the
god in Japanese Buddhism, too.
...I'm just a kidding. The title should be fixed with 'ALSA' ;)
> ---
> sound/pci/emu10k1/emu10k1_callback.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/sound/pci/emu10k1/emu10k1_callback.c b/sound/pci/emu10k1/emu10k1_callback.c
> index d2c7ea3..aa2cc27 100644
> --- a/sound/pci/emu10k1/emu10k1_callback.c
> +++ b/sound/pci/emu10k1/emu10k1_callback.c
> @@ -61,7 +61,7 @@ static struct snd_emux_voice *get_voice(struct snd_emux *emux,
> /*
> * set up operators
> */
> -static struct snd_emux_operators emu10k1_ops = {
> +static const struct snd_emux_operators emu10k1_ops = {
> .owner = THIS_MODULE,
> .get_voice = get_voice,
> .prepare = start_voice,
[0] https://en.wikipedia.org/wiki/Asura
[1] https://en.wikipedia.org/wiki/Asura_(Buddhism)
Regards
Takashi Sakamoto
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-02-19 12:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-19 10:21 [PATCH] ASLA: emu10k1: constify snd_emux_operators structure Bhumika Goyal
2017-02-19 12:18 ` Takashi Iwai
2017-02-19 12:35 ` Takashi Sakamoto
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®