All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] rdma/siw: remove set but not used variable 's'
@ 2019-07-11  7:12 YueHaibing
  2019-07-11  8:22 ` Bernard Metzler
  2019-07-11 14:47 ` Jason Gunthorpe
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2019-07-11  7:12 UTC (permalink / raw)
  To: bmt, dledford, jgg; +Cc: linux-kernel, linux-rdma, YueHaibing

Fixes gcc '-Wunused-but-set-variable' warning:

drivers/infiniband/sw/siw/siw_cm.c: In function siw_cm_llp_state_change:
drivers/infiniband/sw/siw/siw_cm.c:1278:17: warning: variable s set but not used [-Wunused-but-set-variable]

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/infiniband/sw/siw/siw_cm.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/infiniband/sw/siw/siw_cm.c b/drivers/infiniband/sw/siw/siw_cm.c
index c883bf5..7d87a78 100644
--- a/drivers/infiniband/sw/siw/siw_cm.c
+++ b/drivers/infiniband/sw/siw/siw_cm.c
@@ -1275,7 +1275,6 @@ static void siw_cm_llp_error_report(struct sock *sk)
 static void siw_cm_llp_state_change(struct sock *sk)
 {
 	struct siw_cep *cep;
-	struct socket *s;
 	void (*orig_state_change)(struct sock *s);
 
 	read_lock(&sk->sk_callback_lock);
@@ -1288,8 +1287,6 @@ static void siw_cm_llp_state_change(struct sock *sk)
 	}
 	orig_state_change = cep->sk_state_change;
 
-	s = sk->sk_socket;
-
 	siw_dbg_cep(cep, "state: %d\n", cep->state);
 
 	switch (sk->sk_state) {
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re:  [PATCH -next] rdma/siw: remove set but not used variable 's'
  2019-07-11  7:12 [PATCH -next] rdma/siw: remove set but not used variable 's' YueHaibing
@ 2019-07-11  8:22 ` Bernard Metzler
  2019-07-11 14:47 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Bernard Metzler @ 2019-07-11  8:22 UTC (permalink / raw)
  To: YueHaibing; +Cc: dledford, jgg, linux-kernel, linux-rdma

-----"YueHaibing" <yuehaibing@huawei.com> wrote: -----

>To: <bmt@zurich.ibm.com>, <dledford@redhat.com>, <jgg@ziepe.ca>
>From: "YueHaibing" <yuehaibing@huawei.com>
>Date: 07/11/2019 09:13AM
>Cc: <linux-kernel@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
>"YueHaibing" <yuehaibing@huawei.com>
>Subject: [EXTERNAL] [PATCH -next] rdma/siw: remove set but not used
>variable 's'
>
>Fixes gcc '-Wunused-but-set-variable' warning:
>
>drivers/infiniband/sw/siw/siw_cm.c: In function
>siw_cm_llp_state_change:
>drivers/infiniband/sw/siw/siw_cm.c:1278:17: warning: variable s set
>but not used [-Wunused-but-set-variable]
>
>Reported-by: Hulk Robot <hulkci@huawei.com>
>Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>---
> drivers/infiniband/sw/siw/siw_cm.c | 3 ---
> 1 file changed, 3 deletions(-)
>
>diff --git a/drivers/infiniband/sw/siw/siw_cm.c
>b/drivers/infiniband/sw/siw/siw_cm.c
>index c883bf5..7d87a78 100644
>--- a/drivers/infiniband/sw/siw/siw_cm.c
>+++ b/drivers/infiniband/sw/siw/siw_cm.c
>@@ -1275,7 +1275,6 @@ static void siw_cm_llp_error_report(struct sock
>*sk)
> static void siw_cm_llp_state_change(struct sock *sk)
> {
> 	struct siw_cep *cep;
>-	struct socket *s;
> 	void (*orig_state_change)(struct sock *s);
> 
> 	read_lock(&sk->sk_callback_lock);
>@@ -1288,8 +1287,6 @@ static void siw_cm_llp_state_change(struct sock
>*sk)
> 	}
> 	orig_state_change = cep->sk_state_change;
> 
>-	s = sk->sk_socket;
>-
> 	siw_dbg_cep(cep, "state: %d\n", cep->state);
> 
> 	switch (sk->sk_state) {
>-- 
>2.7.4
>
>
>

Another bad leftover from excessive debugging times...

Thanks alot Yue!
Bernard.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] rdma/siw: remove set but not used variable 's'
  2019-07-11  7:12 [PATCH -next] rdma/siw: remove set but not used variable 's' YueHaibing
  2019-07-11  8:22 ` Bernard Metzler
@ 2019-07-11 14:47 ` Jason Gunthorpe
  1 sibling, 0 replies; 3+ messages in thread
From: Jason Gunthorpe @ 2019-07-11 14:47 UTC (permalink / raw)
  To: YueHaibing; +Cc: bmt, dledford, linux-kernel, linux-rdma

On Thu, Jul 11, 2019 at 03:12:13PM +0800, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/infiniband/sw/siw/siw_cm.c: In function siw_cm_llp_state_change:
> drivers/infiniband/sw/siw/siw_cm.c:1278:17: warning: variable s set but not used [-Wunused-but-set-variable]
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/infiniband/sw/siw/siw_cm.c | 3 ---
>  1 file changed, 3 deletions(-)

Applied to for-next, thanks

Jason

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-07-11 14:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11  7:12 [PATCH -next] rdma/siw: remove set but not used variable 's' YueHaibing
2019-07-11  8:22 ` Bernard Metzler
2019-07-11 14:47 ` Jason Gunthorpe

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.