diff options
Diffstat (limited to 'drivers/infiniband/hw/qib/qib_mr.c')
-rw-r--r-- | drivers/infiniband/hw/qib/qib_mr.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/qib/qib_mr.c b/drivers/infiniband/hw/qib/qib_mr.c index a77fb4fb14e4..c4473db46699 100644 --- a/drivers/infiniband/hw/qib/qib_mr.c +++ b/drivers/infiniband/hw/qib/qib_mr.c | |||
@@ -55,7 +55,7 @@ static int init_qib_mregion(struct qib_mregion *mr, struct ib_pd *pd, | |||
55 | 55 | ||
56 | m = (count + QIB_SEGSZ - 1) / QIB_SEGSZ; | 56 | m = (count + QIB_SEGSZ - 1) / QIB_SEGSZ; |
57 | for (; i < m; i++) { | 57 | for (; i < m; i++) { |
58 | mr->map[i] = kzalloc(sizeof *mr->map[0], GFP_KERNEL); | 58 | mr->map[i] = kzalloc(sizeof(*mr->map[0]), GFP_KERNEL); |
59 | if (!mr->map[i]) | 59 | if (!mr->map[i]) |
60 | goto bail; | 60 | goto bail; |
61 | } | 61 | } |
@@ -104,7 +104,7 @@ struct ib_mr *qib_get_dma_mr(struct ib_pd *pd, int acc) | |||
104 | goto bail; | 104 | goto bail; |
105 | } | 105 | } |
106 | 106 | ||
107 | mr = kzalloc(sizeof *mr, GFP_KERNEL); | 107 | mr = kzalloc(sizeof(*mr), GFP_KERNEL); |
108 | if (!mr) { | 108 | if (!mr) { |
109 | ret = ERR_PTR(-ENOMEM); | 109 | ret = ERR_PTR(-ENOMEM); |
110 | goto bail; | 110 | goto bail; |
@@ -143,7 +143,7 @@ static struct qib_mr *alloc_mr(int count, struct ib_pd *pd) | |||
143 | 143 | ||
144 | /* Allocate struct plus pointers to first level page tables. */ | 144 | /* Allocate struct plus pointers to first level page tables. */ |
145 | m = (count + QIB_SEGSZ - 1) / QIB_SEGSZ; | 145 | m = (count + QIB_SEGSZ - 1) / QIB_SEGSZ; |
146 | mr = kzalloc(sizeof *mr + m * sizeof mr->mr.map[0], GFP_KERNEL); | 146 | mr = kzalloc(sizeof(*mr) + m * sizeof(mr->mr.map[0]), GFP_KERNEL); |
147 | if (!mr) | 147 | if (!mr) |
148 | goto bail; | 148 | goto bail; |
149 | 149 | ||
@@ -347,7 +347,7 @@ qib_alloc_fast_reg_page_list(struct ib_device *ibdev, int page_list_len) | |||
347 | if (size > PAGE_SIZE) | 347 | if (size > PAGE_SIZE) |
348 | return ERR_PTR(-EINVAL); | 348 | return ERR_PTR(-EINVAL); |
349 | 349 | ||
350 | pl = kzalloc(sizeof *pl, GFP_KERNEL); | 350 | pl = kzalloc(sizeof(*pl), GFP_KERNEL); |
351 | if (!pl) | 351 | if (!pl) |
352 | return ERR_PTR(-ENOMEM); | 352 | return ERR_PTR(-ENOMEM); |
353 | 353 | ||
@@ -386,7 +386,7 @@ struct ib_fmr *qib_alloc_fmr(struct ib_pd *pd, int mr_access_flags, | |||
386 | 386 | ||
387 | /* Allocate struct plus pointers to first level page tables. */ | 387 | /* Allocate struct plus pointers to first level page tables. */ |
388 | m = (fmr_attr->max_pages + QIB_SEGSZ - 1) / QIB_SEGSZ; | 388 | m = (fmr_attr->max_pages + QIB_SEGSZ - 1) / QIB_SEGSZ; |
389 | fmr = kzalloc(sizeof *fmr + m * sizeof fmr->mr.map[0], GFP_KERNEL); | 389 | fmr = kzalloc(sizeof(*fmr) + m * sizeof(fmr->mr.map[0]), GFP_KERNEL); |
390 | if (!fmr) | 390 | if (!fmr) |
391 | goto bail; | 391 | goto bail; |
392 | 392 | ||