Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp185722ybg; Tue, 2 Jun 2020 20:52:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzXpXFYlPNFucHZqD1yf9zgRDOS6UoO93Je1D7ZeblqVG86plf38cN8l5JcI10MwyJBECCn X-Received: by 2002:a17:906:73d5:: with SMTP id n21mr6023519ejl.24.1591156352264; Tue, 02 Jun 2020 20:52:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591156352; cv=none; d=google.com; s=arc-20160816; b=sgcS/ZUBIn78sKTCnxl6rHzx1dz5Zb6RuJMOgu1Cawhd7XoDvnsInJaM1qz7T/hlXB 1kAC6BZ20mssM2eDuMCjtMgiHPPm8spsRCImgztHUwcRyJWLL84jwAegMr/G9AUWZ/7I oL2Tg34Uk9bb/tgCl81UIhTtGkcZUtgNc01bB5L3AD5UTDElkISyRKixbVPMe1nJ1ofn sQvYzcaq29aTE7Wu367Rw36b/ZpVgEtIvq0EhmORYaNKz+7OoEndMlrfHLlG1W3IWwxG NSLjR7BGkCl256r7myu/OeowquSTmj7rcYaGOwuYHZlgZe6v6pdptm5O/Kk5Opl4IC81 JmVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=mb0wSx9IteHfi20/Ia3FzJD7V+/lc8yx+G47lQlyF8k=; b=JPAGfwgWBhCAvgI3aXEPLdAF7iMWpTPu/W0CWKx+I9ML+5e6VPULREE6eteA/D/jFz GqekZg2g8FvheJUEG31ucdkSJ17+iE7PrnACBs0OT+SAvSooX+ipdxUfZHjehnImd9Bz 37WWt3HFrqCHRbgcSBliAiLpStm3vZfVVt2pTbUi8Q0+wNwZMCD0Mot2khr5vb8eU9Tm lQeVk8yq4tyaEFnMqrPMlbVE85bl0isXQeRaEiCP+2SWvlwmZLycya5JVY7t/57UwQS9 k9/Uoyw6/zbrmxg1XcyCcwd3vMS/Qzs+NDyYcoQ4crgrYZYu72CmFgDwsXknS8kEOeE6 SwjA== 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=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si425760edr.214.2020.06.02.20.52.10; Tue, 02 Jun 2020 20:52:32 -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=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726861AbgFCDuV (ORCPT + 99 others); Tue, 2 Jun 2020 23:50:21 -0400 Received: from inva021.nxp.com ([92.121.34.21]:37276 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726077AbgFCDuS (ORCPT ); Tue, 2 Jun 2020 23:50:18 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1B73D200CD6; Wed, 3 Jun 2020 05:50:16 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 8F6FD200CC3; Wed, 3 Jun 2020 05:50:11 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 81F9C402DF; Wed, 3 Jun 2020 11:50:05 +0800 (SGT) From: Shengjiu Wang To: timur@kernel.org, nicoleotsuka@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, broonie@kernel.org, alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz, tiwai@suse.com Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/3] ASoC: fsl_easrc: Fix -Wunused-but-set-variable Date: Wed, 3 Jun 2020 11:39:40 +0800 Message-Id: <91ceb59e3bce31c9e93abba06f5156692ff5c71e.1591155860.git.shengjiu.wang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Obtained with: $ make W=1 sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_set_rs_ratio': sound/soc/fsl/fsl_easrc.c:182:15: warning: variable 'int_bits' set but not used [-Wunused-but-set-variable] unsigned int int_bits; ^ sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_set_ctx_organziation': sound/soc/fsl/fsl_easrc.c:1204:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] struct device *dev; ^ sound/soc/fsl/fsl_easrc.c: In function 'fsl_easrc_release_context': sound/soc/fsl/fsl_easrc.c:1294:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] struct device *dev; ^ Fixes: 955ac624058f ("ASoC: fsl_easrc: Add EASRC ASoC CPU DAI drivers") Signed-off-by: Shengjiu Wang Reported-by: kbuild test robot --- sound/soc/fsl/fsl_easrc.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/sound/soc/fsl/fsl_easrc.c b/sound/soc/fsl/fsl_easrc.c index f227308a50e2..7d8bf9d47842 100644 --- a/sound/soc/fsl/fsl_easrc.c +++ b/sound/soc/fsl/fsl_easrc.c @@ -179,22 +179,21 @@ static int fsl_easrc_set_rs_ratio(struct fsl_asrc_pair *ctx) struct fsl_easrc_ctx_priv *ctx_priv = ctx->private; unsigned int in_rate = ctx_priv->in_params.norm_rate; unsigned int out_rate = ctx_priv->out_params.norm_rate; - unsigned int int_bits; unsigned int frac_bits; u64 val; u32 *r; switch (easrc_priv->rs_num_taps) { case EASRC_RS_32_TAPS: - int_bits = 5; + /* integer bits = 5; */ frac_bits = 39; break; case EASRC_RS_64_TAPS: - int_bits = 6; + /* integer bits = 6; */ frac_bits = 38; break; case EASRC_RS_128_TAPS: - int_bits = 7; + /* integer bits = 7; */ frac_bits = 37; break; default: @@ -1201,7 +1200,6 @@ static int fsl_easrc_set_ctx_format(struct fsl_asrc_pair *ctx, static int fsl_easrc_set_ctx_organziation(struct fsl_asrc_pair *ctx) { struct fsl_easrc_ctx_priv *ctx_priv; - struct device *dev; struct fsl_asrc *easrc; if (!ctx) @@ -1209,7 +1207,6 @@ static int fsl_easrc_set_ctx_organziation(struct fsl_asrc_pair *ctx) easrc = ctx->asrc; ctx_priv = ctx->private; - dev = &easrc->pdev->dev; /* input interleaving parameters */ regmap_update_bits(easrc->regmap, REG_EASRC_CIA(ctx->index), @@ -1291,13 +1288,11 @@ static void fsl_easrc_release_context(struct fsl_asrc_pair *ctx) { unsigned long lock_flags; struct fsl_asrc *easrc; - struct device *dev; if (!ctx) return; easrc = ctx->asrc; - dev = &easrc->pdev->dev; spin_lock_irqsave(&easrc->lock, lock_flags); -- 2.21.0