All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'
@ 2020-05-06  6:55 ` YueHaibing
  0 siblings, 0 replies; 7+ messages in thread
From: YueHaibing @ 2020-05-06  6:55 UTC (permalink / raw)
  To: Ursula Braun, Karsten Graul, David S . Miller, Jakub Kicinski
  Cc: YueHaibing, linux-s390, netdev, kernel-janitors

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

net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
net/smc/smc_llc.c:753:31: warning:
 variable 'del_llc' set but not used [-Wunused-but-set-variable]
  struct smc_llc_msg_del_link *del_llc;
                               ^
net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
net/smc/smc_llc.c:1311:33: warning:
 variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
    struct smc_llc_msg_del_link *del_llc_resp;
                                 ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/smc/smc_llc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
index 4cc583678ac7..391237b601fe 100644
--- a/net/smc/smc_llc.c
+++ b/net/smc/smc_llc.c
@@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 				 enum smc_lgr_type lgr_new_t)
 {
 	struct smc_link_group *lgr = link->lgr;
-	struct smc_llc_msg_del_link *del_llc;
 	struct smc_llc_qentry *qentry = NULL;
 	int rc = 0;
 
@@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 	}
 	if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
 		/* received DELETE_LINK instead */
-		del_llc = &qentry->msg.delete_link;
 		qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
 		smc_llc_send_message(link, &qentry->msg);
 		smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
@@ -1308,16 +1306,12 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
 		 * enqueued DELETE_LINK request (forward it)
 		 */
 		if (!smc_llc_send_message(lnk, &qentry->msg)) {
-			struct smc_llc_msg_del_link *del_llc_resp;
 			struct smc_llc_qentry *qentry2;
 
 			qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
 					       SMC_LLC_DELETE_LINK);
-			if (!qentry2) {
-			} else {
-				del_llc_resp = &qentry2->msg.delete_link;
+			if (qentry2)
 				smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
-			}
 		}
 	}
 	smcr_link_clear(lnk_del, true);




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

* [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'
@ 2020-05-06  6:55 ` YueHaibing
  0 siblings, 0 replies; 7+ messages in thread
From: YueHaibing @ 2020-05-06  6:55 UTC (permalink / raw)
  To: Ursula Braun, Karsten Graul, David S . Miller, Jakub Kicinski
  Cc: YueHaibing, linux-s390, netdev, kernel-janitors

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

net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
net/smc/smc_llc.c:753:31: warning:
 variable 'del_llc' set but not used [-Wunused-but-set-variable]
  struct smc_llc_msg_del_link *del_llc;
                               ^
net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
net/smc/smc_llc.c:1311:33: warning:
 variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
    struct smc_llc_msg_del_link *del_llc_resp;
                                 ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/smc/smc_llc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
index 4cc583678ac7..391237b601fe 100644
--- a/net/smc/smc_llc.c
+++ b/net/smc/smc_llc.c
@@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 				 enum smc_lgr_type lgr_new_t)
 {
 	struct smc_link_group *lgr = link->lgr;
-	struct smc_llc_msg_del_link *del_llc;
 	struct smc_llc_qentry *qentry = NULL;
 	int rc = 0;
 
@@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 	}
 	if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
 		/* received DELETE_LINK instead */
-		del_llc = &qentry->msg.delete_link;
 		qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
 		smc_llc_send_message(link, &qentry->msg);
 		smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
@@ -1308,16 +1306,12 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
 		 * enqueued DELETE_LINK request (forward it)
 		 */
 		if (!smc_llc_send_message(lnk, &qentry->msg)) {
-			struct smc_llc_msg_del_link *del_llc_resp;
 			struct smc_llc_qentry *qentry2;
 
 			qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
 					       SMC_LLC_DELETE_LINK);
-			if (!qentry2) {
-			} else {
-				del_llc_resp = &qentry2->msg.delete_link;
+			if (qentry2)
 				smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
-			}
 		}
 	}
 	smcr_link_clear(lnk_del, true);

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

