From patchwork Mon Sep 18 08:56:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin King X-Patchwork-Id: 9955743 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BFCFE60385 for ; Mon, 18 Sep 2017 08:57:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEE8D28BF3 for ; Mon, 18 Sep 2017 08:57:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A37A728BF8; Mon, 18 Sep 2017 08:57:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 37D3A28BF3 for ; Mon, 18 Sep 2017 08:57:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=qHQ+cUnqPCUFRV24ADZJj2Dvm53LjoxunAv5WPlf9Lc=; b=toZybRAEDQp+/6 Pfg/brneRax2seqEqTR1JE4Tt7DzaB4Y7QL8TrmkRvnrkOX4pI1ECioYP/1t/xisjM269DDgN6s8C D6lXqxAuJ2bcGSp3no90x9jutsI1qBHeVCuBBtd6ngjKTkRue4aOAEUb9f3GrLEajIsRDtCgKwMP4 IWYege+5g3cvAGmpIqupu7/1LV5hS+e6rdMFN2EZPTzX4vm8fRQjxXuoea68lgSNb5HsJnofvBuxe QEnYFwh+4RBQxiFoZhEx7IiC8lU0/kA98mXjie1rIerbwIovTZ0gW1iFuLxalW4iMu07Nh8CEG1cW 5++kWnHr4C3O5QJdQChw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dtrs4-0003AB-G0; Mon, 18 Sep 2017 08:57:40 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dtrs1-00032a-08 for linux-arm-kernel@lists.infradead.org; Mon, 18 Sep 2017 08:57:38 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1dtrr5-0001vh-Ca; Mon, 18 Sep 2017 08:56:39 +0000 From: Colin King To: Jun Nie , Baoyou Xie , Shawn Guo , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org Subject: [PATCH] ASoC: zte: spdif: remove duplicate initialization of dma_data Date: Mon, 18 Sep 2017 09:56:38 +0100 Message-Id: <20170918085638.27110-1-colin.king@canonical.com> X-Mailer: git-send-email 2.14.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170918_015737_215775_22E617C0 X-CRM114-Status: UNSURE ( 9.20 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Colin Ian King dma_data is being initialized twice, remove the unused first initialization and use the latter one instead. Fixed clang warning: "warning: Value stored to 'dma_data' during its initialization is never read" Signed-off-by: Colin Ian King --- sound/soc/zte/zx-spdif.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/zte/zx-spdif.c b/sound/soc/zte/zx-spdif.c index b143f9f682d2..17b6ce35037a 100644 --- a/sound/soc/zte/zx-spdif.c +++ b/sound/soc/zte/zx-spdif.c @@ -139,11 +139,11 @@ static int zx_spdif_hw_params(struct snd_pcm_substream *substream, { struct zx_spdif_info *zx_spdif = dev_get_drvdata(socdai->dev); struct zx_spdif_info *spdif = snd_soc_dai_get_drvdata(socdai); - struct snd_dmaengine_dai_dma_data *dma_data = &zx_spdif->dma_data; + struct snd_dmaengine_dai_dma_data *dma_data = + snd_soc_dai_get_dma_data(socdai, substream); u32 val, ch_num, rate; int ret; - dma_data = snd_soc_dai_get_dma_data(socdai, substream); dma_data->addr_width = params_width(params) >> 3; val = readl_relaxed(zx_spdif->reg_base + ZX_CTRL);