From patchwork Fri Sep 4 11:39:06 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joerg Roedel X-Patchwork-Id: 11756799 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 771EB138C for ; Fri, 4 Sep 2020 11:40:42 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 512552073B for ; Fri, 4 Sep 2020 11:40:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="HF9DhqL5" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 512552073B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.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=8cGAswbWJVxEDR8MBmBKaCJA2eSBOKtMNUcdaVXk2NE=; b=HF9DhqL5ai26b7bU7mb4nqKLUb rI3jTniUbQ72vhLSsZ4qZv/MdsZQr85fueOGVyCT59FgrenRoMwik5vZXeSV1+PVyajsbkCAfKbtW IHmzq8D21k/WdMExb/gpnV2vR9x6bacaaWDnV+cyM7w7LXOAZ6X0uOgUXW5pUaYTNe/gFtJgyxUnm vf55U+d/VqBmyGulHNMOuyT7Cp+Ykmq2H7z33ORKfCsSA86SHc3hhiwfoqpfMO/Y0OLeUCUXsJo1h r33wnYoA97BC/yJkNWj74Ova7JJNiaq2rLlCtBUxYTLMWgo4IlzhP9jjE4j/GwQHR2se/WmPhdXr7 8Pplcf0Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEA3j-0000Mg-EE; Fri, 04 Sep 2020 11:39:11 +0000 Received: from 8bytes.org ([81.169.241.247] helo=theia.8bytes.org) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEA3h-0000Lv-0d for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2020 11:39:09 +0000 Received: from cap.home.8bytes.org (p549add56.dip0.t-ipconnect.de [84.154.221.86]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by theia.8bytes.org (Postfix) with ESMTPSA id DDBCD249; Fri, 4 Sep 2020 13:39:07 +0200 (CEST) From: Joerg Roedel To: Joerg Roedel Subject: [PATCH] iommu/sun50i: Fix set-but-not-used variable warning Date: Fri, 4 Sep 2020 13:39:06 +0200 Message-Id: <20200904113906.3906-1-joro@8bytes.org> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200904_073909_173708_F935DC9C X-CRM114-Status: GOOD ( 15.10 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Joerg Roedel , kernel test robot , iommu@lists.linux-foundation.org, Maxime Ripard , linux-kernel@vger.kernel.org, Chen-Yu Tsai , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org From: Joerg Roedel Fix the following warning the the SUN50I driver: drivers/iommu/sun50i-iommu.c: In function 'sun50i_iommu_irq': drivers/iommu/sun50i-iommu.c:890:14: warning: variable 'iova' set but not used [-Wunused-but-set-variable] 890 | phys_addr_t iova; | ^~~~ Reported-by: kernel test robot Signed-off-by: Joerg Roedel Acked-by: Maxime Ripard --- drivers/iommu/sun50i-iommu.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/iommu/sun50i-iommu.c b/drivers/iommu/sun50i-iommu.c index 3b1bf2fb94f5..ea6db1341916 100644 --- a/drivers/iommu/sun50i-iommu.c +++ b/drivers/iommu/sun50i-iommu.c @@ -881,7 +881,6 @@ static phys_addr_t sun50i_iommu_handle_perm_irq(struct sun50i_iommu *iommu) static irqreturn_t sun50i_iommu_irq(int irq, void *dev_id) { struct sun50i_iommu *iommu = dev_id; - phys_addr_t iova; u32 status; spin_lock(&iommu->iommu_lock); @@ -893,15 +892,15 @@ static irqreturn_t sun50i_iommu_irq(int irq, void *dev_id) } if (status & IOMMU_INT_INVALID_L2PG) - iova = sun50i_iommu_handle_pt_irq(iommu, - IOMMU_INT_ERR_ADDR_L2_REG, - IOMMU_L2PG_INT_REG); + sun50i_iommu_handle_pt_irq(iommu, + IOMMU_INT_ERR_ADDR_L2_REG, + IOMMU_L2PG_INT_REG); else if (status & IOMMU_INT_INVALID_L1PG) - iova = sun50i_iommu_handle_pt_irq(iommu, - IOMMU_INT_ERR_ADDR_L1_REG, - IOMMU_L1PG_INT_REG); + sun50i_iommu_handle_pt_irq(iommu, + IOMMU_INT_ERR_ADDR_L1_REG, + IOMMU_L1PG_INT_REG); else - iova = sun50i_iommu_handle_perm_irq(iommu); + sun50i_iommu_handle_perm_irq(iommu); iommu_write(iommu, IOMMU_INT_CLR_REG, status);