diff mbox series

[-next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type'

Message ID 20190417151140.20320-1-yuehaibing@huawei.com (mailing list archive)
State New, archived
Headers show
Series [-next] ASoC: Intel: Haswell: Remove set but not used variable 'stage_type' | expand

Commit Message

Yue Haibing April 17, 2019, 3:11 p.m. UTC
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(-)

Comments

Pierre-Louis Bossart April 17, 2019, 5:41 p.m. UTC | #1
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)
>
Yue Haibing April 18, 2019, 1:25 a.m. UTC | #2
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)
>>
> 
> 
> .
>
diff mbox series

Patch

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)