diff options
author | Roland Dreier <rolandd@cisco.com> | 2005-11-02 10:23:14 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2005-11-02 10:23:14 -0500 |
commit | de6eb66b56d9df5ce6bd254994f05e065214e8cd (patch) | |
tree | 7463446a05b5e9a5d2fc400da0be8d4a6c2ff6f1 /drivers/infiniband/hw/mthca/mthca_profile.c | |
parent | 7b28b0d000eeb62d77add636f5d6eb0da04e48aa (diff) |
[IB] kzalloc() conversions
Replace kmalloc()+memset(,0,) with kzalloc(), for a net savings of 35
source lines and about 500 bytes of text.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_profile.c')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_profile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c index 0576056b34f4..408cd551bff1 100644 --- a/drivers/infiniband/hw/mthca/mthca_profile.c +++ b/drivers/infiniband/hw/mthca/mthca_profile.c | |||
@@ -80,12 +80,10 @@ u64 mthca_make_profile(struct mthca_dev *dev, | |||
80 | struct mthca_resource tmp; | 80 | struct mthca_resource tmp; |
81 | int i, j; | 81 | int i, j; |
82 | 82 | ||
83 | profile = kmalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL); | 83 | profile = kzalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL); |
84 | if (!profile) | 84 | if (!profile) |
85 | return -ENOMEM; | 85 | return -ENOMEM; |
86 | 86 | ||
87 | memset(profile, 0, MTHCA_RES_NUM * sizeof *profile); | ||
88 | |||
89 | profile[MTHCA_RES_QP].size = dev_lim->qpc_entry_sz; | 87 | profile[MTHCA_RES_QP].size = dev_lim->qpc_entry_sz; |
90 | profile[MTHCA_RES_EEC].size = dev_lim->eec_entry_sz; | 88 | profile[MTHCA_RES_EEC].size = dev_lim->eec_entry_sz; |
91 | profile[MTHCA_RES_SRQ].size = dev_lim->srq_entry_sz; | 89 | profile[MTHCA_RES_SRQ].size = dev_lim->srq_entry_sz; |