Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1734823 > unrolled thread
| Started by | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| First post | 2017-09-19 13:20 +0200 |
| Last post | 2017-09-19 22:10 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] ALSA: hrtimer: make hrtimer_hw const and __initconst Bhumika Goyal <bhumirks@gmail.com> - 2017-09-19 13:20 +0200
Re: [PATCH] ALSA: hrtimer: make hrtimer_hw const and __initconst Takashi Iwai <tiwai@suse.de> - 2017-09-19 22:10 +0200
| From | Bhumika Goyal <bhumirks@gmail.com> |
|---|---|
| Date | 2017-09-19 13:20 +0200 |
| Subject | [PATCH] ALSA: hrtimer: make hrtimer_hw const and __initconst |
| Message-ID | <uroJk-4LH-5@gated-at.bofh.it> |
Make this const as it is only used during a copy operation. Also, make
it __initconst as it is only used during the init phase and after this
it is not referenced anywhere.
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
sound/core/hrtimer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/core/hrtimer.c b/sound/core/hrtimer.c
index 1ac0c42..5603e49 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 __initconst = {
.flags = SNDRV_TIMER_HW_AUTO | SNDRV_TIMER_HW_TASKLET,
.open = snd_hrtimer_open,
.close = snd_hrtimer_close,
--
1.9.1
[toc] | [next] | [standalone]
| From | Takashi Iwai <tiwai@suse.de> |
|---|---|
| Date | 2017-09-19 22:10 +0200 |
| Message-ID | <urx0e-1wo-23@gated-at.bofh.it> |
| In reply to | #1734823 |
On Tue, 19 Sep 2017 13:14:38 +0200, Bhumika Goyal wrote: > > Make this const as it is only used during a copy operation. Also, make > it __initconst as it is only used during the init phase and after this > it is not referenced anywhere. > > Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Applied, thanks. Takashi
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web