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


Groups > linux.kernel > #1299334 > unrolled thread

[PATCH] ALSA: dummy: constify dummy_timer_ops structures

Started byJulia Lawall <Julia.Lawall@lip6.fr>
First post2015-12-30 12:50 +0100
Last post2015-12-30 23:00 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] ALSA: dummy: constify dummy_timer_ops structures Julia Lawall <Julia.Lawall@lip6.fr> - 2015-12-30 12:50 +0100
    Re: [PATCH] ALSA: dummy: constify dummy_timer_ops structures Takashi Iwai <tiwai@suse.de> - 2015-12-30 23:00 +0100

#1299334 — [PATCH] ALSA: dummy: constify dummy_timer_ops structures

FromJulia Lawall <Julia.Lawall@lip6.fr>
Date2015-12-30 12:50 +0100
Subject[PATCH] ALSA: dummy: constify dummy_timer_ops structures
Message-ID<qLnqp-64v-1@gated-at.bofh.it>
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,

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1299511

FromTakashi Iwai <tiwai@suse.de>
Date2015-12-30 23:00 +0100
Message-ID<qLwWK-3Ft-17@gated-at.bofh.it>
In reply to#1299334
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,
> 
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web