2018-09-19 14:36:18

by zhong jiang

[permalink] [raw]
Subject: [PATCH] net: ibm: remove a redundant local variable 'k'

The local variable 'k' is never used after being assigned.
hence it should be redundant adn can be removed.

Signed-off-by: zhong jiang <[email protected]>
---
drivers/net/ethernet/ibm/ehea/ehea_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index ba580bf..7f6a401 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -778,12 +778,11 @@ static void check_sqs(struct ehea_port *port)
{
struct ehea_swqe *swqe;
int swqe_index;
- int i, k;
+ int i;

for (i = 0; i < port->num_def_qps; i++) {
struct ehea_port_res *pr = &port->port_res[i];
int ret;
- k = 0;
swqe = ehea_get_swqe(pr->qp, &swqe_index);
memset(swqe, 0, SWQE_HEADER_SIZE);
atomic_dec(&pr->swqe_avail);
--
1.7.12.4



2018-09-20 04:27:17

by David Miller

[permalink] [raw]
Subject: Re: [PATCH] net: ibm: remove a redundant local variable 'k'

From: zhong jiang <[email protected]>
Date: Wed, 19 Sep 2018 22:23:15 +0800

> The local variable 'k' is never used after being assigned.
> hence it should be redundant adn can be removed.
>
> Signed-off-by: zhong jiang <[email protected]>

Applied.

2018-09-20 09:51:38

by Sergei Shtylyov

[permalink] [raw]
Subject: Re: [PATCH] net: ibm: remove a redundant local variable 'k'

Hello!

On 9/19/2018 5:23 PM, zhong jiang wrote:

> The local variable 'k' is never used after being assigned.
> hence it should be redundant adn can be removed.

Can.

> Signed-off-by: zhong jiang <[email protected]>
[...]

MBR, Sergei