From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D235DC43331 for ; Mon, 11 Nov 2019 15:50:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ADDD420679 for ; Mon, 11 Nov 2019 15:50:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726960AbfKKPuB (ORCPT ); Mon, 11 Nov 2019 10:50:01 -0500 Received: from foss.arm.com ([217.140.110.172]:47304 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726857AbfKKPuB (ORCPT ); Mon, 11 Nov 2019 10:50:01 -0500 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C61B931B; Mon, 11 Nov 2019 07:50:00 -0800 (PST) Received: from [10.1.196.37] (e121345-lin.cambridge.arm.com [10.1.196.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16A893F534; Mon, 11 Nov 2019 07:49:59 -0800 (PST) Subject: Re: [PATCH] firmware: arm_scmi: Remove set but not used variable 'val' To: Zheng Yongjun , sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, Hulk Robot References: <20191110103010.117132-1-zhengyongjun3@huawei.com> From: Robin Murphy Message-ID: <64a46661-40a6-eb7e-d225-1085b86572d0@arm.com> Date: Mon, 11 Nov 2019 15:49:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191110103010.117132-1-zhengyongjun3@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/11/2019 10:30, Zheng Yongjun wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/firmware/arm_scmi/perf.c: In function scmi_perf_fc_ring_db: > drivers/firmware/arm_scmi/perf.c:323:7: warning: variable val set but not used [-Wunused-but-set-variable] > > val is never used, so remove it. > > Reported-by: Hulk Robot > Signed-off-by: Zheng Yongjun > --- > drivers/firmware/arm_scmi/perf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c > index 4a8012e3cb8c..efa98d2ee045 100644 > --- a/drivers/firmware/arm_scmi/perf.c > +++ b/drivers/firmware/arm_scmi/perf.c > @@ -319,10 +319,8 @@ static void scmi_perf_fc_ring_db(struct scmi_fc_db_info *db) > SCMI_PERF_FC_RING_DB(64); > #else > { > - u64 val = 0; > - > if (db->mask) > - val = ioread64_hi_lo(db->addr) & db->mask; > + ioread64_hi_lo(db->addr) & db->mask; > iowrite64_hi_lo(db->set, db->addr); FWIW, compared to the SCMI_PERF_FC_RING_DB() macro, this looks like the wrong "fix". Robin. > } > #endif > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5C55AC43331 for ; Mon, 11 Nov 2019 15:50:08 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 26E5A20679 for ; Mon, 11 Nov 2019 15:50:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="On6Jrxg+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 26E5A20679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Content-Type: Content-Transfer-Encoding:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4cd1kabP0I7iDhedd6TJcuC4uQTfTWF0b/syBB8yiy4=; b=On6Jrxg+dPUszr2KrnPqIW8nt ieW7d418B0m/pOhiIga75qKacBYny971KRx7I8xpv1Ijy4Ydvvr8LlTSyQ+5Y9b9H20aXiMVVb792 uxfzc99zhEm2zwMJLyjglw3J6r+cmZSP3nmuYj4L3VMfNzmNzRUcMwWQYo3nbf5ImmT+Lk0nfsptU iKlVSb8JVdy6pIenUNpSNtYtl7NwLLKZ3oCemt/WH9R1UTEUfJl48mdxbRiDJfrXyKm1yk0xbJ0ba 7BuVtzjxEbDVoLDCH9JnTTKIYVcGSIgJ6Ecrf2zf/TDIgnKXNR/H2PIBcSFCa4ohP9Aa7FFEkSjqk Y5bpSqNoQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUBx8-0004pf-C3; Mon, 11 Nov 2019 15:50:06 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iUBx4-0004CG-Er for linux-arm-kernel@lists.infradead.org; Mon, 11 Nov 2019 15:50:03 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id C61B931B; Mon, 11 Nov 2019 07:50:00 -0800 (PST) Received: from [10.1.196.37] (e121345-lin.cambridge.arm.com [10.1.196.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 16A893F534; Mon, 11 Nov 2019 07:49:59 -0800 (PST) Subject: Re: [PATCH] firmware: arm_scmi: Remove set but not used variable 'val' To: Zheng Yongjun , sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org References: <20191110103010.117132-1-zhengyongjun3@huawei.com> From: Robin Murphy Message-ID: <64a46661-40a6-eb7e-d225-1085b86572d0@arm.com> Date: Mon, 11 Nov 2019 15:49:55 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191110103010.117132-1-zhengyongjun3@huawei.com> Content-Language: en-GB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191111_075002_548308_9C186A3E X-CRM114-Status: GOOD ( 16.49 ) 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: Hulk Robot , linux-kernel@vger.kernel.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 10/11/2019 10:30, Zheng Yongjun wrote: > Fixes gcc '-Wunused-but-set-variable' warning: > > drivers/firmware/arm_scmi/perf.c: In function scmi_perf_fc_ring_db: > drivers/firmware/arm_scmi/perf.c:323:7: warning: variable val set but not used [-Wunused-but-set-variable] > > val is never used, so remove it. > > Reported-by: Hulk Robot > Signed-off-by: Zheng Yongjun > --- > drivers/firmware/arm_scmi/perf.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/firmware/arm_scmi/perf.c b/drivers/firmware/arm_scmi/perf.c > index 4a8012e3cb8c..efa98d2ee045 100644 > --- a/drivers/firmware/arm_scmi/perf.c > +++ b/drivers/firmware/arm_scmi/perf.c > @@ -319,10 +319,8 @@ static void scmi_perf_fc_ring_db(struct scmi_fc_db_info *db) > SCMI_PERF_FC_RING_DB(64); > #else > { > - u64 val = 0; > - > if (db->mask) > - val = ioread64_hi_lo(db->addr) & db->mask; > + ioread64_hi_lo(db->addr) & db->mask; > iowrite64_hi_lo(db->set, db->addr); FWIW, compared to the SCMI_PERF_FC_RING_DB() macro, this looks like the wrong "fix". Robin. > } > #endif > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel