net: cavium: liquidio: use kzalloc in setup_glist()
We save a little .text and get rid of the sizeof(...) style inconsistency. Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f53de1e9a4
commit
ce8e5c7035
|
@ -818,10 +818,9 @@ static int setup_glist(struct lio *lio)
|
||||||
INIT_LIST_HEAD(&lio->glist);
|
INIT_LIST_HEAD(&lio->glist);
|
||||||
|
|
||||||
for (i = 0; i < lio->tx_qsize; i++) {
|
for (i = 0; i < lio->tx_qsize; i++) {
|
||||||
g = kmalloc(sizeof(*g), GFP_KERNEL);
|
g = kzalloc(sizeof(*g), GFP_KERNEL);
|
||||||
if (!g)
|
if (!g)
|
||||||
break;
|
break;
|
||||||
memset(g, 0, sizeof(struct octnic_gather));
|
|
||||||
|
|
||||||
g->sg_size =
|
g->sg_size =
|
||||||
((ROUNDUP4(OCTNIC_MAX_SG) >> 2) * OCT_SG_ENTRY_SIZE);
|
((ROUNDUP4(OCTNIC_MAX_SG) >> 2) * OCT_SG_ENTRY_SIZE);
|
||||||
|
|
Loading…
Reference in New Issue