* [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'
@ 2020-05-06  6:55 ` YueHaibing
  0 siblings, 0 replies; 7+ messages in thread
From: YueHaibing @ 2020-05-06  6:55 UTC (permalink / raw)
  To: Ursula Braun, Karsten Graul, David S . Miller, Jakub Kicinski
  Cc: YueHaibing, linux-s390, netdev, kernel-janitors

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

net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
net/smc/smc_llc.c:753:31: warning:
 variable 'del_llc' set but not used [-Wunused-but-set-variable]
  struct smc_llc_msg_del_link *del_llc;
                               ^
net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
net/smc/smc_llc.c:1311:33: warning:
 variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
    struct smc_llc_msg_del_link *del_llc_resp;
                                 ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 net/smc/smc_llc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
index 4cc583678ac7..391237b601fe 100644
--- a/net/smc/smc_llc.c
+++ b/net/smc/smc_llc.c
@@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 				 enum smc_lgr_type lgr_new_t)
 {
 	struct smc_link_group *lgr = link->lgr;
-	struct smc_llc_msg_del_link *del_llc;
 	struct smc_llc_qentry *qentry = NULL;
 	int rc = 0;
 
@@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 	}
 	if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
 		/* received DELETE_LINK instead */
-		del_llc = &qentry->msg.delete_link;
 		qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
 		smc_llc_send_message(link, &qentry->msg);
 		smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
@@ -1308,16 +1306,12 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
 		 * enqueued DELETE_LINK request (forward it)
 		 */
 		if (!smc_llc_send_message(lnk, &qentry->msg)) {
-			struct smc_llc_msg_del_link *del_llc_resp;
 			struct smc_llc_qentry *qentry2;
 
 			qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
 					       SMC_LLC_DELETE_LINK);
-			if (!qentry2) {
-			} else {
-				del_llc_resp = &qentry2->msg.delete_link;
+			if (qentry2)
 				smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
-			}
 		}
 	}
 	smcr_link_clear(lnk_del, true);

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

* Re: [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'
  2020-05-06  6:55 ` YueHaibing
@ 2020-05-06  9:39   ` Karsten Graul
  -1 siblings, 0 replies; 7+ messages in thread
From: Karsten Graul @ 2020-05-06  9:39 UTC (permalink / raw)
  To: YueHaibing, Ursula Braun, David S . Miller, Jakub Kicinski
  Cc: linux-s390, netdev, kernel-janitors

On 06/05/2020 08:55, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:

Thank you, good catch. Your patch will be part of our next patch submission.

Regards, Karsten

> 
> net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
> net/smc/smc_llc.c:753:31: warning:
>  variable 'del_llc' set but not used [-Wunused-but-set-variable]
>   struct smc_llc_msg_del_link *del_llc;
>                                ^
> net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
> net/smc/smc_llc.c:1311:33: warning:
>  variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
>     struct smc_llc_msg_del_link *del_llc_resp;
>                                  ^
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  net/smc/smc_llc.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
> index 4cc583678ac7..391237b601fe 100644
> --- a/net/smc/smc_llc.c
> +++ b/net/smc/smc_llc.c
> @@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
>  				 enum smc_lgr_type lgr_new_t)
>  {
>  	struct smc_link_group *lgr = link->lgr;
> -	struct smc_llc_msg_del_link *del_llc;
>  	struct smc_llc_qentry *qentry = NULL;
>  	int rc = 0;
>  
> @@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
>  	}
>  	if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
>  		/* received DELETE_LINK instead */
> -		del_llc = &qentry->msg.delete_link;
>  		qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
>  		smc_llc_send_message(link, &qentry->msg);
>  		smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
> @@ -1308,16 +1306,12 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
>  		 * enqueued DELETE_LINK request (forward it)
>  		 */
>  		if (!smc_llc_send_message(lnk, &qentry->msg)) {
> -			struct smc_llc_msg_del_link *del_llc_resp;
>  			struct smc_llc_qentry *qentry2;
>  
>  			qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
>  					       SMC_LLC_DELETE_LINK);
> -			if (!qentry2) {
> -			} else {
> -				del_llc_resp = &qentry2->msg.delete_link;
> +			if (qentry2)
>  				smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
> -			}
>  		}
>  	}
>  	smcr_link_clear(lnk_del, true);
> 
> 
> 

-- 
Karsten

(I'm a dude)

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

* Re: [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'
@ 2020-05-06  9:39   ` Karsten Graul
  0 siblings, 0 replies; 7+ messages in thread
From: Karsten Graul @ 2020-05-06  9:39 UTC (permalink / raw)
  To: YueHaibing, Ursula Braun, David S . Miller, Jakub Kicinski
  Cc: linux-s390, netdev, kernel-janitors

On 06/05/2020 08:55, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:

Thank you, good catch. Your patch will be part of our next patch submission.

Regards, Karsten

> 
> net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
> net/smc/smc_llc.c:753:31: warning:
>  variable 'del_llc' set but not used [-Wunused-but-set-variable]
>   struct smc_llc_msg_del_link *del_llc;
>                                ^
> net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
> net/smc/smc_llc.c:1311:33: warning:
>  variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
>     struct smc_llc_msg_del_link *del_llc_resp;
>                                  ^
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  net/smc/smc_llc.c | 8 +-------
>  1 file changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
> index 4cc583678ac7..391237b601fe 100644
> --- a/net/smc/smc_llc.c
> +++ b/net/smc/smc_llc.c
> @@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
>  				 enum smc_lgr_type lgr_new_t)
>  {
>  	struct smc_link_group *lgr = link->lgr;
> -	struct smc_llc_msg_del_link *del_llc;
>  	struct smc_llc_qentry *qentry = NULL;
>  	int rc = 0;
>  
> @@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
>  	}
>  	if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
>  		/* received DELETE_LINK instead */
> -		del_llc = &qentry->msg.delete_link;
>  		qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
>  		smc_llc_send_message(link, &qentry->msg);
>  		smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
> @@ -1308,16 +1306,12 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
>  		 * enqueued DELETE_LINK request (forward it)
>  		 */
>  		if (!smc_llc_send_message(lnk, &qentry->msg)) {
> -			struct smc_llc_msg_del_link *del_llc_resp;
>  			struct smc_llc_qentry *qentry2;
>  
>  			qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
>  					       SMC_LLC_DELETE_LINK);
> -			if (!qentry2) {
> -			} else {
> -				del_llc_resp = &qentry2->msg.delete_link;
> +			if (qentry2)
>  				smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
> -			}
>  		}
>  	}
>  	smcr_link_clear(lnk_del, true);
> 
> 
> 

