diff options
author | Eric Sesterhenn <snakebyte@gmx.de> | 2006-10-23 16:17:21 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2006-11-29 18:33:06 -0500 |
commit | bed8bdfddd851657cf9e5fd16bb44abb02ae7f42 (patch) | |
tree | ac021f613071dc4a274d071ea900709cd4e17374 /drivers/infiniband/hw | |
parent | a1a733f65b091fdad3d0783e648c92b491933ab6 (diff) |
IB: kmemdup() cleanup
Replace open coded kmemdup() to save some screen space, and allow
inlining/not inlining to be triggered by gcc.
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw')
-rw-r--r-- | drivers/infiniband/hw/mthca/mthca_provider.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_provider.c b/drivers/infiniband/hw/mthca/mthca_provider.c index fc67f780581b..21422a3336ad 100644 --- a/drivers/infiniband/hw/mthca/mthca_provider.c +++ b/drivers/infiniband/hw/mthca/mthca_provider.c | |||
@@ -1100,11 +1100,10 @@ static struct ib_fmr *mthca_alloc_fmr(struct ib_pd *pd, int mr_access_flags, | |||
1100 | struct mthca_fmr *fmr; | 1100 | struct mthca_fmr *fmr; |
1101 | int err; | 1101 | int err; |
1102 | 1102 | ||
1103 | fmr = kmalloc(sizeof *fmr, GFP_KERNEL); | 1103 | fmr = kmemdup(fmr_attr, sizeof *fmr, GFP_KERNEL); |
1104 | if (!fmr) | 1104 | if (!fmr) |
1105 | return ERR_PTR(-ENOMEM); | 1105 | return ERR_PTR(-ENOMEM); |
1106 | 1106 | ||
1107 | memcpy(&fmr->attr, fmr_attr, sizeof *fmr_attr); | ||
1108 | err = mthca_fmr_alloc(to_mdev(pd->device), to_mpd(pd)->pd_num, | 1107 | err = mthca_fmr_alloc(to_mdev(pd->device), to_mpd(pd)->pd_num, |
1109 | convert_access(mr_access_flags), fmr); | 1108 | convert_access(mr_access_flags), fmr); |
1110 | 1109 | ||