* [PATCH] ALSA: dummy: constify dummy_timer_ops structures
@ 2015-12-30 11:28 Julia Lawall
2015-12-30 21:51 ` Takashi Iwai
0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2015-12-30 11:28 UTC (permalink / raw)
To: Jaroslav Kysela; +Cc: kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel
The dummy_timer_ops structures are never modified, so declare them as
const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
---
sound/drivers/dummy.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
index 016e451..75b7485 100644
--- a/sound/drivers/dummy.c
+++ b/sound/drivers/dummy.c
@@ -351,7 +351,7 @@ static void dummy_systimer_free(struct snd_pcm_substream *substream)
kfree(substream->runtime->private_data);
}
-static struct dummy_timer_ops dummy_systimer_ops = {
+static const struct dummy_timer_ops dummy_systimer_ops = {
.create = dummy_systimer_create,
.free = dummy_systimer_free,
.prepare = dummy_systimer_prepare,
@@ -475,7 +475,7 @@ static void dummy_hrtimer_free(struct snd_pcm_substream *substream)
kfree(dpcm);
}
-static struct dummy_timer_ops dummy_hrtimer_ops = {
+static const struct dummy_timer_ops dummy_hrtimer_ops = {
.create = dummy_hrtimer_create,
.free = dummy_hrtimer_free,
.prepare = dummy_hrtimer_prepare,
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] ALSA: dummy: constify dummy_timer_ops structures
2015-12-30 11:28 [PATCH] ALSA: dummy: constify dummy_timer_ops structures Julia Lawall
@ 2015-12-30 21:51 ` Takashi Iwai
0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2015-12-30 21:51 UTC (permalink / raw)
To: Julia Lawall; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel
On Wed, 30 Dec 2015 12:28:49 +0100,
Julia Lawall wrote:
>
> The dummy_timer_ops structures are never modified, so declare them as
> const.
>
> Done with the help of Coccinelle.
>
> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Applied, thanks.
Takashi
>
> ---
> sound/drivers/dummy.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c
> index 016e451..75b7485 100644
> --- a/sound/drivers/dummy.c
> +++ b/sound/drivers/dummy.c
> @@ -351,7 +351,7 @@ static void dummy_systimer_free(struct snd_pcm_substream *substream)
> kfree(substream->runtime->private_data);
> }
>
> -static struct dummy_timer_ops dummy_systimer_ops = {
> +static const struct dummy_timer_ops dummy_systimer_ops = {
> .create = dummy_systimer_create,
> .free = dummy_systimer_free,
> .prepare = dummy_systimer_prepare,
> @@ -475,7 +475,7 @@ static void dummy_hrtimer_free(struct snd_pcm_substream *substream)
> kfree(dpcm);
> }
>
> -static struct dummy_timer_ops dummy_hrtimer_ops = {
> +static const struct dummy_timer_ops dummy_hrtimer_ops = {
> .create = dummy_hrtimer_create,
> .free = dummy_hrtimer_free,
> .prepare = dummy_hrtimer_prepare,
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-30 21:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30 11:28 [PATCH] ALSA: dummy: constify dummy_timer_ops structures Julia Lawall
2015-12-30 21:51 ` Takashi Iwai
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®