-- 
Karsten

(I'm a dude)

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

* Re: [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'
  2020-05-07 14:24 Karsten Graul
@ 2020-05-08  1:05 ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2020-05-08  1:05 UTC (permalink / raw)
  To: kgraul; +Cc: netdev, linux-s390, heiko.carstens, raspl, ubraun

From: Karsten Graul <kgraul@linux.ibm.com>
Date: Thu,  7 May 2020 16:24:06 +0200

> From: YueHaibing <yuehaibing@huawei.com>
> 
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
> net/smc/smc_llc.c:753:31: warning:
>  variable 'del_llc' set but not used [-Wunused-but-set-variable]
>   struct smc_llc_msg_del_link *del_llc;
>                                ^
> net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
> net/smc/smc_llc.c:1311:33: warning:
>  variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
>     struct smc_llc_msg_del_link *del_llc_resp;
>                                  ^
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>

Applied, thanks.

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

* [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp'
@ 2020-05-07 14:24 Karsten Graul
  2020-05-08  1:05 ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Karsten Graul @ 2020-05-07 14:24 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-s390, heiko.carstens, raspl, ubraun

From: YueHaibing <yuehaibing@huawei.com>

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

net/smc/smc_llc.c: In function 'smc_llc_cli_conf_link':
net/smc/smc_llc.c:753:31: warning:
 variable 'del_llc' set but not used [-Wunused-but-set-variable]
  struct smc_llc_msg_del_link *del_llc;
                               ^
net/smc/smc_llc.c: In function 'smc_llc_process_srv_delete_link':
net/smc/smc_llc.c:1311:33: warning:
 variable 'del_llc_resp' set but not used [-Wunused-but-set-variable]
    struct smc_llc_msg_del_link *del_llc_resp;
                                 ^

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Karsten Graul <kgraul@linux.ibm.com>
---
 net/smc/smc_llc.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/net/smc/smc_llc.c b/net/smc/smc_llc.c
index 4cc583678ac7..391237b601fe 100644
--- a/net/smc/smc_llc.c
+++ b/net/smc/smc_llc.c
@@ -750,7 +750,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 				 enum smc_lgr_type lgr_new_t)
 {
 	struct smc_link_group *lgr = link->lgr;
-	struct smc_llc_msg_del_link *del_llc;
 	struct smc_llc_qentry *qentry = NULL;
 	int rc = 0;
 
@@ -764,7 +763,6 @@ static int smc_llc_cli_conf_link(struct smc_link *link,
 	}
 	if (qentry->msg.raw.hdr.common.type != SMC_LLC_CONFIRM_LINK) {
 		/* received DELETE_LINK instead */
-		del_llc = &qentry->msg.delete_link;
 		qentry->msg.raw.hdr.flags |= SMC_LLC_FLAG_RESP;
 		smc_llc_send_message(link, &qentry->msg);
 		smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
@@ -1308,16 +1306,12 @@ static void smc_llc_process_srv_delete_link(struct smc_link_group *lgr)
 		 * enqueued DELETE_LINK request (forward it)
 		 */
 		if (!smc_llc_send_message(lnk, &qentry->msg)) {
-			struct smc_llc_msg_del_link *del_llc_resp;
 			struct smc_llc_qentry *qentry2;
 
 			qentry2 = smc_llc_wait(lgr, lnk, SMC_LLC_WAIT_TIME,
 					       SMC_LLC_DELETE_LINK);
-			if (!qentry2) {
-			} else {
-				del_llc_resp = &qentry2->msg.delete_link;
+			if (qentry2)
 				smc_llc_flow_qentry_del(&lgr->llc_flow_lcl);
-			}
 		}
 	}
 	smcr_link_clear(lnk_del, true);
-- 
2.17.1


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

end of thread, other threads:[~2020-05-08  1:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-06  6:55 [PATCH net-next] net/smc: remove set but not used variables 'del_llc, del_llc_resp' YueHaibing
2020-05-06  6:55 ` YueHaibing
2020-05-06  6:55 ` YueHaibing
2020-05-06  9:39 ` Karsten Graul
2020-05-06  9:39   ` Karsten Graul
2020-05-07 14:24 Karsten Graul
2020-05-08  1:05 ` David Miller

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.