From: Joe Perches <joe@perches.com>
To: Patrick McHardy <kaber@trash.net>,
Andy Grover <andy.grover@oracle.com>,
Jiri Kosina <trivial@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
coreteam@netfilter.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, rds-devel@oss.oracle.com
Subject: [TRIVIAL PATCH next 15/15] net: Convert vmalloc/memset to vzalloc
Date: Sat, 28 May 2011 10:36:35 -0700 [thread overview]
Message-ID: <045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com> (raw)
In-Reply-To: <cover.1306603968.git.joe@perches.com>
Signed-off-by: Joe Perches <joe@perches.com>
---
net/netfilter/x_tables.c | 5 ++---
net/rds/ib_cm.c | 6 ++----
2 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/netfilter/x_tables.c b/net/netfilter/x_tables.c
index b0869fe..71441b9 100644
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -776,12 +776,11 @@ static int xt_jumpstack_alloc(struct xt_table_info *i)
size = sizeof(void **) * nr_cpu_ids;
if (size > PAGE_SIZE)
- i->jumpstack = vmalloc(size);
+ i->jumpstack = vzalloc(size);
else
- i->jumpstack = kmalloc(size, GFP_KERNEL);
+ i->jumpstack = kzalloc(size, GFP_KERNEL);
if (i->jumpstack == NULL)
return -ENOMEM;
- memset(i->jumpstack, 0, size);
i->stacksize *= xt_jumpstack_multiplier;
size = sizeof(void *) * i->stacksize;
diff --git a/net/rds/ib_cm.c b/net/rds/ib_cm.c
index fd453dd..6ecaf78 100644
--- a/net/rds/ib_cm.c
+++ b/net/rds/ib_cm.c
@@ -374,23 +374,21 @@ static int rds_ib_setup_qp(struct rds_connection *conn)
goto out;
}
- ic->i_sends = vmalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
+ ic->i_sends = vzalloc_node(ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work),
ibdev_to_node(dev));
if (!ic->i_sends) {
ret = -ENOMEM;
rdsdebug("send allocation failed\n");
goto out;
}
- memset(ic->i_sends, 0, ic->i_send_ring.w_nr * sizeof(struct rds_ib_send_work));
- ic->i_recvs = vmalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
+ ic->i_recvs = vzalloc_node(ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work),
ibdev_to_node(dev));
if (!ic->i_recvs) {
ret = -ENOMEM;
rdsdebug("recv allocation failed\n");
goto out;
}
- memset(ic->i_recvs, 0, ic->i_recv_ring.w_nr * sizeof(struct rds_ib_recv_work));
rds_ib_recv_init_ack(ic);
--
1.7.5.rc3.dirty
next prev parent reply other threads:[~2011-05-28 17:37 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 17:36 [TRIVIAL PATCH next 00/15] treewide: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 01/15] s390: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 02/15] x86: " Joe Perches
2011-05-29 19:25 ` [tip:x86/cleanups] x86: Convert vmalloc()+memset() to vzalloc() tip-bot for Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 03/15] atm: Convert vmalloc/memset to vzalloc Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 04/15] drbd: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 05/15] char: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 06/15] isdn: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 07/15] md: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 08/15] media: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 09/15] mtd: " Joe Perches
2011-06-01 8:20 ` Artem Bityutskiy
2011-05-28 17:36 ` [TRIVIAL PATCH next 10/15] scsi: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 11/15] staging: " Joe Perches
2011-05-28 17:36 ` [TRIVIAL PATCH next 12/15] video: " Joe Perches
2011-05-28 17:48 ` Heiko Stübner
2011-05-28 18:13 ` [TRIVIAL PATCH V2 " Joe Perches
2011-05-31 14:28 ` Konrad Rzeszutek Wilk
2011-06-02 8:26 ` Paul Mundt
2011-05-30 11:40 ` [TRIVIAL PATCH " Mel Gorman
2011-05-28 17:36 ` [TRIVIAL PATCH next 13/15] fs: " Joe Perches
2011-05-31 18:20 ` Alex Elder
2011-05-28 17:36 ` [TRIVIAL PATCH next 14/15] mm: " Joe Perches
2011-05-31 19:47 ` Paul Menage
2011-05-28 17:36 ` Joe Perches [this message]
2011-06-02 14:49 ` [TRIVIAL PATCH next 15/15] net: " Pablo Neira Ayuso
2011-06-02 21:39 ` David Miller
2011-06-03 1:35 ` Joe Perches
2011-06-03 9:39 ` Pablo Neira Ayuso
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=045996b9688bfaa2efbd8999405a67e23cd0a075.1306603968.git.joe@perches.com \
--to=joe@perches.com \
--cc=andy.grover@oracle.com \
--cc=coreteam@netfilter.org \
--cc=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@vger.kernel.org \
--cc=netfilter@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=trivial@kernel.org \
/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
all inboxes | Powered by JetHome®