All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zheng Yongjun <zhengyongjun3@huawei.com>
To: <sudeep.holla@arm.com>, <linux-arm-kernel@lists.infradead.org>
Cc: <linux-kernel@vger.kernel.org>, <zhengyongjun3@huawei.com>,
	Hulk Robot <hulkci@huawei.com>
Subject: [PATCH] firmware: arm_scmi: Remove set but not used variable 'val'
Date: Sun, 10 Nov 2019 18:30:10 +0800	[thread overview]
Message-ID: <20191110103010.117132-1-zhengyongjun3@huawei.com> (raw)

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 <hulkci@huawei.com>
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 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);
 	}
 #endif
-- 
2.23.0


WARNING: multiple messages have this Message-ID (diff)
From: Zheng Yongjun <zhengyongjun3@huawei.com>
To: <sudeep.holla@arm.com>, <linux-arm-kernel@lists.infradead.org>
Cc: zhengyongjun3@huawei.com, linux-kernel@vger.kernel.org,
	Hulk Robot <hulkci@huawei.com>
Subject: [PATCH] firmware: arm_scmi: Remove set but not used variable 'val'
Date: Sun, 10 Nov 2019 18:30:10 +0800	[thread overview]
Message-ID: <20191110103010.117132-1-zhengyongjun3@huawei.com> (raw)

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 <hulkci@huawei.com>
Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 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);
 	}
 #endif
-- 
2.23.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2019-11-10 10:31 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-10 10:30 Zheng Yongjun [this message]
2019-11-10 10:30 ` [PATCH] firmware: arm_scmi: Remove set but not used variable 'val' Zheng Yongjun
2019-11-11 15:49 ` Robin Murphy
2019-11-11 15:49   ` Robin Murphy
2019-11-11 16:04   ` Sudeep Holla
2019-11-11 16:04     ` Sudeep Holla
2019-11-11 16:36 ` [PATCH] firmware: arm_scmi: Fix doorbell ring logic for !CONFIG_64BIT Sudeep Holla
2019-11-11 16:36   ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191110103010.117132-1-zhengyongjun3@huawei.com \
    --to=zhengyongjun3@huawei.com \
    --cc=hulkci@huawei.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.