diff options
Diffstat (limited to 'drivers/infiniband/hw/mthca/mthca_profile.c')
| -rw-r--r-- | drivers/infiniband/hw/mthca/mthca_profile.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/mthca/mthca_profile.c b/drivers/infiniband/hw/mthca/mthca_profile.c index 8edb28a9a0e7..15d064479ef6 100644 --- a/drivers/infiniband/hw/mthca/mthca_profile.c +++ b/drivers/infiniband/hw/mthca/mthca_profile.c | |||
| @@ -77,7 +77,6 @@ s64 mthca_make_profile(struct mthca_dev *dev, | |||
| 77 | u64 mem_base, mem_avail; | 77 | u64 mem_base, mem_avail; |
| 78 | s64 total_size = 0; | 78 | s64 total_size = 0; |
| 79 | struct mthca_resource *profile; | 79 | struct mthca_resource *profile; |
| 80 | struct mthca_resource tmp; | ||
| 81 | int i, j; | 80 | int i, j; |
| 82 | 81 | ||
| 83 | profile = kzalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL); | 82 | profile = kzalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL); |
| @@ -136,11 +135,8 @@ s64 mthca_make_profile(struct mthca_dev *dev, | |||
| 136 | */ | 135 | */ |
| 137 | for (i = MTHCA_RES_NUM; i > 0; --i) | 136 | for (i = MTHCA_RES_NUM; i > 0; --i) |
| 138 | for (j = 1; j < i; ++j) { | 137 | for (j = 1; j < i; ++j) { |
| 139 | if (profile[j].size > profile[j - 1].size) { | 138 | if (profile[j].size > profile[j - 1].size) |
| 140 | tmp = profile[j]; | 139 | swap(profile[j], profile[j - 1]); |
| 141 | profile[j] = profile[j - 1]; | ||
| 142 | profile[j - 1] = tmp; | ||
| 143 | } | ||
| 144 | } | 140 | } |
| 145 | 141 | ||
| 146 | for (i = 0; i < MTHCA_RES_NUM; ++i) { | 142 | for (i = 0; i < MTHCA_RES_NUM; ++i) { |
