From: Robin Murphy <robin.murphy@arm.com>
To: Zheng Yongjun <zhengyongjun3@huawei.com>,
sudeep.holla@arm.com, linux-arm-kernel@lists.infradead.org
Cc: linux-kernel@vger.kernel.org, Hulk Robot <hulkci@huawei.com>
Subject: Re: [PATCH] firmware: arm_scmi: Remove set but not used variable 'val'
Date: Mon, 11 Nov 2019 15:49:55 +0000 [thread overview]
Message-ID: <64a46661-40a6-eb7e-d225-1085b86572d0@arm.com> (raw)
In-Reply-To: <20191110103010.117132-1-zhengyongjun3@huawei.com>
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 <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);
FWIW, compared to the SCMI_PERF_FC_RING_DB() macro, this looks like the
wrong "fix".
Robin.
> }
> #endif
>
next prev parent reply other threads:[~2019-11-11 15:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-10 10:30 Zheng Yongjun
2019-11-11 15:49 ` Robin Murphy [this message]
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
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=64a46661-40a6-eb7e-d225-1085b86572d0@arm.com \
--to=robin.murphy@arm.com \
--cc=hulkci@huawei.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sudeep.holla@arm.com \
--cc=zhengyongjun3@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®