aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorFengguang Wu <fengguang.wu@intel.com>2012-10-04 20:13:15 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-05 14:04:56 -0400
commit125c4c706b680c7831f0966ff873c1ad0354ec25 (patch)
tree2b45c5fdd3f69173774fc9ae92c3568cb9796d37 /drivers/infiniband
parentb74ca3b3fd0fac08167ff96287cece56e8ca6f4d (diff)
idr: rename MAX_LEVEL to MAX_IDR_LEVEL
To avoid name conflicts: drivers/video/riva/fbdev.c:281:9: sparse: preprocessor token MAX_LEVEL redefined While at it, also make the other names more consistent and add parentheses. [akpm@linux-foundation.org: repair fallout] [sfr@canb.auug.org.au: IB/mlx4: fix for MAX_ID_MASK to MAX_IDR_MASK name change] Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Bernd Petrovitsch <bernd@petrovitsch.priv.at> Cc: walter harms <wharms@bfs.de> Cc: Glauber Costa <glommer@parallels.com> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/core/cm.c2
-rw-r--r--drivers/infiniband/hw/mlx4/cm.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index d67999f6e34a..394fea2ba1bc 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -390,7 +390,7 @@ static int cm_alloc_id(struct cm_id_private *cm_id_priv)
390 ret = idr_get_new_above(&cm.local_id_table, cm_id_priv, 390 ret = idr_get_new_above(&cm.local_id_table, cm_id_priv,
391 next_id, &id); 391 next_id, &id);
392 if (!ret) 392 if (!ret)
393 next_id = ((unsigned) id + 1) & MAX_ID_MASK; 393 next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
394 spin_unlock_irqrestore(&cm.lock, flags); 394 spin_unlock_irqrestore(&cm.lock, flags);
395 } while( (ret == -EAGAIN) && idr_pre_get(&cm.local_id_table, GFP_KERNEL) ); 395 } while( (ret == -EAGAIN) && idr_pre_get(&cm.local_id_table, GFP_KERNEL) );
396 396
diff --git a/drivers/infiniband/hw/mlx4/cm.c b/drivers/infiniband/hw/mlx4/cm.c
index e25e4dafb8a8..80079e5a2e30 100644
--- a/drivers/infiniband/hw/mlx4/cm.c
+++ b/drivers/infiniband/hw/mlx4/cm.c
@@ -225,7 +225,7 @@ id_map_alloc(struct ib_device *ibdev, int slave_id, u32 sl_cm_id)
225 ret = idr_get_new_above(&sriov->pv_id_table, ent, 225 ret = idr_get_new_above(&sriov->pv_id_table, ent,
226 next_id, &id); 226 next_id, &id);
227 if (!ret) { 227 if (!ret) {
228 next_id = ((unsigned) id + 1) & MAX_ID_MASK; 228 next_id = ((unsigned) id + 1) & MAX_IDR_MASK;
229 ent->pv_cm_id = (u32)id; 229 ent->pv_cm_id = (u32)id;
230 sl_id_map_add(ibdev, ent); 230 sl_id_map_add(ibdev, ent);
231 } 231 }