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


Groups > linux.kernel > #1718291 > unrolled thread

[PATCH 0/4] constify ac97_pcm structures

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-08-23 14:10 +0200
Last post2017-08-23 16:00 +0200
Articles 6 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/4] constify ac97_pcm structures Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 14:10 +0200
    [PATCH 4/4] ALSA: intel8x0: constify ac97_pcm structures Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 14:20 +0200
    [PATCH 2/4] ALSA: ac97c: constify ac97_pcm structures Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 14:20 +0200
    [PATCH 1/4] ALSA: aaci: constify ac97_pcm structures Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 14:20 +0200
    [PATCH 3/4] ALSA: atiixp: constify ac97_pcm structures Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-23 14:20 +0200
    Re: [PATCH 0/4] constify ac97_pcm structures Takashi Iwai <tiwai@suse.de> - 2017-08-23 16:00 +0200

#1718291 — [PATCH 0/4] constify ac97_pcm structures

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-23 14:10 +0200
Subject[PATCH 0/4] constify ac97_pcm structures
Message-ID<uhCDW-nu-63@gated-at.bofh.it>
ac97_pcm are not supposed to change at runtime. All functions
working with ac97_pcm provided by <sound/ac97_codec.h> work with
const ac97_pcm. So mark the non-const structs as const.

Arvind Yadav (4):
  [PATCH 1/4] ALSA: aaci: constify ac97_pcm structures
  [PATCH 2/4] ALSA: ac97c: constify ac97_pcm structures
  [PATCH 3/4] ALSA: atiixp: constify ac97_pcm structures
  [PATCH 4/4] ALSA: intel8x0: constify ac97_pcm structures

 sound/arm/aaci.c     | 2 +-
 sound/atmel/ac97c.c  | 2 +-
 sound/pci/atiixp.c   | 2 +-
 sound/pci/intel8x0.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1718293 — [PATCH 4/4] ALSA: intel8x0: constify ac97_pcm structures

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-23 14:20 +0200
Subject[PATCH 4/4] ALSA: intel8x0: constify ac97_pcm structures
Message-ID<uhCNz-qT-7@gated-at.bofh.it>
In reply to#1718291
ac97_pcm are not supposed to change at runtime. All functions
working with ac97_pcm provided by <sound/ac97_codec.h> work with
const ac97_pcm. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/pci/intel8x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c
index fcd032e..10ede39 100644
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -1721,7 +1721,7 @@ static void snd_intel8x0_mixer_free_ac97(struct snd_ac97 *ac97)
 	chip->ac97[ac97->num] = NULL;
 }
 
-static struct ac97_pcm ac97_pcm_defs[] = {
+static const struct ac97_pcm ac97_pcm_defs[] = {
 	/* front PCM */
 	{
 		.exclusive = 1,
-- 
1.9.1

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


#1718296 — [PATCH 2/4] ALSA: ac97c: constify ac97_pcm structures

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-23 14:20 +0200
Subject[PATCH 2/4] ALSA: ac97c: constify ac97_pcm structures
Message-ID<uhCNz-qT-17@gated-at.bofh.it>
In reply to#1718291
ac97_pcm are not supposed to change at runtime. All functions
working with ac97_pcm provided by <sound/ac97_codec.h> work with
const ac97_pcm. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@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 70616da..345b943 100644
--- a/sound/atmel/ac97c.c
+++ b/sound/atmel/ac97c.c
@@ -558,7 +558,7 @@ static irqreturn_t atmel_ac97c_interrupt(int irq, void *dev)
 	return retval;
 }
 
-static struct ac97_pcm at91_ac97_pcm_defs[] = {
+static const struct ac97_pcm at91_ac97_pcm_defs[] = {
 	/* Playback */
 	{
 		.exclusive = 1,
-- 
1.9.1

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


#1718299 — [PATCH 1/4] ALSA: aaci: constify ac97_pcm structures

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-23 14:20 +0200
Subject[PATCH 1/4] ALSA: aaci: constify ac97_pcm structures
Message-ID<uhCNA-qT-19@gated-at.bofh.it>
In reply to#1718291
ac97_pcm are not supposed to change at runtime. All functions
working with ac97_pcm provided by <sound/ac97_codec.h> work with
const ac97_pcm. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@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 e93b327..7780d32 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -786,7 +786,7 @@ static int aaci_resume(struct device *dev)
 #endif
 
 
-static struct ac97_pcm ac97_defs[] = {
+static const struct ac97_pcm ac97_defs[] = {
 	[0] = {	/* Front PCM */
 		.exclusive = 1,
 		.r = {
-- 
1.9.1

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


#1718300 — [PATCH 3/4] ALSA: atiixp: constify ac97_pcm structures

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-08-23 14:20 +0200
Subject[PATCH 3/4] ALSA: atiixp: constify ac97_pcm structures
Message-ID<uhCNA-qT-21@gated-at.bofh.it>
In reply to#1718291
ac97_pcm are not supposed to change at runtime. All functions
working with ac97_pcm provided by <sound/ac97_codec.h> work with
const ac97_pcm. So mark the non-const structs as const.

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 sound/pci/atiixp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c
index a40c918..fa70804 100644
--- a/sound/pci/atiixp.c
+++ b/sound/pci/atiixp.c
@@ -1183,7 +1183,7 @@ static int snd_atiixp_spdif_close(struct snd_pcm_substream *substream)
 	.pointer =	snd_atiixp_pcm_pointer,
 };
 
-static struct ac97_pcm atiixp_pcm_defs[] = {
+static const struct ac97_pcm atiixp_pcm_defs[] = {
 	/* front PCM */
 	{
 		.exclusive = 1,
-- 
1.9.1

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


#1718374

FromTakashi Iwai <tiwai@suse.de>
Date2017-08-23 16:00 +0200
Message-ID<uhEmm-1ex-11@gated-at.bofh.it>
In reply to#1718291
On Wed, 23 Aug 2017 14:09:24 +0200,
Arvind Yadav wrote:
> 
> ac97_pcm are not supposed to change at runtime. All functions
> working with ac97_pcm provided by <sound/ac97_codec.h> work with
> const ac97_pcm. So mark the non-const structs as const.
> 
> Arvind Yadav (4):
>   [PATCH 1/4] ALSA: aaci: constify ac97_pcm structures
>   [PATCH 2/4] ALSA: ac97c: constify ac97_pcm structures
>   [PATCH 3/4] ALSA: atiixp: constify ac97_pcm structures
>   [PATCH 4/4] ALSA: intel8x0: constify ac97_pcm structures

Applied all patches now.  Thanks.


Takashi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web