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


Groups > linux.kernel > #1713700 > unrolled thread

[PATCH 00/12] ALSA: make snd_pcm_hardware const

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-08-17 11:20 +0200
Last post2017-08-17 12:50 +0200
Articles 13 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 00/12] ALSA: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 06/12] ALSA: pci: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 05/12] ALSA: mips: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 07/12] ALSA: pcmcia: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 01/12] ALSA: arm: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 10/12] ALSA: sparc: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 12/12] ALSA: parisc: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 08/12] ALSA: ppc: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 09/12] ALSA: sh: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 11/12] ALSA: usb: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 02/12] ALSA: atmel: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:20 +0200
    [PATCH 04/12] ALSA: isa: make snd_pcm_hardware const Bhumika Goyal <bhumirks@gmail.com> - 2017-08-17 11:30 +0200
    Re: [PATCH 00/12] ALSA: make snd_pcm_hardware const Takashi Iwai <tiwai@suse.de> - 2017-08-17 12:50 +0200

#1713700 — [PATCH 00/12] ALSA: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 00/12] ALSA: make snd_pcm_hardware const
Message-ID<ufp85-2O3-5@gated-at.bofh.it>
Make these const.

Bhumika Goyal (12):
  ALSA: arm: make snd_pcm_hardware const
  ALSA: atmel: make snd_pcm_hardware const
  ALSA: drivers: make snd_pcm_hardware const
  ALSA: isa: make snd_pcm_hardware const
  ALSA: mips: make snd_pcm_hardware const
  ALSA: pci: make snd_pcm_hardware const
  ALSA: pcmcia: make snd_pcm_hardware const
  ALSA: ppc: make snd_pcm_hardware const
  ALSA: sh: make snd_pcm_hardware const
  ALSA: sparc: make snd_pcm_hardware const
  ALSA: usb: make snd_pcm_hardware const
  ALSA: parisc: make snd_pcm_hardware const

 sound/arm/aaci.c                       | 2 +-
 sound/atmel/ac97c.c                    | 2 +-
 sound/drivers/aloop.c                  | 2 +-
 sound/drivers/dummy.c                  | 2 +-
 sound/drivers/ml403-ac97cr.c           | 4 ++--
 sound/drivers/pcsp/pcsp_lib.c          | 2 +-
 sound/drivers/vx/vx_pcm.c              | 4 ++--
 sound/isa/ad1816a/ad1816a_lib.c        | 4 ++--
 sound/isa/es1688/es1688_lib.c          | 4 ++--
 sound/isa/es18xx.c                     | 4 ++--
 sound/isa/gus/gus_pcm.c                | 4 ++--
 sound/isa/msnd/msnd.c                  | 4 ++--
 sound/isa/sb/emu8000_pcm.c             | 2 +-
 sound/isa/sb/sb16_main.c               | 4 ++--
 sound/isa/sb/sb8_main.c                | 4 ++--
 sound/isa/wss/wss_lib.c                | 4 ++--
 sound/mips/hal2.c                      | 2 +-
 sound/mips/sgio2audio.c                | 2 +-
 sound/parisc/harmony.c                 | 4 ++--
 sound/pci/au88x0/au88x0_pcm.c          | 8 ++++----
 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | 2 +-
 sound/ppc/pmac.c                       | 4 ++--
 sound/sh/aica.c                        | 2 +-
 sound/sh/sh_dac_audio.c                | 2 +-
 sound/sparc/amd7930.c                  | 2 +-
 sound/sparc/cs4231.c                   | 4 ++--
 sound/sparc/dbri.c                     | 2 +-
 sound/usb/pcm.c                        | 2 +-
 28 files changed, 44 insertions(+), 44 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1713701 — [PATCH 06/12] ALSA: pci: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 06/12] ALSA: pci: make snd_pcm_hardware const
Message-ID<ufp85-2O3-9@gated-at.bofh.it>
In reply to#1713700
Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/pci/au88x0/au88x0_pcm.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/pci/au88x0/au88x0_pcm.c b/sound/pci/au88x0/au88x0_pcm.c
index 848eb3c..53714e0 100644
--- a/sound/pci/au88x0/au88x0_pcm.c
+++ b/sound/pci/au88x0/au88x0_pcm.c
@@ -30,7 +30,7 @@
 #define VORTEX_PCM_TYPE(x) (x->name[40])
 
 /* hardware definition */
-static struct snd_pcm_hardware snd_vortex_playback_hw_adb = {
+static const struct snd_pcm_hardware snd_vortex_playback_hw_adb = {
 	.info =
 	    (SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */
 	     SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED |
@@ -51,7 +51,7 @@
 };
 
 #ifndef CHIP_AU8820
-static struct snd_pcm_hardware snd_vortex_playback_hw_a3d = {
+static const struct snd_pcm_hardware snd_vortex_playback_hw_a3d = {
 	.info =
 	    (SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */
 	     SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED |
@@ -71,7 +71,7 @@
 	.periods_max = 64,
 };
 #endif
-static struct snd_pcm_hardware snd_vortex_playback_hw_spdif = {
+static const struct snd_pcm_hardware snd_vortex_playback_hw_spdif = {
 	.info =
 	    (SNDRV_PCM_INFO_MMAP | /* SNDRV_PCM_INFO_RESUME | */
 	     SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_INTERLEAVED |
@@ -94,7 +94,7 @@
 };
 
 #ifndef CHIP_AU8810
-static struct snd_pcm_hardware snd_vortex_playback_hw_wt = {
+static const struct snd_pcm_hardware snd_vortex_playback_hw_wt = {
 	.info = (SNDRV_PCM_INFO_MMAP |
 		 SNDRV_PCM_INFO_INTERLEAVED |
 		 SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID),
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713702 — [PATCH 05/12] ALSA: mips: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 05/12] ALSA: mips: make snd_pcm_hardware const
Message-ID<ufp85-2O3-11@gated-at.bofh.it>
In reply to#1713700
Make these const as they are only used in a copy operation.
Done using Coccinelle

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/mips/hal2.c       | 2 +-
 sound/mips/sgio2audio.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/mips/hal2.c b/sound/mips/hal2.c
index 3318c15..367d6c37 100644
--- a/sound/mips/hal2.c
+++ b/sound/mips/hal2.c
@@ -496,7 +496,7 @@ static void hal2_free_dmabuf(struct hal2_codec *codec)
 		       DMA_ATTR_NON_CONSISTENT);
 }
 
-static struct snd_pcm_hardware hal2_pcm_hw = {
+static const struct snd_pcm_hardware hal2_pcm_hw = {
 	.info = (SNDRV_PCM_INFO_MMAP |
 		 SNDRV_PCM_INFO_MMAP_VALID |
 		 SNDRV_PCM_INFO_INTERLEAVED |
diff --git a/sound/mips/sgio2audio.c b/sound/mips/sgio2audio.c
index 0ebc1c3..603892f 100644
--- a/sound/mips/sgio2audio.c
+++ b/sound/mips/sgio2audio.c
@@ -532,7 +532,7 @@ static irqreturn_t snd_sgio2audio_error_isr(int irq, void *dev_id)
 
 /* PCM part */
 /* PCM hardware definition */
-static struct snd_pcm_hardware snd_sgio2audio_pcm_hw = {
+static const struct snd_pcm_hardware snd_sgio2audio_pcm_hw = {
 	.info = (SNDRV_PCM_INFO_MMAP |
 		 SNDRV_PCM_INFO_MMAP_VALID |
 		 SNDRV_PCM_INFO_INTERLEAVED |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713706 — [PATCH 07/12] ALSA: pcmcia: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 07/12] ALSA: pcmcia: make snd_pcm_hardware const
Message-ID<ufp86-2O3-21@gated-at.bofh.it>
In reply to#1713700
Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
index b48aa0a..d788409 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf_pcm.c
@@ -193,7 +193,7 @@ static int pdacf_pcm_prepare(struct snd_pcm_substream *subs)
  * capture hw information
  */
 
-static struct snd_pcm_hardware pdacf_pcm_capture_hw = {
+static const struct snd_pcm_hardware pdacf_pcm_capture_hw = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_PAUSE | SNDRV_PCM_INFO_RESUME |
 				 SNDRV_PCM_INFO_MMAP_VALID |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713708 — [PATCH 01/12] ALSA: arm: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 01/12] ALSA: arm: make snd_pcm_hardware const
Message-ID<ufp86-2O3-25@gated-at.bofh.it>
In reply to#1713700
Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/arm/aaci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 4140b1b..74cf452 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -348,7 +348,7 @@ static irqreturn_t aaci_irq(int irq, void *devid)
 /*
  * ALSA support.
  */
-static struct snd_pcm_hardware aaci_hw_info = {
+static const struct snd_pcm_hardware aaci_hw_info = {
 	.info			= SNDRV_PCM_INFO_MMAP |
 				  SNDRV_PCM_INFO_MMAP_VALID |
 				  SNDRV_PCM_INFO_INTERLEAVED |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713710 — [PATCH 10/12] ALSA: sparc: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 10/12] ALSA: sparc: make snd_pcm_hardware const
Message-ID<ufp86-2O3-27@gated-at.bofh.it>
In reply to#1713700
Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/sparc/amd7930.c | 2 +-
 sound/sparc/cs4231.c  | 4 ++--
 sound/sparc/dbri.c    | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c
index 35c1f6a..a6864fd 100644
--- a/sound/sparc/amd7930.c
+++ b/sound/sparc/amd7930.c
@@ -666,7 +666,7 @@ static snd_pcm_uframes_t snd_amd7930_capture_pointer(struct snd_pcm_substream *s
 }
 
 /* Playback and capture have identical properties.  */
-static struct snd_pcm_hardware snd_amd7930_pcm_hw =
+static const struct snd_pcm_hardware snd_amd7930_pcm_hw =
 {
 	.info			= (SNDRV_PCM_INFO_MMAP |
 				   SNDRV_PCM_INFO_MMAP_VALID |
diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 3d7d425..f5192b3 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -1089,7 +1089,7 @@ static int snd_cs4231_probe(struct snd_cs4231 *chip)
 	return 0;		/* all things are ok.. */
 }
 
-static struct snd_pcm_hardware snd_cs4231_playback = {
+static const struct snd_pcm_hardware snd_cs4231_playback = {
 	.info			= SNDRV_PCM_INFO_MMAP |
 				  SNDRV_PCM_INFO_INTERLEAVED |
 				  SNDRV_PCM_INFO_MMAP_VALID |
@@ -1113,7 +1113,7 @@ static int snd_cs4231_probe(struct snd_cs4231 *chip)
 	.periods_max		= 1024,
 };
 
-static struct snd_pcm_hardware snd_cs4231_capture = {
+static const struct snd_pcm_hardware snd_cs4231_capture = {
 	.info			= SNDRV_PCM_INFO_MMAP |
 				  SNDRV_PCM_INFO_INTERLEAVED |
 				  SNDRV_PCM_INFO_MMAP_VALID |
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 52063b2..72b6c4a 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -1980,7 +1980,7 @@ static irqreturn_t snd_dbri_interrupt(int irq, void *dev_id)
 /****************************************************************************
 		PCM Interface
 ****************************************************************************/
-static struct snd_pcm_hardware snd_dbri_pcm_hw = {
+static const struct snd_pcm_hardware snd_dbri_pcm_hw = {
 	.info		= SNDRV_PCM_INFO_MMAP |
 			  SNDRV_PCM_INFO_INTERLEAVED |
 			  SNDRV_PCM_INFO_BLOCK_TRANSFER |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713711 — [PATCH 12/12] ALSA: parisc: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 12/12] ALSA: parisc: make snd_pcm_hardware const
Message-ID<ufp86-2O3-29@gated-at.bofh.it>
In reply to#1713700
Make these const as they are only used in a copy operation.
Done using Coccinelle

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/parisc/harmony.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/parisc/harmony.c b/sound/parisc/harmony.c
index 5911eb3..cb2bc54 100644
--- a/sound/parisc/harmony.c
+++ b/sound/parisc/harmony.c
@@ -260,7 +260,7 @@
 	return HARMONY_SR_44KHZ;
 }
 
-static struct snd_pcm_hardware snd_harmony_playback =
+static const struct snd_pcm_hardware snd_harmony_playback =
 {
 	.info =	(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | 
 		 SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID |
@@ -281,7 +281,7 @@
 	.fifo_size = 0,
 };
 
-static struct snd_pcm_hardware snd_harmony_capture =
+static const struct snd_pcm_hardware snd_harmony_capture =
 {
         .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
                  SNDRV_PCM_INFO_JOINT_DUPLEX | SNDRV_PCM_INFO_MMAP_VALID |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713712 — [PATCH 08/12] ALSA: ppc: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 08/12] ALSA: ppc: make snd_pcm_hardware const
Message-ID<ufp86-2O3-31@gated-at.bofh.it>
In reply to#1713700
Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/ppc/pmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index a5843fc..45f0295 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -509,7 +509,7 @@ static void snd_pmac_pcm_update(struct snd_pmac *chip, struct pmac_stream *rec)
  * hw info
  */
 
-static struct snd_pcm_hardware snd_pmac_playback =
+static const struct snd_pcm_hardware snd_pmac_playback =
 {
 	.info =			(SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP |
@@ -528,7 +528,7 @@ static void snd_pmac_pcm_update(struct snd_pmac *chip, struct pmac_stream *rec)
 	.periods_max =		PMAC_MAX_FRAGS,
 };
 
-static struct snd_pcm_hardware snd_pmac_capture =
+static const struct snd_pcm_hardware snd_pmac_capture =
 {
 	.info =			(SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713713 — [PATCH 09/12] ALSA: sh: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 09/12] ALSA: sh: make snd_pcm_hardware const
Message-ID<ufp86-2O3-33@gated-at.bofh.it>
In reply to#1713700
Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/sh/aica.c         | 2 +-
 sound/sh/sh_dac_audio.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/sh/aica.c b/sound/sh/aica.c
index ab4802d..822608d 100644
--- a/sound/sh/aica.c
+++ b/sound/sh/aica.c
@@ -211,7 +211,7 @@ static void aica_chn_halt(void)
 }
 
 /* ALSA code below */
-static struct snd_pcm_hardware snd_pcm_aica_playback_hw = {
+static const struct snd_pcm_hardware snd_pcm_aica_playback_hw = {
 	.info = (SNDRV_PCM_INFO_NONINTERLEAVED),
 	.formats =
 	    (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_S16_LE |
diff --git a/sound/sh/sh_dac_audio.c b/sound/sh/sh_dac_audio.c
index c1e00ed..a077f1c 100644
--- a/sound/sh/sh_dac_audio.c
+++ b/sound/sh/sh_dac_audio.c
@@ -93,7 +93,7 @@ static void dac_audio_set_rate(struct snd_sh_dac *chip)
 
 /* PCM INTERFACE */
 
-static struct snd_pcm_hardware snd_sh_dac_pcm_hw = {
+static const struct snd_pcm_hardware snd_sh_dac_pcm_hw = {
 	.info			= (SNDRV_PCM_INFO_MMAP |
 					SNDRV_PCM_INFO_MMAP_VALID |
 					SNDRV_PCM_INFO_INTERLEAVED |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713716 — [PATCH 11/12] ALSA: usb: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 11/12] ALSA: usb: make snd_pcm_hardware const
Message-ID<ufp87-2O3-41@gated-at.bofh.it>
In reply to#1713700
Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/usb/pcm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 9aa5b18..a4f3390 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -857,7 +857,7 @@ static int snd_usb_pcm_prepare(struct snd_pcm_substream *substream)
 	return ret;
 }
 
-static struct snd_pcm_hardware snd_usb_hardware =
+static const struct snd_pcm_hardware snd_usb_hardware =
 {
 	.info =			SNDRV_PCM_INFO_MMAP |
 				SNDRV_PCM_INFO_MMAP_VALID |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713717 — [PATCH 02/12] ALSA: atmel: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:20 +0200
Subject[PATCH 02/12] ALSA: atmel: make snd_pcm_hardware const
Message-ID<ufp87-2O3-45@gated-at.bofh.it>
In reply to#1713700
Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/atmel/ac97c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/atmel/ac97c.c b/sound/atmel/ac97c.c
index 52b0522..f3f582e 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -66,7 +66,7 @@ struct atmel_ac97c {
 #define ac97c_readl(chip, reg)				\
 	__raw_readl((chip)->regs + AC97C_##reg)
 
-static struct snd_pcm_hardware atmel_ac97c_hw = {
+static const struct snd_pcm_hardware atmel_ac97c_hw = {
 	.info			= (SNDRV_PCM_INFO_MMAP
 				  | SNDRV_PCM_INFO_MMAP_VALID
 				  | SNDRV_PCM_INFO_INTERLEAVED
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713723 — [PATCH 04/12] ALSA: isa: make snd_pcm_hardware const

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-08-17 11:30 +0200
Subject[PATCH 04/12] ALSA: isa: make snd_pcm_hardware const
Message-ID<ufphM-2RP-25@gated-at.bofh.it>
In reply to#1713700
Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/isa/ad1816a/ad1816a_lib.c | 4 ++--
 sound/isa/es1688/es1688_lib.c   | 4 ++--
 sound/isa/es18xx.c              | 4 ++--
 sound/isa/gus/gus_pcm.c         | 4 ++--
 sound/isa/msnd/msnd.c           | 4 ++--
 sound/isa/sb/emu8000_pcm.c      | 2 +-
 sound/isa/sb/sb16_main.c        | 4 ++--
 sound/isa/sb/sb8_main.c         | 4 ++--
 sound/isa/wss/wss_lib.c         | 4 ++--
 9 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index 5c6df15..9232014 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -339,7 +339,7 @@ static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id)
 }
 
 
-static struct snd_pcm_hardware snd_ad1816a_playback = {
+static const struct snd_pcm_hardware snd_ad1816a_playback = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		(SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
@@ -358,7 +358,7 @@ static irqreturn_t snd_ad1816a_interrupt(int irq, void *dev_id)
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_ad1816a_capture = {
+static const struct snd_pcm_hardware snd_ad1816a_capture = {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
 	.formats =		(SNDRV_PCM_FMTBIT_MU_LAW | SNDRV_PCM_FMTBIT_A_LAW |
diff --git a/sound/isa/es1688/es1688_lib.c b/sound/isa/es1688/es1688_lib.c
index ec7e68b..f9c0662 100644
--- a/sound/isa/es1688/es1688_lib.c
+++ b/sound/isa/es1688/es1688_lib.c
@@ -526,7 +526,7 @@ static snd_pcm_uframes_t snd_es1688_capture_pointer(struct snd_pcm_substream *su
 
  */
 
-static struct snd_pcm_hardware snd_es1688_playback =
+static const struct snd_pcm_hardware snd_es1688_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -544,7 +544,7 @@ static snd_pcm_uframes_t snd_es1688_capture_pointer(struct snd_pcm_substream *su
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_es1688_capture =
+static const struct snd_pcm_hardware snd_es1688_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index 77023e4..cb9c9a1 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -838,7 +838,7 @@ static snd_pcm_uframes_t snd_es18xx_capture_pointer(struct snd_pcm_substream *su
 	return pos >> chip->dma1_shift;
 }
 
-static struct snd_pcm_hardware snd_es18xx_playback =
+static const struct snd_pcm_hardware snd_es18xx_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_RESUME |
@@ -858,7 +858,7 @@ static snd_pcm_uframes_t snd_es18xx_capture_pointer(struct snd_pcm_substream *su
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_es18xx_capture =
+static const struct snd_pcm_hardware snd_es18xx_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_RESUME |
diff --git a/sound/isa/gus/gus_pcm.c b/sound/isa/gus/gus_pcm.c
index 36e852f..131b289 100644
--- a/sound/isa/gus/gus_pcm.c
+++ b/sound/isa/gus/gus_pcm.c
@@ -650,7 +650,7 @@ static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus)
 	}
 }
 
-static struct snd_pcm_hardware snd_gf1_pcm_playback =
+static const struct snd_pcm_hardware snd_gf1_pcm_playback =
 {
 	.info =			SNDRV_PCM_INFO_NONINTERLEAVED,
 	.formats		= (SNDRV_PCM_FMTBIT_S8 | SNDRV_PCM_FMTBIT_U8 |
@@ -668,7 +668,7 @@ static void snd_gf1_pcm_interrupt_dma_read(struct snd_gus_card * gus)
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_gf1_pcm_capture =
+static const struct snd_pcm_hardware snd_gf1_pcm_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
diff --git a/sound/isa/msnd/msnd.c b/sound/isa/msnd/msnd.c
index ae9562c..569897f 100644
--- a/sound/isa/msnd/msnd.c
+++ b/sound/isa/msnd/msnd.c
@@ -437,7 +437,7 @@ static void snd_msnd_capture_reset_queue(struct snd_msnd *chip,
 	}
 }
 
-static struct snd_pcm_hardware snd_msnd_playback = {
+static const struct snd_pcm_hardware snd_msnd_playback = {
 	.info =			SNDRV_PCM_INFO_MMAP |
 				SNDRV_PCM_INFO_INTERLEAVED |
 				SNDRV_PCM_INFO_MMAP_VALID |
@@ -456,7 +456,7 @@ static void snd_msnd_capture_reset_queue(struct snd_msnd *chip,
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_msnd_capture = {
+static const struct snd_pcm_hardware snd_msnd_capture = {
 	.info =			SNDRV_PCM_INFO_MMAP |
 				SNDRV_PCM_INFO_INTERLEAVED |
 				SNDRV_PCM_INFO_MMAP_VALID |
diff --git a/sound/isa/sb/emu8000_pcm.c b/sound/isa/sb/emu8000_pcm.c
index 9409827..8f34551 100644
--- a/sound/isa/sb/emu8000_pcm.c
+++ b/sound/isa/sb/emu8000_pcm.c
@@ -157,7 +157,7 @@ static int calc_rate_offset(int hz)
 /*
  */
 
-static struct snd_pcm_hardware emu8k_pcm_hw = {
+static const struct snd_pcm_hardware emu8k_pcm_hw = {
 #ifdef USE_NONINTERLEAVE
 	.info =			SNDRV_PCM_INFO_NONINTERLEAVED,
 #else
diff --git a/sound/isa/sb/sb16_main.c b/sound/isa/sb/sb16_main.c
index 6fc6325..3e39ba2 100644
--- a/sound/isa/sb/sb16_main.c
+++ b/sound/isa/sb/sb16_main.c
@@ -473,7 +473,7 @@ static snd_pcm_uframes_t snd_sb16_capture_pointer(struct snd_pcm_substream *subs
 
  */
 
-static struct snd_pcm_hardware snd_sb16_playback =
+static const struct snd_pcm_hardware snd_sb16_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -491,7 +491,7 @@ static snd_pcm_uframes_t snd_sb16_capture_pointer(struct snd_pcm_substream *subs
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_sb16_capture =
+static const struct snd_pcm_hardware snd_sb16_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
diff --git a/sound/isa/sb/sb8_main.c b/sound/isa/sb/sb8_main.c
index f5d8f2d..d45df5c 100644
--- a/sound/isa/sb/sb8_main.c
+++ b/sound/isa/sb/sb8_main.c
@@ -447,7 +447,7 @@ static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *subst
 
  */
 
-static struct snd_pcm_hardware snd_sb8_playback =
+static const struct snd_pcm_hardware snd_sb8_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
@@ -466,7 +466,7 @@ static snd_pcm_uframes_t snd_sb8_capture_pointer(struct snd_pcm_substream *subst
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_sb8_capture =
+static const struct snd_pcm_hardware snd_sb8_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID),
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c
index 29adb01..8a85204 100644
--- a/sound/isa/wss/wss_lib.c
+++ b/sound/isa/wss/wss_lib.c
@@ -1452,7 +1452,7 @@ static int snd_wss_probe(struct snd_wss *chip)
 
  */
 
-static struct snd_pcm_hardware snd_wss_playback =
+static const struct snd_pcm_hardware snd_wss_playback =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID |
@@ -1472,7 +1472,7 @@ static int snd_wss_probe(struct snd_wss *chip)
 	.fifo_size =		0,
 };
 
-static struct snd_pcm_hardware snd_wss_capture =
+static const struct snd_pcm_hardware snd_wss_capture =
 {
 	.info =			(SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED |
 				 SNDRV_PCM_INFO_MMAP_VALID |
-- 
1.9.1

[toc] | [prev] | [next] | [standalone]


#1713810

FromTakashi Iwai <tiwai@suse.de>
Date2017-08-17 12:50 +0200
Message-ID<ufqxd-3DI-11@gated-at.bofh.it>
In reply to#1713700
On Thu, 17 Aug 2017 11:15:48 +0200,
Bhumika Goyal wrote:
> 
> Make these const.
> 
> Bhumika Goyal (12):
>   ALSA: arm: make snd_pcm_hardware const
>   ALSA: atmel: make snd_pcm_hardware const
>   ALSA: drivers: make snd_pcm_hardware const
>   ALSA: isa: make snd_pcm_hardware const
>   ALSA: mips: make snd_pcm_hardware const
>   ALSA: pci: make snd_pcm_hardware const
>   ALSA: pcmcia: make snd_pcm_hardware const
>   ALSA: ppc: make snd_pcm_hardware const
>   ALSA: sh: make snd_pcm_hardware const
>   ALSA: sparc: make snd_pcm_hardware const
>   ALSA: usb: make snd_pcm_hardware const
>   ALSA: parisc: make snd_pcm_hardware const

Applied all patches now.  Thanks.


Takashi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web