All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] ALSA: constify snd_timer_hardware structures
@ 2017-07-28 13:08 Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 1/5] ALSA: sound/core: " Bhumika Goyal
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Bhumika Goyal @ 2017-07-28 13:08 UTC (permalink / raw)
  To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal

Declare snd_timer_hardware structures as const.

Bhumika Goyal (5):
  ALSA: sound/core: constify snd_timer_hardware structures
  ALSA: isa: constify snd_timer_hardware structures
  ALSA: pci: constify snd_timer_hardware structures
  ALSA: sparc: constify snd_timer_hardware structure
  ALSA: opl3: constify snd_timer_hardware structures

 sound/core/hrtimer.c            | 2 +-
 sound/core/pcm_timer.c          | 2 +-
 sound/core/timer.c              | 2 +-
 sound/drivers/opl3/opl3_lib.c   | 4 ++--
 sound/isa/ad1816a/ad1816a_lib.c | 2 +-
 sound/isa/gus/gus_timer.c       | 4 ++--
 sound/isa/wss/wss_lib.c         | 2 +-
 sound/pci/emu10k1/timer.c       | 2 +-
 sound/pci/ymfpci/ymfpci_main.c  | 2 +-
 sound/sparc/cs4231.c            | 2 +-
 10 files changed, 12 insertions(+), 12 deletions(-)

-- 
1.9.1

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

* [PATCH 1/5] ALSA: sound/core: constify snd_timer_hardware structures
  2017-07-28 13:08 [PATCH 0/5] ALSA: constify snd_timer_hardware structures Bhumika Goyal
@ 2017-07-28 13:08 ` Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 2/5] ALSA: isa: " Bhumika Goyal
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bhumika Goyal @ 2017-07-28 13:08 UTC (permalink / raw)
  To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal

Declare snd_timer_hardware structures as const as their only usage is
during a copy operation. As they are not modified anywhere, they can be
made const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/core/hrtimer.c   | 2 +-
 sound/core/pcm_timer.c | 2 +-
 sound/core/timer.c     | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c
index 1ac0c42..1ba70bc 100644
--- a/sound/core/hrtimer.c
+++ b/sound/core/hrtimer.c
@@ -127,7 +127,7 @@ static int snd_hrtimer_stop(struct snd_timer *t)
 	return 0;
 }
 
-static struct snd_timer_hardware hrtimer_hw = {
+static const struct snd_timer_hardware hrtimer_hw = {
 	.flags =	SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_TASKLET,
 	.open =		snd_hrtimer_open,
 	.close =	snd_hrtimer_close,
diff --git a/sound/core/pcm_timer.c b/sound/core/pcm_timer.c
index 11389f1..3aa2152 100644
--- a/sound/core/pcm_timer.c
+++ b/sound/core/pcm_timer.c
@@ -90,7 +90,7 @@ static int snd_pcm_timer_stop(struct snd_timer * timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_pcm_timer =
+static const struct snd_timer_hardware snd_pcm_timer =
 {
 	.flags =	SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_SLAVE,
 	.resolution =	0,
diff --git a/sound/core/timer.c b/sound/core/timer.c
index a9b9a27..e156aa8 100644
--- a/sound/core/timer.c
+++ b/sound/core/timer.c
@@ -1086,7 +1086,7 @@ static int snd_timer_s_close(struct snd_timer *timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_timer_system =
+static const struct snd_timer_hardware snd_timer_system =
 {
 	.flags =	SNDRV_TIMER_HW_FIRST | SNDRV_TIMER_HW_TASKLET,
 	.resolution =	1000000000L / HZ,
-- 
1.9.1

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

* [PATCH 2/5] ALSA: isa: constify snd_timer_hardware structures
  2017-07-28 13:08 [PATCH 0/5] ALSA: constify snd_timer_hardware structures Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 1/5] ALSA: sound/core: " Bhumika Goyal
@ 2017-07-28 13:08 ` Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 3/5] ALSA: pci: " Bhumika Goyal
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bhumika Goyal @ 2017-07-28 13:08 UTC (permalink / raw)
  To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal

Declare snd_timer_hardware structures as const as their only usage
is during a copy operation. As they are not modified anywhere, they can
be made const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/isa/ad1816a/ad1816a_lib.c | 2 +-
 sound/isa/gus/gus_timer.c       | 4 ++--
 sound/isa/wss/wss_lib.c         | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/sound/isa/ad1816a/ad1816a_lib.c b/sound/isa/ad1816a/ad1816a_lib.c
