From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Derek Chickles <derek.chickles@caviumnetworks.com>,
Satanand Burla <satananda.burla@caviumnetworks.com>,
Felix Manlunas <felix.manlunas@caviumnetworks.com>,
Raghu Vatsavayi <raghu.vatsavayi@caviumnetworks.com>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] net: cavium: liquidio: use kzalloc in setup_glist()
Date: Wed, 9 Sep 2015 10:38:02 +0200 [thread overview]
Message-ID: <1441787886-7214-2-git-send-email-linux@rasmusvillemoes.dk> (raw)
In-Reply-To: <1441787886-7214-1-git-send-email-linux@rasmusvillemoes.dk>
We save a little .text and get rid of the sizeof(...) style
inconsistency.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
drivers/net/ethernet/cavium/liquidio/lio_main.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c
index 0660deecc2c9..f683d97d7614 100644
--- a/drivers/net/ethernet/cavium/liquidio/lio_main.c
+++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c
@@ -818,10 +818,9 @@ static int setup_glist(struct lio *lio)
INIT_LIST_HEAD(&lio->glist);
for (i = 0; i < lio->tx_qsize; i++) {
- g = kmalloc(sizeof(*g), GFP_KERNEL);
+ g = kzalloc(sizeof(*g), GFP_KERNEL);
if (!g)
break;
- memset(g, 0, sizeof(struct octnic_gather));
g->sg_size =
((ROUNDUP4(OCTNIC_MAX_SG) >> 2) * OCT_SG_ENTRY_SIZE);
--
2.1.3
next prev parent reply other threads:[~2015-09-09 8:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-09 8:38 [PATCH 0/4] net: a few kzalloc/memset cleanups Rasmus Villemoes
2015-09-09 8:38 ` Rasmus Villemoes [this message]
2015-09-09 8:38 ` [PATCH 2/4] net: jme: use kzalloc() instead of kmalloc+memset Rasmus Villemoes
2015-09-09 8:38 ` [PATCH 3/4] net: mv643xx_eth: use kzalloc Rasmus Villemoes
2015-09-09 16:00 ` Joe Perches
2015-09-09 18:34 ` Rasmus Villemoes
2015-09-09 18:45 ` Joe Perches
2015-09-09 23:25 ` Joe Perches
2015-09-09 8:38 ` [PATCH 4/4] net: qlcnic: delete redundant memsets Rasmus Villemoes
2015-09-10 0:06 ` [PATCH 0/4] net: a few kzalloc/memset cleanups David Miller
2015-09-10 0:40 ` [PATCH] mv643xx_eth: Neaten mv643xx_eth_program_multicast_filter Joe Perches
2015-09-15 19:49 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1441787886-7214-2-git-send-email-linux@rasmusvillemoes.dk \
--to=linux@rasmusvillemoes.dk \
--cc=derek.chickles@caviumnetworks.com \
--cc=felix.manlunas@caviumnetworks.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raghu.vatsavayi@caviumnetworks.com \
--cc=satananda.burla@caviumnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome