mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope
@ 2016-09-09  9:09 Colin King
  2016-09-09 17:04 ` [alsa-devel] " Pierre-Louis Bossart
  2016-09-25  5:57 ` Applied "ASoC: Intel: remove status, it is shadowing status of a higher scope" to the asoc tree Mark Brown
  0 siblings, 2 replies; 4+ messages in thread
From: Colin King @ 2016-09-09  9:09 UTC (permalink / raw)
  To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
	Pierre-Louis Bossart, Vinod Koul, Jorge Fernandez Monteagudo,
	Sachin Mokashi, alsa-devel
  Cc: linux-kernel

From: Colin Ian King <colin.king@canonical.com>

The second declaration of status is shadowing the status of a higher
scope.  This uninitialized status results in garbage being returned
by the !x86_match_cpu(cpu_ids) || !iosf_mbi_available() return exit
path.  Fix this by removing the extraneous second declaration of
status.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 sound/soc/intel/atom/sst/sst_acpi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
index 773acfb..4c14215 100644
--- a/sound/soc/intel/atom/sst/sst_acpi.c
+++ b/sound/soc/intel/atom/sst/sst_acpi.c
@@ -249,7 +249,6 @@ static int is_byt_cr(struct device *dev, bool *bytcr)
 			{ X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
 			{}
 		};
-		int status;
 		u32 bios_status;
 
 		if (!x86_match_cpu(cpu_ids) || !iosf_mbi_available()) {
-- 
2.9.3

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

* Re: [alsa-devel] [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope
  2016-09-09  9:09 [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope Colin King
@ 2016-09-09 17:04 ` Pierre-Louis Bossart
  2016-09-09 17:09   ` Colin Ian King
  2016-09-25  5:57 ` Applied "ASoC: Intel: remove status, it is shadowing status of a higher scope" to the asoc tree Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Pierre-Louis Bossart @ 2016-09-09 17:04 UTC (permalink / raw)
  To: Colin King, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Vinod Koul, Jorge Fernandez Monteagudo,
	Sachin Mokashi, alsa-devel
  Cc: linux-kernel

On 9/9/16 2:09 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The second declaration of status is shadowing the status of a higher
> scope.  This uninitialized status results in garbage being returned
> by the !x86_match_cpu(cpu_ids) || !iosf_mbi_available() return exit
> path.  Fix this by removing the extraneous second declaration of
> status.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

Gah... thanks for correcting this, not sure how I missed it, was there a 
compiler warning?
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

> ---
>  sound/soc/intel/atom/sst/sst_acpi.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
> index 773acfb..4c14215 100644
> --- a/sound/soc/intel/atom/sst/sst_acpi.c
> +++ b/sound/soc/intel/atom/sst/sst_acpi.c
> @@ -249,7 +249,6 @@ static int is_byt_cr(struct device *dev, bool *bytcr)
>  			{ X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
>  			{}
>  		};
> -		int status;
>  		u32 bios_status;
>
>  		if (!x86_match_cpu(cpu_ids) || !iosf_mbi_available()) {
>

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

* Re: [alsa-devel] [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope
  2016-09-09 17:04 ` [alsa-devel] " Pierre-Louis Bossart
@ 2016-09-09 17:09   ` Colin Ian King
  0 siblings, 0 replies; 4+ messages in thread
From: Colin Ian King @ 2016-09-09 17:09 UTC (permalink / raw)
  To: Pierre-Louis Bossart, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Vinod Koul, Jorge Fernandez Monteagudo,
	Sachin Mokashi, alsa-devel
  Cc: linux-kernel

On 09/09/16 18:04, Pierre-Louis Bossart wrote:
> On 9/9/16 2:09 AM, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The second declaration of status is shadowing the status of a higher
>> scope.  This uninitialized status results in garbage being returned
>> by the !x86_match_cpu(cpu_ids) || !iosf_mbi_available() return exit
>> path.  Fix this by removing the extraneous second declaration of
>> status.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> Gah... thanks for correcting this, not sure how I missed it, was there a
> compiler warning?

static analysis tools, this time CoverityScan

> Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> 
>> ---
>>  sound/soc/intel/atom/sst/sst_acpi.c | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/sound/soc/intel/atom/sst/sst_acpi.c
>> b/sound/soc/intel/atom/sst/sst_acpi.c
>> index 773acfb..4c14215 100644
>> --- a/sound/soc/intel/atom/sst/sst_acpi.c
>> +++ b/sound/soc/intel/atom/sst/sst_acpi.c
>> @@ -249,7 +249,6 @@ static int is_byt_cr(struct device *dev, bool *bytcr)
>>              { X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
>>              {}
>>          };
>> -        int status;
>>          u32 bios_status;
>>
>>          if (!x86_match_cpu(cpu_ids) || !iosf_mbi_available()) {
>>
> 

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

* Applied "ASoC: Intel: remove status, it is shadowing status of a higher scope" to the asoc tree
  2016-09-09  9:09 [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope Colin King
  2016-09-09 17:04 ` [alsa-devel] " Pierre-Louis Bossart
@ 2016-09-25  5:57 ` Mark Brown
  1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2016-09-25  5:57 UTC (permalink / raw)
  To: Colin Ian King
  Cc: Mark Brown, Liam Girdwood, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Pierre-Louis Bossart, Vinod Koul,
	Jorge Fernandez Monteagudo, Sachin Mokashi, alsa-devel,
	linux-kernel, alsa-devel

The patch

   ASoC: Intel: remove status, it is shadowing status of a higher scope

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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 dc995069c675af71a2ecf2ade0995df084da3e2e Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@canonical.com>
Date: Fri, 9 Sep 2016 10:09:29 +0100
Subject: [PATCH] ASoC: Intel: remove status, it is shadowing status of a
 higher scope

The second declaration of status is shadowing the status of a higher
scope.  This uninitialized status results in garbage being returned
by the !x86_match_cpu(cpu_ids) || !iosf_mbi_available() return exit
path.  Fix this by removing the extraneous second declaration of
status.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/atom/sst/sst_acpi.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
index 9718e8249224..ba5c0d71720a 100644
--- a/sound/soc/intel/atom/sst/sst_acpi.c
+++ b/sound/soc/intel/atom/sst/sst_acpi.c
@@ -249,7 +249,6 @@ static int is_byt_cr(struct device *dev, bool *bytcr)
 			{ X86_VENDOR_INTEL, 6, 55 }, /* Valleyview, Bay Trail */
 			{}
 		};
-		int status;
 		u32 bios_status;
 
 		if (!x86_match_cpu(cpu_ids) || !iosf_mbi_available()) {
-- 
2.9.3

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

end of thread, other threads:[~2016-09-25  5:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-09  9:09 [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope Colin King
2016-09-09 17:04 ` [alsa-devel] " Pierre-Louis Bossart
2016-09-09 17:09   ` Colin Ian King
2016-09-25  5:57 ` Applied "ASoC: Intel: remove status, it is shadowing status of a higher scope" 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

all inboxes | Powered by JetHome®