Skip to contentSkip to conversation

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

PATCH In review Colin King 3 participants 4 messages Sep 9, 2016 – Sep 25, 2016

Subsystems (3)
lore
Share & tools
lore

Colin King

author
#0 lore raw

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

From: Colin Ian King <[email protected]>

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.

---
 sound/soc/intel/atom/sst/sst_acpi.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/intel/atom/sst/sst_acpi.c +0 -1
index 773acfb..4c14215 100644
@@ -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()) {
Signature · 1 line
2.9.3
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Colin King

From: Colin Ian King <[email protected]>

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.

Gah... thanks for correcting this, not sure how I missed it, was there a compiler warning?

Quoted 17 lines
---
 sound/soc/intel/atom/sst/sst_acpi.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/intel/atom/sst/sst_acpi.c +0 -1
index 773acfb..4c14215 100644
@@ -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 lore raw
Quoted 9 lines · Pierre-Louis Bossart
Quoted 8 lines · Colin King

From: Colin Ian King <[email protected]>

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.

Quoted 4 lines
Quoted 1 line

Gah... thanks for correcting this, not sure how I missed it, was there a compiler warning?

static analysis tools, this time CoverityScan

Quoted 21 lines
Quoted 18 lines
---
 sound/soc/intel/atom/sst/sst_acpi.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/intel/atom/sst/sst_acpi.c +0 -1
index 773acfb..4c14215 100644
@@ -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()) {
maintainer
#3 lore raw

Applied "ASoC: Intel: remove status, it is shadowing status of a higher scope" to the asoc tree

In reply to Colin King

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

Quoted 1 line

From dc995069c675af71a2ecf2ade0995df084da3e2e Mon Sep 17 00:00:00 2001

From: Colin Ian King <[email protected]>
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.

---
 sound/soc/intel/atom/sst/sst_acpi.c | 1 -
 1 file changed, 1 deletion(-)
sound/soc/intel/atom/sst/sst_acpi.c +0 -1
index 9718e8249224..ba5c0d71720a 100644
@@ -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()) {
Signature · 1 line
2.9.3