All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] constify ac97_pcm structures
@ 2017-08-23 12:09 ` Arvind Yadav
  0 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-23 12:09 UTC (permalink / raw)
  To: linux, perex, tiwai; +Cc: linux-kernel, alsa-devel

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

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

* [PATCH 0/4] constify ac97_pcm structures
@ 2017-08-23 12:09 ` Arvind Yadav
  0 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-23 12:09 UTC (permalink / raw)
  To: linux, perex, tiwai; +Cc: alsa-devel, linux-kernel

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

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

* [PATCH 1/4] ALSA: aaci: constify ac97_pcm structures
  2017-08-23 12:09 ` Arvind Yadav
  (?)
@ 2017-08-23 12:09 ` Arvind Yadav
  -1 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-23 12:09 UTC (permalink / raw)
  To: linux, perex, tiwai; +Cc: linux-kernel, alsa-devel

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

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

* [PATCH 2/4] ALSA: ac97c: constify ac97_pcm structures
  2017-08-23 12:09 ` Arvind Yadav
  (?)
  (?)
@ 2017-08-23 12:09 ` Arvind Yadav
  -1 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-23 12:09 UTC (permalink / raw)
  To: linux, perex, tiwai; +Cc: linux-kernel, alsa-devel

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

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

* [PATCH 3/4] ALSA: atiixp: constify ac97_pcm structures
  2017-08-23 12:09 ` Arvind Yadav
                   ` (2 preceding siblings ...)
  (?)
@ 2017-08-23 12:09 ` Arvind Yadav
  -1 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-23 12:09 UTC (permalink / raw)
  To: linux, perex, tiwai; +Cc: linux-kernel, alsa-devel

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

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

* [PATCH 4/4] ALSA: intel8x0: constify ac97_pcm structures
  2017-08-23 12:09 ` Arvind Yadav
                   ` (3 preceding siblings ...)
  (?)
@ 2017-08-23 12:09 ` Arvind Yadav
  -1 siblings, 0 replies; 8+ messages in thread
From: Arvind Yadav @ 2017-08-23 12:09 UTC (permalink / raw)
  To: linux, perex, tiwai; +Cc: linux-kernel, alsa-devel

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

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

* Re: [PATCH 0/4] constify ac97_pcm structures
  2017-08-23 12:09 ` Arvind Yadav
@ 2017-08-23 13:54   ` Takashi Iwai
  -1 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2017-08-23 13:54 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: linux, perex, alsa-devel, linux-kernel

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

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

* Re: [PATCH 0/4] constify ac97_pcm structures
@ 2017-08-23 13:54   ` Takashi Iwai
  0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2017-08-23 13:54 UTC (permalink / raw)
  To: Arvind Yadav; +Cc: linux-kernel, alsa-devel, linux

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

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

end of thread, other threads:[~2017-08-23 13:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-23 12:09 [PATCH 0/4] constify ac97_pcm structures Arvind Yadav
2017-08-23 12:09 ` Arvind Yadav
2017-08-23 12:09 ` [PATCH 1/4] ALSA: aaci: " Arvind Yadav
2017-08-23 12:09 ` [PATCH 2/4] ALSA: ac97c: " Arvind Yadav
2017-08-23 12:09 ` [PATCH 3/4] ALSA: atiixp: " Arvind Yadav
2017-08-23 12:09 ` [PATCH 4/4] ALSA: intel8x0: " Arvind Yadav
2017-08-23 13:54 ` [PATCH 0/4] " Takashi Iwai
2017-08-23 13:54   ` Takashi Iwai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.