lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Nov 2019 15:49:55 +0000
From:   Robin Murphy <robin.murphy@....com>
To:     Zheng Yongjun <zhengyongjun3@...wei.com>, sudeep.holla@....com,
        linux-arm-kernel@...ts.infradead.org
Cc:     linux-kernel@...r.kernel.org, Hulk Robot <hulkci@...wei.com>
Subject: Re: [PATCH] firmware: arm_scmi: Remove set but not used variable
 'val'

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@...wei.com>
> Signed-off-by: Zheng Yongjun <zhengyongjun3@...wei.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
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