From patchwork Fri Feb 25 09:32:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 12759990 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8F81C433FE for ; Fri, 25 Feb 2022 09:34:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :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=dMXMaRx9EaoGIPay8nWWjobNsnXJwdMF85xNUgty2V4=; b=VmqZ9nJ+lfIaRJ R6clivArtB/cH07gbexLaag6pczwBPQNnc91Ex7NpLtv3VnLRiCSdmsA/WA+s6damRGkMXKCaq4Lr S4MxlOkZ2iXJ8qXG9ghP+D+K5+jD+HXHDAEBhvekgPjjtezhfX+ENGXr8/LFapGl4HfKHEqnYWGIA qbj/5B4BBuUQdjkrem22c7KTfZFF+V5ZGFHw53JRu1OFL5JhRTe9K1Pr9SGwPsfsrB8PsiPW3Abkb 9vjVl+hpTY/pREljn1mZiKIsU6VKYOrLtcm8+28NxuzpyrAstSfWoC1Qeee27GPgYcFZAoFCLKQbW na3XIlapQL/AL+YNnNHA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNWy3-004BWp-2q; Fri, 25 Feb 2022 09:32:51 +0000 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNWxy-004BUR-7g for linux-arm-kernel@lists.infradead.org; Fri, 25 Feb 2022 09:32:47 +0000 Received: by mail-wm1-x333.google.com with SMTP id bg16-20020a05600c3c9000b00380f6f473b0so1303048wmb.1 for ; Fri, 25 Feb 2022 01:32:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/Anr/HpsJ2V3LE7H1qAJzQqqWy2ZK47ULNqlFEib6tU=; b=P7ly3xMyPOrr3B0325E0teDM/lnRIOn9XJo7vDUt6oM76ogcTuQmAW6QSIVXm06n6x clY6WFc+TmNkhiQfhXRr8z+8+GnhlhufGuUcCpWy72mXjFb/viNp1REsO6MooFRkqJKW LiKPKOSqw2QbIhK8uF5COvxCOU35Ijtfx4xyKac9cRmg7dMheotudn9S9JZ3N7Tn7SyF 7Dz20E21T8NXyZywwDBROSordMx0mgKNb9BsZ3K4K7lDo/5eowmZTV2onhx2j37l5Ond fYQvlVkhQXEtA1WzjBBIhYtMWPIIrs+qS4YVXWl27BzzfOPOQwSa5ZBSDUWT2SW3Pkd/ Wtuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=/Anr/HpsJ2V3LE7H1qAJzQqqWy2ZK47ULNqlFEib6tU=; b=gtHnY2p/L1bRlcdBX1Gf/ozR28NGoeV47Lp/Sp9ZmGeDuvNJY+BidJJ6unnX3A86Q2 iZCxr2foo2ZJvpOaEr+vE8TOkQ9u3U6LndCk88kV5iCiB7iS9hH9pcR0l89our8OhW6D qm8z+14sdVRCQXBS7KfmL3yWYsLJzv4It+qlbt7FvdZ4a4zDfNHMgP4VGU/n+c+ap8mR yY+XBvPJ7y69Lnepcjr2/B4vD1bzTDepMG3nr2I2Aa9b6me9uJvjWSqDyPv7H5Of9lGT DkVaEbLF41OPzqa9dJJ4Qwtkxv9Xyb3WsQyYCG7Ygs4ZtZUhJI4ngeyn7vZKSAGOaG7A 4PMQ== X-Gm-Message-State: AOAM532c7x+cW+61lXOR48v3AAF09RSaCL90ViFBXI3LEGoUsIKV7KYN ZcfqEgc8MthP+KNn7tNp77Q= X-Google-Smtp-Source: ABdhPJwoCKrFbFoCIBMTdfn2qSE6TEQIPQ9CT9XkwjlSqgeqEjqMCQ0M7IbjTCUATIRzbiSlEcckPw== X-Received: by 2002:a05:600c:20b:b0:381:263:b5d6 with SMTP id 11-20020a05600c020b00b003810263b5d6mr1904829wmi.73.1645781561681; Fri, 25 Feb 2022 01:32:41 -0800 (PST) Received: from localhost (cpc154979-craw9-2-0-cust193.16-3.cable.virginm.net. [80.193.200.194]) by smtp.gmail.com with ESMTPSA id x2-20020a7bc762000000b00380fd1ba4ebsm7733046wmk.9.2022.02.25.01.32.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Feb 2022 01:32:21 -0800 (PST) From: Colin Ian King To: Will Deacon , Robin Murphy , Joerg Roedel , linux-arm-kernel@lists.infradead.org, iommu@lists.linux-foundation.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] iommu/arm-smmu: remove redundant assignment to variable res Date: Fri, 25 Feb 2022 09:32:05 +0000 Message-Id: <20220225093205.170973-1-colin.i.king@gmail.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220225_013246_302424_7A718249 X-CRM114-Status: GOOD ( 13.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The variable res is being assigned a value that isn't being read later. The assignment is redundant and can be removed. Cleans up clang scan warning: drivers/iommu/arm/arm-smmu/arm-smmu.c:2109:10: warning: Although the value stored to 'res' is used in the enclosing expression, the value is never actually read from 'res' [deadcode.DeadStores] Signed-off-by: Colin Ian King --- drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu.c b/drivers/iommu/arm/arm-smmu/arm-smmu.c index 4bc75c4ce402..f83d2c32b5a9 100644 --- a/drivers/iommu/arm/arm-smmu/arm-smmu.c +++ b/drivers/iommu/arm/arm-smmu/arm-smmu.c @@ -2106,7 +2106,7 @@ static int arm_smmu_device_probe(struct platform_device *pdev) return PTR_ERR(smmu); num_irqs = 0; - while ((res = platform_get_resource(pdev, IORESOURCE_IRQ, num_irqs))) { + while (platform_get_resource(pdev, IORESOURCE_IRQ, num_irqs)) { num_irqs++; if (num_irqs > smmu->num_global_irqs) smmu->num_context_irqs++;