* [PATCH -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'
@ 2019-04-17 15:11 Yue Haibing
2019-04-17 17:41 ` [alsa-devel] " Pierre-Louis Bossart
2019-04-18 2:48 ` [PATCH v2 " Yue Haibing
0 siblings, 2 replies; 6+ messages in thread
From: Yue Haibing @ 2019-04-17 15:11 UTC (permalink / raw)
To: pierre-louis.bossart, liam.r.girdwood, yang.jie, broonie, perex, tiwai
Cc: linux-kernel, alsa-devel, YueHaibing
From: YueHaibing <yuehaibing@huawei.com>
Fixes gcc '-Wunused-but-set-variable' warning:
sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message':
sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable]
It is never used since introduction in
commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
sound/soc/intel/haswell/sst-haswell-ipc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c
index 31fcdf12..4d3de99 100644
--- a/sound/soc/intel/haswell/sst-haswell-ipc.c
+++ b/sound/soc/intel/haswell/sst-haswell-ipc.c
@@ -672,7 +672,6 @@ static int hsw_stream_message(struct sst_hsw *hsw, u32 header)
stream_msg = msg_get_stream_type(header);
stream_id = msg_get_stream_id(header);
- stage_type = msg_get_stage_type(header);
stream = get_stream_by_id(hsw, stream_id);
if (stream == NULL)
--
2.7.4
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [alsa-devel] [PATCH -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' 2019-04-17 15:11 [PATCH -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' Yue Haibing @ 2019-04-17 17:41 ` Pierre-Louis Bossart 2019-04-18 1:25 ` YueHaibing 2019-04-18 2:48 ` [PATCH v2 " Yue Haibing 1 sibling, 1 reply; 6+ messages in thread From: Pierre-Louis Bossart @ 2019-04-17 17:41 UTC (permalink / raw) To: Yue Haibing, liam.r.girdwood, yang.jie, broonie, perex, tiwai Cc: alsa-devel, linux-kernel On 4/17/19 10:11 AM, Yue Haibing wrote: > From: YueHaibing <yuehaibing@huawei.com> > > Fixes gcc '-Wunused-but-set-variable' warning: > > sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': > sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable] > > It is never used since introduction in > commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in") Thanks for the patch. I think you could go further in the cleanup and remove both the variable declaration and the static inline mst_get_stage_type that will also be useless as a consequence of this assignment removal. Care to send a v2? > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> > --- > sound/soc/intel/haswell/sst-haswell-ipc.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c > index 31fcdf12..4d3de99 100644 > --- a/sound/soc/intel/haswell/sst-haswell-ipc.c > +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c > @@ -672,7 +672,6 @@ static int hsw_stream_message(struct sst_hsw *hsw, u32 header) > > stream_msg = msg_get_stream_type(header); > stream_id = msg_get_stream_id(header); > - stage_type = msg_get_stage_type(header); > > stream = get_stream_by_id(hsw, stream_id); > if (stream == NULL) > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [alsa-devel] [PATCH -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' 2019-04-17 17:41 ` [alsa-devel] " Pierre-Louis Bossart @ 2019-04-18 1:25 ` YueHaibing 0 siblings, 0 replies; 6+ messages in thread From: YueHaibing @ 2019-04-18 1:25 UTC (permalink / raw) To: Pierre-Louis Bossart, liam.r.girdwood, yang.jie, broonie, perex, tiwai Cc: alsa-devel, linux-kernel On 2019/4/18 1:41, Pierre-Louis Bossart wrote: > On 4/17/19 10:11 AM, Yue Haibing wrote: >> From: YueHaibing <yuehaibing@huawei.com> >> >> Fixes gcc '-Wunused-but-set-variable' warning: >> >> sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': >> sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable] >> >> It is never used since introduction in >> commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in") > > Thanks for the patch. > > I think you could go further in the cleanup and remove both the variable declaration and the static inline mst_get_stage_type that will also be useless as a consequence of this assignment removal. You are right. > > Care to send a v2? Sure, will do that,thanks! > >> >> Signed-off-by: YueHaibing <yuehaibing@huawei.com> >> --- >> sound/soc/intel/haswell/sst-haswell-ipc.c | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c >> index 31fcdf12..4d3de99 100644 >> --- a/sound/soc/intel/haswell/sst-haswell-ipc.c >> +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c >> @@ -672,7 +672,6 @@ static int hsw_stream_message(struct sst_hsw *hsw, u32 header) >> stream_msg = msg_get_stream_type(header); >> stream_id = msg_get_stream_id(header); >> - stage_type = msg_get_stage_type(header); >> stream = get_stream_by_id(hsw, stream_id); >> if (stream == NULL) >> > > > . > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' 2019-04-17 15:11 [PATCH -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' Yue Haibing 2019-04-17 17:41 ` [alsa-devel] " Pierre-Louis Bossart @ 2019-04-18 2:48 ` Yue Haibing 2019-04-18 12:54 ` [alsa-devel] " Pierre-Louis Bossart 2019-04-19 16:14 ` Applied "ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'" to the asoc tree Mark Brown 1 sibling, 2 replies; 6+ messages in thread From: Yue Haibing @ 2019-04-18 2:48 UTC (permalink / raw) To: pierre-louis.bossart, liam.r.girdwood, yang.jie, broonie, perex, tiwai Cc: linux-kernel, alsa-devel, YueHaibing From: YueHaibing <yuehaibing@huawei.com> Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable] It is never used since introduction in commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in") Signed-off-by: YueHaibing <yuehaibing@huawei.com> --- v2: also remove the variable declaration and the static inline mst_get_stage_type --- sound/soc/intel/haswell/sst-haswell-ipc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c index 31fcdf12..74acf9c 100644 --- a/sound/soc/intel/haswell/sst-haswell-ipc.c +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c @@ -345,11 +345,6 @@ static inline u32 msg_get_stream_type(u32 msg) return (msg & IPC_STR_TYPE_MASK) >> IPC_STR_TYPE_SHIFT; } -static inline u32 msg_get_stage_type(u32 msg) -{ - return (msg & IPC_STG_TYPE_MASK) >> IPC_STG_TYPE_SHIFT; -} - static inline u32 msg_get_stream_id(u32 msg) { return (msg & IPC_STR_ID_MASK) >> IPC_STR_ID_SHIFT; @@ -666,13 +661,12 @@ static int hsw_module_message(struct sst_hsw *hsw, u32 header) static int hsw_stream_message(struct sst_hsw *hsw, u32 header) { - u32 stream_msg, stream_id, stage_type; + u32 stream_msg, stream_id; struct sst_hsw_stream *stream; int handled = 0; stream_msg = msg_get_stream_type(header); stream_id = msg_get_stream_id(header); - stage_type = msg_get_stage_type(header); stream = get_stream_by_id(hsw, stream_id); if (stream == NULL) -- 2.7.4 ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [alsa-devel] [PATCH v2 -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' 2019-04-18 2:48 ` [PATCH v2 " Yue Haibing @ 2019-04-18 12:54 ` Pierre-Louis Bossart 2019-04-19 16:14 ` Applied "ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'" to the asoc tree Mark Brown 1 sibling, 0 replies; 6+ messages in thread From: Pierre-Louis Bossart @ 2019-04-18 12:54 UTC (permalink / raw) To: Yue Haibing, liam.r.girdwood, yang.jie, broonie, perex, tiwai Cc: linux-kernel, alsa-devel On 4/17/19 9:48 PM, Yue Haibing wrote: > From: YueHaibing <yuehaibing@huawei.com> > > Fixes gcc '-Wunused-but-set-variable' warning: > > sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': > sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable] > > It is never used since introduction in > commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in") > > Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Thanks! > --- > v2: also remove the variable declaration and the static inline mst_get_stage_type > --- > sound/soc/intel/haswell/sst-haswell-ipc.c | 8 +------- > 1 file changed, 1 insertion(+), 7 deletions(-) > > diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c > index 31fcdf12..74acf9c 100644 > --- a/sound/soc/intel/haswell/sst-haswell-ipc.c > +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c > @@ -345,11 +345,6 @@ static inline u32 msg_get_stream_type(u32 msg) > return (msg & IPC_STR_TYPE_MASK) >> IPC_STR_TYPE_SHIFT; > } > > -static inline u32 msg_get_stage_type(u32 msg) > -{ > - return (msg & IPC_STG_TYPE_MASK) >> IPC_STG_TYPE_SHIFT; > -} > - > static inline u32 msg_get_stream_id(u32 msg) > { > return (msg & IPC_STR_ID_MASK) >> IPC_STR_ID_SHIFT; > @@ -666,13 +661,12 @@ static int hsw_module_message(struct sst_hsw *hsw, u32 header) > > static int hsw_stream_message(struct sst_hsw *hsw, u32 header) > { > - u32 stream_msg, stream_id, stage_type; > + u32 stream_msg, stream_id; > struct sst_hsw_stream *stream; > int handled = 0; > > stream_msg = msg_get_stream_type(header); > stream_id = msg_get_stream_id(header); > - stage_type = msg_get_stage_type(header); > > stream = get_stream_by_id(hsw, stream_id); > if (stream == NULL) > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Applied "ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'" to the asoc tree 2019-04-18 2:48 ` [PATCH v2 " Yue Haibing 2019-04-18 12:54 ` [alsa-devel] " Pierre-Louis Bossart @ 2019-04-19 16:14 ` Mark Brown 1 sibling, 0 replies; 6+ messages in thread From: Mark Brown @ 2019-04-19 16:14 UTC (permalink / raw) To: YueHaibing Cc: alsa-devel, broonie, liam.r.girdwood, linux-kernel, Mark Brown, perex, pierre-louis.bossart, Pierre-Louis Bossart, tiwai, yang.jie The patch ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' has been applied to the asoc tree at https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-5.2 All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted. You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed. If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced. Please add any relevant lists and maintainers to the CCs when replying to this mail. Thanks, Mark From 479879701758206a2cc75176119fcc9dacc40846 Mon Sep 17 00:00:00 2001 From: YueHaibing <yuehaibing@huawei.com> Date: Thu, 18 Apr 2019 10:48:48 +0800 Subject: [PATCH] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' Fixes gcc '-Wunused-but-set-variable' warning: sound/soc/intel/haswell/sst-haswell-ipc.c: In function 'hsw_stream_message': sound/soc/intel/haswell/sst-haswell-ipc.c:669:29: warning: variable 'stage_type' set but not used [-Wunused-but-set-variable] It is never used since introduction in commit ba57f68235cf ("ASoC: Intel: create haswell folder and move haswell platform files in") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> --- sound/soc/intel/haswell/sst-haswell-ipc.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/sound/soc/intel/haswell/sst-haswell-ipc.c b/sound/soc/intel/haswell/sst-haswell-ipc.c index 31fcdf12c67d..74acf9c65161 100644 --- a/sound/soc/intel/haswell/sst-haswell-ipc.c +++ b/sound/soc/intel/haswell/sst-haswell-ipc.c @@ -345,11 +345,6 @@ static inline u32 msg_get_stream_type(u32 msg) return (msg & IPC_STR_TYPE_MASK) >> IPC_STR_TYPE_SHIFT; } -static inline u32 msg_get_stage_type(u32 msg) -{ - return (msg & IPC_STG_TYPE_MASK) >> IPC_STG_TYPE_SHIFT; -} - static inline u32 msg_get_stream_id(u32 msg) { return (msg & IPC_STR_ID_MASK) >> IPC_STR_ID_SHIFT; @@ -666,13 +661,12 @@ static int hsw_module_message(struct sst_hsw *hsw, u32 header) static int hsw_stream_message(struct sst_hsw *hsw, u32 header) { - u32 stream_msg, stream_id, stage_type; + u32 stream_msg, stream_id; struct sst_hsw_stream *stream; int handled = 0; stream_msg = msg_get_stream_type(header); stream_id = msg_get_stream_id(header); - stage_type = msg_get_stage_type(header); stream = get_stream_by_id(hsw, stream_id); if (stream == NULL) -- 2.20.1 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-04-19 18:20 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2019-04-17 15:11 [PATCH -next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' Yue Haibing 2019-04-17 17:41 ` [alsa-devel] " Pierre-Louis Bossart 2019-04-18 1:25 ` YueHaibing 2019-04-18 2:48 ` [PATCH v2 " Yue Haibing 2019-04-18 12:54 ` [alsa-devel] " Pierre-Louis Bossart 2019-04-19 16:14 ` Applied "ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'" to the asoc tree Mark Brown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
Powered by JetHome