diff options
author | Joe Perches <joe@perches.com> | 2010-11-04 23:07:36 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2011-01-12 14:11:58 -0500 |
commit | 948579cd8c6ea7c8c98c52b79f4470952e182ebd (patch) | |
tree | 77e85adbdd07be8394fa60d08d3f1dbda3c67393 /drivers/infiniband/hw/ehca | |
parent | 4162cf64973df51fc885825bc9ca4d055891c49f (diff) |
RDMA: Use vzalloc() to replace vmalloc()+memset(0)
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca')
-rw-r--r-- | drivers/infiniband/hw/ehca/ipz_pt_fn.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ehca/ipz_pt_fn.c b/drivers/infiniband/hw/ehca/ipz_pt_fn.c index 1596e3085344..1898d6e7cce5 100644 --- a/drivers/infiniband/hw/ehca/ipz_pt_fn.c +++ b/drivers/infiniband/hw/ehca/ipz_pt_fn.c | |||
@@ -222,15 +222,14 @@ int ipz_queue_ctor(struct ehca_pd *pd, struct ipz_queue *queue, | |||
222 | queue->small_page = NULL; | 222 | queue->small_page = NULL; |
223 | 223 | ||
224 | /* allocate queue page pointers */ | 224 | /* allocate queue page pointers */ |
225 | queue->queue_pages = kmalloc(nr_of_pages * sizeof(void *), GFP_KERNEL); | 225 | queue->queue_pages = kzalloc(nr_of_pages * sizeof(void *), GFP_KERNEL); |
226 | if (!queue->queue_pages) { | 226 | if (!queue->queue_pages) { |
227 | queue->queue_pages = vmalloc(nr_of_pages * sizeof(void *)); | 227 | queue->queue_pages = vzalloc(nr_of_pages * sizeof(void *)); |
228 | if (!queue->queue_pages) { | 228 | if (!queue->queue_pages) { |
229 | ehca_gen_err("Couldn't allocate queue page list"); | 229 | ehca_gen_err("Couldn't allocate queue page list"); |
230 | return 0; | 230 | return 0; |
231 | } | 231 | } |
232 | } | 232 | } |
233 | memset(queue->queue_pages, 0, nr_of_pages * sizeof(void *)); | ||
234 | 233 | ||
235 | /* allocate actual queue pages */ | 234 | /* allocate actual queue pages */ |
236 | if (is_small) { | 235 | if (is_small) { |