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]
Message-Id: <OF77C0BA7B.17273086-ON0025843D.002C20A5-0025843D.002C20AD@notes.na.collabserv.com>
Date:   Sat, 20 Jul 2019 08:01:59 +0000
From:   "Bernard Metzler" <BMT@...ich.ibm.com>
To:     "Mao Wenan" <maowenan@...wei.com>
Cc:     <dledford@...hat.com>, <jgg@...pe.ca>,
        <linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <kernel-janitors@...r.kernel.org>
Subject: Re: [PATCH -next] infiniband: siw: remove set but not used variables 'rv'

-----"Mao Wenan" <maowenan@...wei.com> wrote: -----

>To: <bmt@...ich.ibm.com>, <dledford@...hat.com>, <jgg@...pe.ca>
>From: "Mao Wenan" <maowenan@...wei.com>
>Date: 07/19/2019 03:24AM
>Cc: <linux-rdma@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
><kernel-janitors@...r.kernel.org>, "Mao Wenan" <maowenan@...wei.com>
>Subject: [EXTERNAL] [PATCH -next] infiniband: siw: remove set but not
>used variables 'rv'
>
>Fixes gcc '-Wunused-but-set-variable' warning:
>
>drivers/infiniband/sw/siw/siw_cm.c: In function siw_cep_set_inuse:
>drivers/infiniband/sw/siw/siw_cm.c:223:6: warning: variable rv set
>but not used [-Wunused-but-set-variable]
>
>It is not used since commit 6c52fdc244b5("rdma/siw: connection
>management")
>
>Signed-off-by: Mao Wenan <maowenan@...wei.com>
>---
> drivers/infiniband/sw/siw/siw_cm.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/drivers/infiniband/sw/siw/siw_cm.c
>b/drivers/infiniband/sw/siw/siw_cm.c
>index a7cde98..9ce8a1b 100644
>--- a/drivers/infiniband/sw/siw/siw_cm.c
>+++ b/drivers/infiniband/sw/siw/siw_cm.c
>@@ -220,13 +220,12 @@ static void siw_put_work(struct siw_cm_work
>*work)
> static void siw_cep_set_inuse(struct siw_cep *cep)
> {
> 	unsigned long flags;
>-	int rv;
> retry:
> 	spin_lock_irqsave(&cep->lock, flags);
> 
> 	if (cep->in_use) {
> 		spin_unlock_irqrestore(&cep->lock, flags);
>-		rv = wait_event_interruptible(cep->waitq, !cep->in_use);
>+		wait_event_interruptible(cep->waitq, !cep->in_use);
> 		if (signal_pending(current))
> 			flush_signals(current);
> 		goto retry;
>-- 
>2.7.4
>
>

Mao, many thanks for finding that. So, yes, 'rv'  shall be removed.

Reviewed-by: Bernard Metzler <bmt@...ich.ibm.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