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


Groups > linux.kernel > #1299518

Re: [PATCH] ALSA: atiixp: constify atiixp_dma_ops structures

Path csiph.com!news.freedyn.net!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!news.panservice.it!bofh.it!news.nic.it!robomod
From Takashi Iwai <tiwai@suse.de>
Newsgroups linux.kernel
Subject Re: [PATCH] ALSA: atiixp: constify atiixp_dma_ops structures
Date Wed, 30 Dec 2015 23:00:04 +0100
Message-ID <qLwWM-3Ft-33@gated-at.bofh.it> (permalink)
References <qLmkG-5pC-7@gated-at.bofh.it>
X-Original-To "Julia Lawall" <Julia.Lawall@lip6.fr>
User-Agent Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 Emacs/24.5 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO)
MIME-Version 1.0 (generated by SEMI 1.14.6 - "Maruoka")
Content-Type text/plain; charset=US-ASCII
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 80
Organization linux.* mail to news gateway
X-Original-Cc "Jaroslav Kysela" <perex@perex.cz>, <alsa-devel@alsa-project.org>, <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>
X-Original-Date Wed, 30 Dec 2015 22:50:52 +0100
X-Original-Message-ID <s5ha8ortxkz.wl-tiwai@suse.de>
X-Original-References <1451470917-30436-1-git-send-email-Julia.Lawall@lip6.fr>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1299518

Show key headers only | View raw


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,
> 
> 
--
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/

Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

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

csiph-web