index 5c815f5..6130fc3 100644
--- a/sound/isa/ad1816a/ad1816a_lib.c
+++ b/sound/isa/ad1816a/ad1816a_lib.c
@@ -431,7 +431,7 @@ static int snd_ad1816a_timer_stop(struct snd_timer *timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_ad1816a_timer_table = {
+static const struct snd_timer_hardware snd_ad1816a_timer_table = {
 	.flags =	SNDRV_TIMER_HW_AUTO,
 	.resolution =	10000,
 	.ticks =	65535,
diff --git a/sound/isa/gus/gus_timer.c b/sound/isa/gus/gus_timer.c
index c537271..8fd0327 100644
--- a/sound/isa/gus/gus_timer.c
+++ b/sound/isa/gus/gus_timer.c
@@ -123,7 +123,7 @@ static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus)
 
  */
 
-static struct snd_timer_hardware snd_gf1_timer1 =
+static const struct snd_timer_hardware snd_gf1_timer1 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	80000,
@@ -132,7 +132,7 @@ static void snd_gf1_interrupt_timer2(struct snd_gus_card * gus)
 	.stop =		snd_gf1_timer1_stop,
 };
 
-static struct snd_timer_hardware snd_gf1_timer2 =
+static const struct snd_timer_hardware snd_gf1_timer2 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	320000,
diff --git a/sound/isa/wss/wss_lib.c b/sound/isa/wss/wss_lib.c
index 9f4e2e3..4016677 100644
--- a/sound/isa/wss/wss_lib.c
+++ b/sound/isa/wss/wss_lib.c
@@ -975,7 +975,7 @@ static int snd_wss_timer_close(struct snd_timer *timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_wss_timer_table =
+static const struct snd_timer_hardware snd_wss_timer_table =
 {
 	.flags =	SNDRV_TIMER_HW_AUTO,
 	.resolution =	9945,
-- 
1.9.1

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

* [PATCH 3/5] ALSA: pci: constify snd_timer_hardware structures
  2017-07-28 13:08 [PATCH 0/5] ALSA: constify snd_timer_hardware structures Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 1/5] ALSA: sound/core: " Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 2/5] ALSA: isa: " Bhumika Goyal
@ 2017-07-28 13:08 ` Bhumika Goyal
  2017-07-28 13:08 ` Bhumika Goyal
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Bhumika Goyal @ 2017-07-28 13:08 UTC (permalink / raw)
  To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal

Declare snd_timer_hardware structures as const as their only usage
is during a copy operation. As they are not modified anywhere, they
can be made const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/pci/emu10k1/timer.c      | 2 +-
 sound/pci/ymfpci/ymfpci_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/emu10k1/timer.c b/sound/pci/emu10k1/timer.c
index b69a7f8..cf43908 100644
--- a/sound/pci/emu10k1/timer.c
+++ b/sound/pci/emu10k1/timer.c
@@ -66,7 +66,7 @@ static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer,
 	return 0;
 }
 
-static struct snd_timer_hardware snd_emu10k1_timer_hw = {
+static const struct snd_timer_hardware snd_emu10k1_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
 	.ticks = 1024,
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 1114166..39b1d11 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1938,7 +1938,7 @@ static int snd_ymfpci_timer_precise_resolution(struct snd_timer *timer,
 	return 0;
 }
 
-static struct snd_timer_hardware snd_ymfpci_timer_hw = {
+static const struct snd_timer_hardware snd_ymfpci_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 10417, /* 1 / 96 kHz = 10.41666...us */
 	.ticks = 0x10000,
-- 
1.9.1

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

* [PATCH 3/5] ALSA: pci: constify snd_timer_hardware structures
  2017-07-28 13:08 [PATCH 0/5] ALSA: constify snd_timer_hardware structures Bhumika Goyal
                   ` (2 preceding siblings ...)
  2017-07-28 13:08 ` [PATCH 3/5] ALSA: pci: " Bhumika Goyal
@ 2017-07-28 13:08 ` Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 4/5] ALSA: sparc: constify snd_timer_hardware structure Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 5/5] ALSA: opl3: constify snd_timer_hardware structures Bhumika Goyal
  5 siblings, 0 replies; 7+ messages in thread
From: Bhumika Goyal @ 2017-07-28 13:08 UTC (permalink / raw)
  To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal

Declare snd_timer_hardware structures as const as their only usage
is during a copy operation. As they are not modified anywhere, they
can be made const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 sound/pci/emu10k1/timer.c      | 2 +-
 sound/pci/ymfpci/ymfpci_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/pci/emu10k1/timer.c b/sound/pci/emu10k1/timer.c
index b69a7f8..cf43908 100644
--- a/sound/pci/emu10k1/timer.c
+++ b/sound/pci/emu10k1/timer.c
@@ -66,7 +66,7 @@ static int snd_emu10k1_timer_precise_resolution(struct snd_timer *timer,
 	return 0;
 }
 
-static struct snd_timer_hardware snd_emu10k1_timer_hw = {
+static const struct snd_timer_hardware snd_emu10k1_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 20833, /* 1 sample @ 48KHZ = 20.833...us */
 	.ticks = 1024,
diff --git a/sound/pci/ymfpci/ymfpci_main.c b/sound/pci/ymfpci/ymfpci_main.c
index 1114166..39b1d11 100644
--- a/sound/pci/ymfpci/ymfpci_main.c
+++ b/sound/pci/ymfpci/ymfpci_main.c
@@ -1938,7 +1938,7 @@ static int snd_ymfpci_timer_precise_resolution(struct snd_timer *timer,
 	return 0;
 }
 
-static struct snd_timer_hardware snd_ymfpci_timer_hw = {
+static const struct snd_timer_hardware snd_ymfpci_timer_hw = {
 	.flags = SNDRV_TIMER_HW_AUTO,
 	.resolution = 10417, /* 1 / 96 kHz = 10.41666...us */
 	.ticks = 0x10000,
-- 
1.9.1

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

* [PATCH 4/5] ALSA: sparc: constify snd_timer_hardware structure
  2017-07-28 13:08 [PATCH 0/5] ALSA: constify snd_timer_hardware structures Bhumika Goyal
                   ` (3 preceding siblings ...)
  2017-07-28 13:08 ` Bhumika Goyal
@ 2017-07-28 13:08 ` Bhumika Goyal
  2017-07-28 13:08 ` [PATCH 5/5] ALSA: opl3: constify snd_timer_hardware structures Bhumika Goyal
  5 siblings, 0 replies; 7+ messages in thread
From: Bhumika Goyal @ 2017-07-28 13:08 UTC (permalink / raw)
  To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal

Declare snd_timer_hardware structure as const as it is only used
during a copy operation. As it is  not modified anywhere, it
can be made const.

Cross compiled for sparc architecture.

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

diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c
index 3d7d425..0a97e97 100644
--- a/sound/sparc/cs4231.c
+++ b/sound/sparc/cs4231.c
@@ -868,7 +868,7 @@ static int snd_cs4231_timer_close(struct snd_timer *timer)
 	return 0;
 }
 
-static struct snd_timer_hardware snd_cs4231_timer_table = {
+static const struct snd_timer_hardware snd_cs4231_timer_table = {
 	.flags		=	SNDRV_TIMER_HW_AUTO,
 	.resolution	=	9945,
 	.ticks		=	65535,
-- 
1.9.1

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

* [PATCH 5/5] ALSA: opl3: constify snd_timer_hardware structures
  2017-07-28 13:08 [PATCH 0/5] ALSA: constify snd_timer_hardware structures Bhumika Goyal
                   ` (4 preceding siblings ...)
  2017-07-28 13:08 ` [PATCH 4/5] ALSA: sparc: constify snd_timer_hardware structure Bhumika Goyal
@ 2017-07-28 13:08 ` Bhumika Goyal
  5 siblings, 0 replies; 7+ messages in thread
From: Bhumika Goyal @ 2017-07-28 13:08 UTC (permalink / raw)
  To: julia.lawall, perex, tiwai, alsa-devel, linux-kernel; +Cc: Bhumika Goyal

Declare snd_timer_hardware structures as const as their only usage
is during a copy operation. As they are not modified anywhere, they
can be made const.

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

diff --git a/sound/drivers/opl3/opl3_lib.c b/sound/drivers/opl3/opl3_lib.c
index d5e5b46..5259904 100644
--- a/sound/drivers/opl3/opl3_lib.c
+++ b/sound/drivers/opl3/opl3_lib.c
@@ -229,7 +229,7 @@ static int snd_opl3_timer2_stop(struct snd_timer * timer)
 
  */
 
-static struct snd_timer_hardware snd_opl3_timer1 =
+static const struct snd_timer_hardware snd_opl3_timer1 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	80000,
@@ -238,7 +238,7 @@ static int snd_opl3_timer2_stop(struct snd_timer * timer)
 	.stop =		snd_opl3_timer1_stop,
 };
 
-static struct snd_timer_hardware snd_opl3_timer2 =
+static const struct snd_timer_hardware snd_opl3_timer2 =
 {
 	.flags =	SNDRV_TIMER_HW_STOP,
 	.resolution =	320000,
-- 
1.9.1

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

end of thread, other threads:[~2017-07-28 13:09 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28 13:08 [PATCH 0/5] ALSA: constify snd_timer_hardware structures Bhumika Goyal
2017-07-28 13:08 ` [PATCH 1/5] ALSA: sound/core: " Bhumika Goyal
2017-07-28 13:08 ` [PATCH 2/5] ALSA: isa: " Bhumika Goyal
2017-07-28 13:08 ` [PATCH 3/5] ALSA: pci: " Bhumika Goyal
2017-07-28 13:08 ` Bhumika Goyal
2017-07-28 13:08 ` [PATCH 4/5] ALSA: sparc: constify snd_timer_hardware structure Bhumika Goyal
2017-07-28 13:08 ` [PATCH 5/5] ALSA: opl3: constify snd_timer_hardware structures Bhumika Goyal

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.