aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/mthca/mthca_main.c11
-rw-r--r--drivers/infiniband/hw/mthca/mthca_profile.c4
-rw-r--r--drivers/infiniband/hw/mthca/mthca_profile.h2
3 files changed, 10 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_main.c b/drivers/infiniband/hw/mthca/mthca_main.c
index 3889ae859f51..9ebadd6e0cfb 100644
--- a/drivers/infiniband/hw/mthca/mthca_main.c
+++ b/drivers/infiniband/hw/mthca/mthca_main.c
@@ -276,6 +276,7 @@ static int mthca_dev_lim(struct mthca_dev *mdev, struct mthca_dev_lim *dev_lim)
276 276
277static int mthca_init_tavor(struct mthca_dev *mdev) 277static int mthca_init_tavor(struct mthca_dev *mdev)
278{ 278{
279 s64 size;
279 u8 status; 280 u8 status;
280 int err; 281 int err;
281 struct mthca_dev_lim dev_lim; 282 struct mthca_dev_lim dev_lim;
@@ -328,9 +329,11 @@ static int mthca_init_tavor(struct mthca_dev *mdev)
328 if (mdev->mthca_flags & MTHCA_FLAG_SRQ) 329 if (mdev->mthca_flags & MTHCA_FLAG_SRQ)
329 profile.num_srq = dev_lim.max_srqs; 330 profile.num_srq = dev_lim.max_srqs;
330 331
331 err = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca); 332 size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);
332 if (err < 0) 333 if (size < 0) {
334 err = size;
333 goto err_disable; 335 goto err_disable;
336 }
334 337
335 err = mthca_INIT_HCA(mdev, &init_hca, &status); 338 err = mthca_INIT_HCA(mdev, &init_hca, &status);
336 if (err) { 339 if (err) {
@@ -609,7 +612,7 @@ static int mthca_init_arbel(struct mthca_dev *mdev)
609 struct mthca_dev_lim dev_lim; 612 struct mthca_dev_lim dev_lim;
610 struct mthca_profile profile; 613 struct mthca_profile profile;
611 struct mthca_init_hca_param init_hca; 614 struct mthca_init_hca_param init_hca;
612 u64 icm_size; 615 s64 icm_size;
613 u8 status; 616 u8 status;
614 int err; 617 int err;
615 618
@@ -657,7 +660,7 @@ static int mthca_init_arbel(struct mthca_dev *mdev)
657 profile.num_srq = dev_lim.max_srqs; 660 profile.num_srq = dev_lim.max_srqs;
658 661
659 icm_size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca); 662 icm_size = mthca_make_profile(mdev, &profile, &dev_lim, &init_hca);
660 if ((int) icm_size < 0) { 663 if (icm_size < 0) {
661 err = icm_size; 664 err = icm_size;
662 goto err_stop_fw; 665 goto err_stop_fw;
663 } 666 }
diff --git a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c
index 26bf86d1cfcd..605a8d57fac6 100644
--- a/drivers/infiniband/hw/mthca/mthca_profile.c
+++ b/drivers/infiniband/hw/mthca/mthca_profile.c
@@ -63,7 +63,7 @@ enum {
63 MTHCA_NUM_PDS = 1 << 15 63 MTHCA_NUM_PDS = 1 << 15
64}; 64};
65 65
66u64 mthca_make_profile(struct mthca_dev *dev, 66s64 mthca_make_profile(struct mthca_dev *dev,
67 struct mthca_profile *request, 67 struct mthca_profile *request,
68 struct mthca_dev_lim *dev_lim, 68 struct mthca_dev_lim *dev_lim,
69 struct mthca_init_hca_param *init_hca) 69 struct mthca_init_hca_param *init_hca)
@@ -77,7 +77,7 @@ u64 mthca_make_profile(struct mthca_dev *dev,
77 }; 77 };
78 78
79 u64 mem_base, mem_avail; 79 u64 mem_base, mem_avail;
80 u64 total_size = 0; 80 s64 total_size = 0;
81 struct mthca_resource *profile; 81 struct mthca_resource *profile;
82 struct mthca_resource tmp; 82 struct mthca_resource tmp;
83 int i, j; 83 int i, j;
diff --git a/drivers/infiniband/hw/mthca/mthca_profile.h b/drivers/infiniband/hw/mthca/mthca_profile.h
index 94641808f97f..e76cb62d8e32 100644
--- a/drivers/infiniband/hw/mthca/mthca_profile.h
+++ b/drivers/infiniband/hw/mthca/mthca_profile.h
@@ -53,7 +53,7 @@ struct mthca_profile {
53 int fmr_reserved_mtts; 53 int fmr_reserved_mtts;
54}; 54};
55 55
56u64 mthca_make_profile(struct mthca_dev *mdev, 56s64 mthca_make_profile(struct mthca_dev *mdev,
57 struct mthca_profile *request, 57 struct mthca_profile *request,
58 struct mthca_dev_lim *dev_lim, 58 struct mthca_dev_lim *dev_lim,
59 struct mthca_init_hca_param *init_hca); 59 struct mthca_init_hca_param *init_hca);