[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190617074858.32467-13-bpoirier@suse.com>
Date: Mon, 17 Jun 2019 16:48:55 +0900
From: Benjamin Poirier <bpoirier@...e.com>
To: Manish Chopra <manishc@...vell.com>, GR-Linux-NIC-Dev@...vell.com,
netdev@...r.kernel.org
Subject: [PATCH net-next 13/16] qlge: Replace memset with assignment
Instead of clearing the structure wholesale, it is sufficient to initialize
the skb member which is used to manage sbq instances. lbq instances are
managed according to curr_idx and clean_idx.
Signed-off-by: Benjamin Poirier <bpoirier@...e.com>
---
drivers/net/ethernet/qlogic/qlge/qlge_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/qlogic/qlge/qlge_main.c b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
index b6e948caf2aa..4502bb4758b4 100644
--- a/drivers/net/ethernet/qlogic/qlge/qlge_main.c
+++ b/drivers/net/ethernet/qlogic/qlge/qlge_main.c
@@ -2809,11 +2809,10 @@ static int qlge_init_bq(struct qlge_bq *bq)
if (!bq->queue)
return -ENOMEM;
- memset(bq->queue, 0, QLGE_BQ_LEN * sizeof(struct qlge_bq_desc));
-
buf_ptr = bq->base;
bq_desc = &bq->queue[0];
for (i = 0; i < QLGE_BQ_LEN; i++, buf_ptr++, bq_desc++) {
+ bq_desc->p.skb = NULL;
bq_desc->index = i;
bq_desc->buf_ptr = buf_ptr;
}
--
2.21.0
Powered by blists - more mailing lists