Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1786138pxf; Fri, 26 Mar 2021 15:01:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxRiycpnIHA1paRdmYGUIArKdnPmoDelk4qjzwwzWIvuDweHz2hRSIp3U/jEPWxctrKjlRX X-Received: by 2002:a17:906:32d1:: with SMTP id k17mr17573693ejk.94.1616796083312; Fri, 26 Mar 2021 15:01:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616796083; cv=none; d=google.com; s=arc-20160816; b=JcomolaMuFNBLXu9WBsl2mymgV96Blw3pD73HY8QprHlcj4p/gbhzYn7oTKF1B8bIE Iq19aDxp6/82z4Z8TwPmhxqaGpOD+SWReUL4poNFqomYIeITnD/iS5h4FLT/GCAEZGit ZzQcqzwM9xB3K4qaIQywsaGKj1xTUWUkbZYBfdGa5AAS1Knfg3kOpAPr5ASpmBrAqa5I A3gc5MFp6tDurg+qJn1pIvCTFefFKqDMyvdu6yVEedAOue8Nxk/boaV420we1nr9phNq CtC7unK/0ZJukr6fttpSSFdGzwMvkOsOita7ISVVkbJgFnM4LqN0Q7wkGnokwc2vcNw0 efqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :ironport-sdr:ironport-sdr; bh=mwTayKfdWhsQ9G8yUsjEepxYfgz5vd50dSIC6KQpc4M=; b=elbkHHN3HZAVUUwUhrOW54DdxGe+gdfct4odBzqSuPSF1gPiPxlyWgj8W0XrnIEtM3 MPEvBNA7qcwp/4Ec60VuiU+3uIHO3QwIOxOkEOZXC/s5X1RummeL4/ielJbP8mb6yo8X Ov/Tdj0uVSDJr7eNBCOvUc5GBrIsKHg52sF4MTgyM7SA9WvehgIlDydhQDYqhArVeTid Fl9dGgT+YHxYM8tC6Suhvd1WoUapv1+7crqrTWIVm6+kR1a6so3C2x4CRhq4VcaqagrD ATViv3DgkQ14qZSmeGIYGShkdBHTTYiBoXDfw8ndvoYUDOkFlH7uE0C6O3feEky3ilKc rAWw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b13si8311314edd.315.2021.03.26.15.01.00; Fri, 26 Mar 2021 15:01:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230259AbhCZWAG (ORCPT + 99 others); Fri, 26 Mar 2021 18:00:06 -0400 Received: from mga04.intel.com ([192.55.52.120]:61331 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229986AbhCZV74 (ORCPT ); Fri, 26 Mar 2021 17:59:56 -0400 IronPort-SDR: UhI1LVE7DV7ffRdZkLSTvsqhpnc/mclpfYiZ+d9S9JXUmTglTYXs/cLYwKfLlvd7D4W53MsaGV PjuahNSxYSFw== X-IronPort-AV: E=McAfee;i="6000,8403,9935"; a="188957049" X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="188957049" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 14:59:55 -0700 IronPort-SDR: E1QfgjgQw2m1lH8XameoimNYsq2MdB6pLPQThMcCx6idS3GSO/WYdM8tG1Onua6FDLsW3mfSVo +zMipEVbq3OA== X-IronPort-AV: E=Sophos;i="5.81,281,1610438400"; d="scan'208";a="416706677" Received: from zcmahone-mobl1.amr.corp.intel.com (HELO pbossart-mobl3.intel.com) ([10.255.231.203]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Mar 2021 14:59:54 -0700 From: Pierre-Louis Bossart To: alsa-devel@alsa-project.org Cc: tiwai@suse.de, broonie@kernel.org, linux-kernel@vger.kernel.org, Pierre-Louis Bossart , Codrin Ciubotariu , Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Nicolas Ferre , Alexandre Belloni , Ludovic Desroches , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Microchip (AT91) SoC support) Subject: [PATCH 02/17] ASoC: atmel: fix shadowed variable Date: Fri, 26 Mar 2021 16:59:12 -0500 Message-Id: <20210326215927.936377-3-pierre-louis.bossart@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> References: <20210326215927.936377-1-pierre-louis.bossart@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fix cppcheck warning: sound/soc/atmel/atmel-classd.c:51:14: style: Local variable 'pwm_type' shadows outer variable [shadowVariable] const char *pwm_type; ^ sound/soc/atmel/atmel-classd.c:226:27: note: Shadowed declaration static const char * const pwm_type[] = { ^ sound/soc/atmel/atmel-classd.c:51:14: note: Shadow variable const char *pwm_type; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/atmel/atmel-classd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/atmel/atmel-classd.c b/sound/soc/atmel/atmel-classd.c index b1a28a9382fb..6023369e0f1a 100644 --- a/sound/soc/atmel/atmel-classd.c +++ b/sound/soc/atmel/atmel-classd.c @@ -48,7 +48,7 @@ static struct atmel_classd_pdata *atmel_classd_dt_init(struct device *dev) { struct device_node *np = dev->of_node; struct atmel_classd_pdata *pdata; - const char *pwm_type; + const char *pwm_type_s; int ret; if (!np) { @@ -60,8 +60,8 @@ static struct atmel_classd_pdata *atmel_classd_dt_init(struct device *dev) if (!pdata) return ERR_PTR(-ENOMEM); - ret = of_property_read_string(np, "atmel,pwm-type", &pwm_type); - if ((ret == 0) && (strcmp(pwm_type, "diff") == 0)) + ret = of_property_read_string(np, "atmel,pwm-type", &pwm_type_s); + if ((ret == 0) && (strcmp(pwm_type_s, "diff") == 0)) pdata->pwm_type = CLASSD_MR_PWMTYP_DIFF; else pdata->pwm_type = CLASSD_MR_PWMTYP_SINGLE; -- 2.25.1