From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752060AbcIIRE3 (ORCPT ); Fri, 9 Sep 2016 13:04:29 -0400 Received: from mga14.intel.com ([192.55.52.115]:46266 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750938AbcIIRE2 (ORCPT ); Fri, 9 Sep 2016 13:04:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,305,1470726000"; d="scan'208";a="1053702822" Subject: Re: [alsa-devel] [PATCH] ASoC: Intel: remove status, it is shadowing status of a higher scope To: Colin King , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Vinod Koul , Jorge Fernandez Monteagudo , Sachin Mokashi , alsa-devel@alsa-project.org References: <20160909090929.27845-1-colin.king@canonical.com> Cc: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart Message-ID: <2232d5d3-2a14-aa13-b41c-ae90fe530357@linux.intel.com> Date: Fri, 9 Sep 2016 10:04:22 -0700 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 In-Reply-To: <20160909090929.27845-1-colin.king@canonical.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 9/9/16 2:09 AM, Colin King wrote: > From: Colin Ian King > > 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 Gah... thanks for correcting this, not sure how I missed it, was there a compiler warning? Acked-by: Pierre-Louis Bossart > --- > 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()) { >