IB/rxe: Change pool state enums to capital letters

This change “IB/rxe: Change pool state enums to capital letters” (commit 3ccf19e) in Linux kernel is authored by Parav Pandit <parav [at] mellanox.com> on Mon Aug 27 08:44:15 2018 +0300.

Description of "IB/rxe: Change pool state enums to capital letters"

The change “IB/rxe: Change pool state enums to capital letters” introduces changes as follows.

IB/rxe: Change pool state enums to capital letters

Normal practice is to have enum defines in capital letters.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>

Linux kernel releases containing commit 3ccf19e

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes from "IB/rxe: Change pool state enums to capital letters"

There are 16 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/infiniband/sw/rxe/rxe_pool.c | 12 ++++++------
 drivers/infiniband/sw/rxe/rxe_pool.h |  4 ++--
 2 files changed, 8 insertions(+), 8 deletions(-)
 
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c
index be076d818891..c8598b91e454 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.c
+++ b/drivers/infiniband/sw/rxe/rxe_pool.c
@@ -222,7 +222,7 @@ int rxe_pool_init(
 		pool->key_size = rxe_type_info[type].key_size;
 	}
 
-	pool->state = rxe_pool_valid;
+	pool->state = RXE_POOL_STATE_VALID;
 
 out:
 	return err;
@@ -232,7 +232,7 @@ static void rxe_pool_release(struct kref *kref)
 {
 	struct rxe_pool *pool = container_of(kref, struct rxe_pool, ref_cnt);
 
-	pool->state = rxe_pool_invalid;
+	pool->state = RXE_POOL_STATE_INVALID;
 	kfree(pool->table);
 }
 
@@ -246,7 +246,7 @@ int rxe_pool_cleanup(struct rxe_pool *pool)
 	unsigned long flags;
 
 	write_lock_irqsave(&pool->pool_lock, flags);
-	pool->state = rxe_pool_invalid;
+	pool->state = RXE_POOL_STATE_INVALID;
 	if (atomic_read(&pool->num_elem) > 0)
 		pr_warn("%s pool destroyed with unfree'd elem\n",
 			pool_name(pool));
@@ -385,7 +385,7 @@ void *rxe_alloc(struct rxe_pool *pool)
 	might_sleep_if(!(pool->flags & RXE_POOL_ATOMIC));
 
 	read_lock_irqsave(&pool->pool_lock, flags);
-	if (pool->state != rxe_pool_valid) {
+	if (pool->state != RXE_POOL_STATE_VALID) {
 		read_unlock_irqrestore(&pool->pool_lock, flags);
 		return NULL;
 	}
@@ -438,7 +438,7 @@ void *rxe_pool_get_index(struct rxe_pool *pool, u32 index)
 
 	read_lock_irqsave(&pool->pool_lock, flags);
 
-	if (pool->state != rxe_pool_valid)
+	if (pool->state != RXE_POOL_STATE_VALID)
 		goto out;
 
 	node = pool->tree.rb_node;
@@ -471,7 +471,7 @@ void *rxe_pool_get_key(struct rxe_pool *pool, void *key)
 
 	read_lock_irqsave(&pool->pool_lock, flags);
 
-	if (pool->state != rxe_pool_valid)
+	if (pool->state != RXE_POOL_STATE_VALID)
 		goto out;
 
 	node = pool->tree.rb_node;
diff --git a/drivers/infiniband/sw/rxe/rxe_pool.h b/drivers/infiniband/sw/rxe/rxe_pool.h
index 6eb344236afc..aa4ba307097b 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.h
+++ b/drivers/infiniband/sw/rxe/rxe_pool.h
@@ -74,8 +74,8 @@ struct rxe_type_info {
 extern struct rxe_type_info rxe_type_info[];
 
 enum rxe_pool_state {
-	rxe_pool_invalid,
-	rxe_pool_valid,
+	RXE_POOL_STATE_INVALID,
+	RXE_POOL_STATE_VALID,
 };
 
 struct rxe_pool_entry {

The commit for this change in Linux stable tree is 3ccf19e (patch).

Last modified: 2020/02/09