diff options
author | Doug Ledford <dledford@redhat.com> | 2015-06-11 01:13:30 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2015-06-11 01:13:30 -0400 |
commit | 0699ee7ad7da8bde59d9cf13a50da95e1931e61d (patch) | |
tree | 2df54fc0d365b0645c4072360b610885351e16ef /drivers/infiniband/hw/mthca | |
parent | 9247a8eba62058dba6d018fca4e33332e4c535e8 (diff) | |
parent | 4dc544427991e3cef38ce3ae124b7e6557063bd3 (diff) | |
download | op-kernel-dev-0699ee7ad7da8bde59d9cf13a50da95e1931e61d.zip op-kernel-dev-0699ee7ad7da8bde59d9cf13a50da95e1931e61d.tar.gz |
Merge branch 'for-4.2-misc' into k.o/for-4.2
Diffstat (limited to 'drivers/infiniband/hw/mthca')
-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 8edb28a..15d0644 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, u64 mem_base, mem_avail; s64 total_size = 0; struct mthca_resource *profile; - struct mthca_resource tmp; int i, j; profile = kzalloc(MTHCA_RES_NUM * sizeof *profile, GFP_KERNEL); @@ -136,11 +135,8 @@ s64 mthca_make_profile(struct mthca_dev *dev, */ for (i = MTHCA_RES_NUM; i > 0; --i) for (j = 1; j < i; ++j) { - if (profile[j].size > profile[j - 1].size) { - tmp = profile[j]; - profile[j] = profile[j - 1]; - profile[j - 1] = tmp; - } + if (profile[j].size > profile[j - 1].size) + swap(profile[j], profile[j - 1]); } for (i = 0; i < MTHCA_RES_NUM; ++i) { |