netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH net-next] liquidio: cHECK-remove set but not used variable 'irh'
  2018-08-31 11:53 [PATCH net-next] liquidio: cHECK-remove set but not used variable 'irh' YueHaibing
@ 2018-08-31 11:48 ` YueHaibing
  2018-08-31 12:03 ` [PATCH v2 net-next] liquidio: remove " YueHaibing
  1 sibling, 0 replies; 5+ messages in thread
From: YueHaibing @ 2018-08-31 11:48 UTC (permalink / raw)
  To: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi,
	David S. Miller
  Cc: netdev, kernel-janitors

sorry, patch description is messy, will fix it in V2.

On 2018/8/31 19:53, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/cavium/liquidio/request_manager.c: In function 'lio_process_iq_request_list':
> drivers/net/ethernet/cavium/liquidio/request_manager.c:383:27: warning:
>  variable 'irh' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
>  drivers/net/ethernet/cavium/liquidio/request_manager.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
> index bd0153e..c6f4cbd 100644
> --- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
> +++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
> @@ -380,7 +380,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
>  	u32 inst_count = 0;
>  	unsigned int pkts_compl = 0, bytes_compl = 0;
>  	struct octeon_soft_command *sc;
> -	struct octeon_instr_irh *irh;
>  	unsigned long flags;
>  
>  	while (old != iq->octeon_read_index) {
> @@ -402,14 +401,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
>  		case REQTYPE_RESP_NET:
>  		case REQTYPE_SOFT_COMMAND:
>  			sc = buf;
> -
> -			if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct))
> -				irh = (struct octeon_instr_irh *)
> -					&sc->cmd.cmd3.irh;
> -			else
> -				irh = (struct octeon_instr_irh *)
> -					&sc->cmd.cmd2.irh;
> -
>  			/* We're expecting a response from Octeon.
>  			 * It's up to lio_process_ordered_list() to
>  			 * process  sc. Add sc to the ordered soft
> 
> 
> .
> 

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

* [PATCH net-next] liquidio: cHECK-remove set but not used variable 'irh'
@ 2018-08-31 11:53 YueHaibing
  2018-08-31 11:48 ` YueHaibing
  2018-08-31 12:03 ` [PATCH v2 net-next] liquidio: remove " YueHaibing
  0 siblings, 2 replies; 5+ messages in thread
From: YueHaibing @ 2018-08-31 11:53 UTC (permalink / raw)
  To: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi,
	David S. Miller
  Cc: YueHaibing, netdev, kernel-janitors

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

drivers/net/ethernet/cavium/liquidio/request_manager.c: In function 'lio_process_iq_request_list':
drivers/net/ethernet/cavium/liquidio/request_manager.c:383:27: warning:
 variable 'irh' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
 drivers/net/ethernet/cavium/liquidio/request_manager.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
index bd0153e..c6f4cbd 100644
--- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
+++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
@@ -380,7 +380,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
 	u32 inst_count = 0;
 	unsigned int pkts_compl = 0, bytes_compl = 0;
 	struct octeon_soft_command *sc;
-	struct octeon_instr_irh *irh;
 	unsigned long flags;
 
 	while (old != iq->octeon_read_index) {
@@ -402,14 +401,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
 		case REQTYPE_RESP_NET:
 		case REQTYPE_SOFT_COMMAND:
 			sc = buf;
-
-			if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct))
-				irh = (struct octeon_instr_irh *)
-					&sc->cmd.cmd3.irh;
-			else
-				irh = (struct octeon_instr_irh *)
-					&sc->cmd.cmd2.irh;
-
 			/* We're expecting a response from Octeon.
 			 * It's up to lio_process_ordered_list() to
 			 * process  sc. Add sc to the ordered soft

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

* [PATCH v2 net-next] liquidio: remove set but not used variable 'irh'
  2018-08-31 11:53 [PATCH net-next] liquidio: cHECK-remove set but not used variable 'irh' YueHaibing
  2018-08-31 11:48 ` YueHaibing
@ 2018-08-31 12:03 ` YueHaibing
  2018-08-31 20:16   ` Felix Manlunas
  2018-09-02  5:25   ` David Miller
  1 sibling, 2 replies; 5+ messages in thread
From: YueHaibing @ 2018-08-31 12:03 UTC (permalink / raw)
  To: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi,
	David S. Miller
  Cc: YueHaibing, netdev, kernel-janitors

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

drivers/net/ethernet/cavium/liquidio/request_manager.c: In function 'lio_process_iq_request_list':
drivers/net/ethernet/cavium/liquidio/request_manager.c:383:27: warning:
 variable 'irh' set but not used [-Wunused-but-set-variable]

Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
v2: fix patch description,remove 'cHECK-'
---
 drivers/net/ethernet/cavium/liquidio/request_manager.c | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
index bd0153e..c6f4cbd 100644
--- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
+++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
@@ -380,7 +380,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
 	u32 inst_count = 0;
 	unsigned int pkts_compl = 0, bytes_compl = 0;
 	struct octeon_soft_command *sc;
-	struct octeon_instr_irh *irh;
 	unsigned long flags;
 
 	while (old != iq->octeon_read_index) {
@@ -402,14 +401,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
 		case REQTYPE_RESP_NET:
 		case REQTYPE_SOFT_COMMAND:
 			sc = buf;
-
-			if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct))
-				irh = (struct octeon_instr_irh *)
-					&sc->cmd.cmd3.irh;
-			else
-				irh = (struct octeon_instr_irh *)
-					&sc->cmd.cmd2.irh;
-
 			/* We're expecting a response from Octeon.
 			 * It's up to lio_process_ordered_list() to
 			 * process  sc. Add sc to the ordered soft

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

* Re: [PATCH v2 net-next] liquidio: remove set but not used variable 'irh'
  2018-08-31 12:03 ` [PATCH v2 net-next] liquidio: remove " YueHaibing
@ 2018-08-31 20:16   ` Felix Manlunas
  2018-09-02  5:25   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: Felix Manlunas @ 2018-08-31 20:16 UTC (permalink / raw)
  To: YueHaibing
  Cc: Derek Chickles, Satanand Burla, Felix Manlunas, Raghu Vatsavayi,
	David S. Miller, netdev, kernel-janitors

On Fri, Aug 31, 2018 at 12:03:56PM +0000, YueHaibing wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/cavium/liquidio/request_manager.c: In function 'lio_process_iq_request_list':
> drivers/net/ethernet/cavium/liquidio/request_manager.c:383:27: warning:
>  variable 'irh' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: fix patch description,remove 'cHECK-'
> ---
>  drivers/net/ethernet/cavium/liquidio/request_manager.c | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cavium/liquidio/request_manager.c b/drivers/net/ethernet/cavium/liquidio/request_manager.c
> index bd0153e..c6f4cbd 100644
> --- a/drivers/net/ethernet/cavium/liquidio/request_manager.c
> +++ b/drivers/net/ethernet/cavium/liquidio/request_manager.c
> @@ -380,7 +380,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
>         u32 inst_count = 0;
>         unsigned int pkts_compl = 0, bytes_compl = 0;
>         struct octeon_soft_command *sc;
> -       struct octeon_instr_irh *irh;
>         unsigned long flags;
> 
>         while (old != iq->octeon_read_index) {
> @@ -402,14 +401,6 @@ static inline void __copy_cmd_into_iq(struct octeon_instr_queue *iq,
>                 case REQTYPE_RESP_NET:
>                 case REQTYPE_SOFT_COMMAND:
>                         sc = buf;
> -
> -                       if (OCTEON_CN23XX_PF(oct) || OCTEON_CN23XX_VF(oct))
> -                               irh = (struct octeon_instr_irh *)
> -                                       &sc->cmd.cmd3.irh;
> -                       else
> -                               irh = (struct octeon_instr_irh *)
> -                                       &sc->cmd.cmd2.irh;
> -
>                         /* We're expecting a response from Octeon.
>                          * It's up to lio_process_ordered_list() to
>                          * process  sc. Add sc to the ordered soft
> 

Acked-by: Felix Manlunas <felix.manlunas@cavium.com>

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

* Re: [PATCH v2 net-next] liquidio: remove set but not used variable 'irh'
  2018-08-31 12:03 ` [PATCH v2 net-next] liquidio: remove " YueHaibing
  2018-08-31 20:16   ` Felix Manlunas
@ 2018-09-02  5:25   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2018-09-02  5:25 UTC (permalink / raw)
  To: yuehaibing
  Cc: derek.chickles, satananda.burla, felix.manlunas, raghu.vatsavayi,
	netdev, kernel-janitors

From: YueHaibing <yuehaibing@huawei.com>
Date: Fri, 31 Aug 2018 12:03:56 +0000

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/cavium/liquidio/request_manager.c: In function 'lio_process_iq_request_list':
> drivers/net/ethernet/cavium/liquidio/request_manager.c:383:27: warning:
>  variable 'irh' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> v2: fix patch description,remove 'cHECK-'

Applied, thanks.

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

end of thread, other threads:[~2018-09-02  9:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-31 11:53 [PATCH net-next] liquidio: cHECK-remove set but not used variable 'irh' YueHaibing
2018-08-31 11:48 ` YueHaibing
2018-08-31 12:03 ` [PATCH v2 net-next] liquidio: remove " YueHaibing
2018-08-31 20:16   ` Felix Manlunas
2018-09-02  5:25   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).