mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ALSA: atiixp: constify atiixp_dma_ops structures
@ 2015-12-30 10:21 Julia Lawall
  2015-12-30 21:50 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Julia Lawall @ 2015-12-30 10:21 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: kernel-janitors, Takashi Iwai, alsa-devel, linux-kernel

The atiixp_dma_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/pci/atiixp.c       |    6 +++---
 sound/pci/atiixp_modem.c |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index 1028fc8..2ce0022 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1219,7 +1219,7 @@ static struct ac97_pcm atiixp_pcm_defs[] = {
 	},
 };
 
-static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
+static const struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
 	.type = ATI_DMA_PLAYBACK,
 	.llp_offset = ATI_REG_OUT_DMA_LINKPTR,
 	.dt_cur = ATI_REG_OUT_DMA_DT_CUR,
@@ -1228,7 +1228,7 @@ static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
 	.flush_dma = atiixp_out_flush_dma,
 };
 	
-static struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
+static const struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
 	.type = ATI_DMA_CAPTURE,
 	.llp_offset = ATI_REG_IN_DMA_LINKPTR,
 	.dt_cur = ATI_REG_IN_DMA_DT_CUR,
@@ -1237,7 +1237,7 @@ static struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
 	.flush_dma = atiixp_in_flush_dma,
 };
 	
-static struct atiixp_dma_ops snd_atiixp_spdif_dma_ops = {
+static const struct atiixp_dma_ops snd_atiixp_spdif_dma_ops = {
 	.type = ATI_DMA_SPDIF,
 	.llp_offset = ATI_REG_SPDF_DMA_LINKPTR,
 	.dt_cur = ATI_REG_SPDF_DMA_DT_CUR,
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 27ed678..c534552 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -970,7 +970,7 @@ static struct snd_pcm_ops snd_atiixp_capture_ops = {
 	.pointer =	snd_atiixp_pcm_pointer,
 };
 
-static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
+static const struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
 	.type = ATI_DMA_PLAYBACK,
 	.llp_offset = ATI_REG_MODEM_OUT_DMA1_LINKPTR,
 	.dt_cur = ATI_REG_MODEM_OUT_DMA1_DT_CUR,
@@ -979,7 +979,7 @@ static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
 	.flush_dma = atiixp_out_flush_dma,
 };
 	
-static struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
+static const struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
 	.type = ATI_DMA_CAPTURE,
 	.llp_offset = ATI_REG_MODEM_IN_DMA_LINKPTR,
 	.dt_cur = ATI_REG_MODEM_IN_DMA_DT_CUR,


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] ALSA: atiixp: constify atiixp_dma_ops structures
  2015-12-30 10:21 [PATCH] ALSA: atiixp: constify atiixp_dma_ops structures Julia Lawall
@ 2015-12-30 21:50 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2015-12-30 21:50 UTC (permalink / raw)
  To: Julia Lawall; +Cc: Jaroslav Kysela, alsa-devel, kernel-janitors, linux-kernel

On Wed, 30 Dec 2015 11:21:57 +0100,
Julia Lawall wrote:
> 
> The atiixp_dma_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/pci/atiixp.c       |    6 +++---
>  sound/pci/atiixp_modem.c |    4 ++--
>  2 files changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
> index 1028fc8..2ce0022 100644
> --- a/sound/pci/atiixp.c
> +++ b/sound/pci/atiixp.c
> @@ -1219,7 +1219,7 @@ static struct ac97_pcm atiixp_pcm_defs[] = {
>  	},
>  };
>  
> -static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
> +static const struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
>  	.type = ATI_DMA_PLAYBACK,
>  	.llp_offset = ATI_REG_OUT_DMA_LINKPTR,
>  	.dt_cur = ATI_REG_OUT_DMA_DT_CUR,
> @@ -1228,7 +1228,7 @@ static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
>  	.flush_dma = atiixp_out_flush_dma,
>  };
>  	
> -static struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
> +static const struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
>  	.type = ATI_DMA_CAPTURE,
>  	.llp_offset = ATI_REG_IN_DMA_LINKPTR,
>  	.dt_cur = ATI_REG_IN_DMA_DT_CUR,
> @@ -1237,7 +1237,7 @@ static struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
>  	.flush_dma = atiixp_in_flush_dma,
>  };
>  	
> -static struct atiixp_dma_ops snd_atiixp_spdif_dma_ops = {
> +static const struct atiixp_dma_ops snd_atiixp_spdif_dma_ops = {
>  	.type = ATI_DMA_SPDIF,
>  	.llp_offset = ATI_REG_SPDF_DMA_LINKPTR,
>  	.dt_cur = ATI_REG_SPDF_DMA_DT_CUR,
> diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
> index 27ed678..c534552 100644
> --- a/sound/pci/atiixp_modem.c
> +++ b/sound/pci/atiixp_modem.c
> @@ -970,7 +970,7 @@ static struct snd_pcm_ops snd_atiixp_capture_ops = {
>  	.pointer =	snd_atiixp_pcm_pointer,
>  };
>  
> -static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
> +static const struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
>  	.type = ATI_DMA_PLAYBACK,
>  	.llp_offset = ATI_REG_MODEM_OUT_DMA1_LINKPTR,
>  	.dt_cur = ATI_REG_MODEM_OUT_DMA1_DT_CUR,
> @@ -979,7 +979,7 @@ static struct atiixp_dma_ops snd_atiixp_playback_dma_ops = {
>  	.flush_dma = atiixp_out_flush_dma,
>  };
>  	
> -static struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
> +static const struct atiixp_dma_ops snd_atiixp_capture_dma_ops = {
>  	.type = ATI_DMA_CAPTURE,
>  	.llp_offset = ATI_REG_MODEM_IN_DMA_LINKPTR,
>  	.dt_cur = ATI_REG_MODEM_IN_DMA_DT_CUR,
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-30 21:50 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-30 10:21 [PATCH] ALSA: atiixp: constify atiixp_dma_ops structures Julia Lawall
2015-12-30 21:50 ` 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®