Commit 3ccf19e2 authored by Parav Pandit's avatar Parav Pandit Committed by Doug Ledford

IB/rxe: Change pool state enums to capital letters

Normal practice is to have enum defines in capital letters.
Signed-off-by: default avatarParav Pandit <parav@mellanox.com>
Reviewed-by: default avatarDaniel Jurgens <danielj@mellanox.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarYuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent 66d0f207
...@@ -222,7 +222,7 @@ int rxe_pool_init( ...@@ -222,7 +222,7 @@ int rxe_pool_init(
pool->key_size = rxe_type_info[type].key_size; pool->key_size = rxe_type_info[type].key_size;
} }
pool->state = rxe_pool_valid; pool->state = RXE_POOL_STATE_VALID;
out: out:
return err; return err;
...@@ -232,7 +232,7 @@ static void rxe_pool_release(struct kref *kref) ...@@ -232,7 +232,7 @@ static void rxe_pool_release(struct kref *kref)
{ {
struct rxe_pool *pool = container_of(kref, struct rxe_pool, ref_cnt); 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); kfree(pool->table);
} }
...@@ -246,7 +246,7 @@ int rxe_pool_cleanup(struct rxe_pool *pool) ...@@ -246,7 +246,7 @@ int rxe_pool_cleanup(struct rxe_pool *pool)
unsigned long flags; unsigned long flags;
write_lock_irqsave(&pool->pool_lock, 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) if (atomic_read(&pool->num_elem) > 0)
pr_warn("%s pool destroyed with unfree'd elem\n", pr_warn("%s pool destroyed with unfree'd elem\n",
pool_name(pool)); pool_name(pool));
...@@ -385,7 +385,7 @@ void *rxe_alloc(struct rxe_pool *pool) ...@@ -385,7 +385,7 @@ void *rxe_alloc(struct rxe_pool *pool)
might_sleep_if(!(pool->flags & RXE_POOL_ATOMIC)); might_sleep_if(!(pool->flags & RXE_POOL_ATOMIC));
read_lock_irqsave(&pool->pool_lock, flags); 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); read_unlock_irqrestore(&pool->pool_lock, flags);
return NULL; return NULL;
} }
...@@ -438,7 +438,7 @@ void *rxe_pool_get_index(struct rxe_pool *pool, u32 index) ...@@ -438,7 +438,7 @@ void *rxe_pool_get_index(struct rxe_pool *pool, u32 index)
read_lock_irqsave(&pool->pool_lock, flags); read_lock_irqsave(&pool->pool_lock, flags);
if (pool->state != rxe_pool_valid) if (pool->state != RXE_POOL_STATE_VALID)
goto out; goto out;
node = pool->tree.rb_node; node = pool->tree.rb_node;
...@@ -471,7 +471,7 @@ void *rxe_pool_get_key(struct rxe_pool *pool, void *key) ...@@ -471,7 +471,7 @@ void *rxe_pool_get_key(struct rxe_pool *pool, void *key)
read_lock_irqsave(&pool->pool_lock, flags); read_lock_irqsave(&pool->pool_lock, flags);
if (pool->state != rxe_pool_valid) if (pool->state != RXE_POOL_STATE_VALID)
goto out; goto out;
node = pool->tree.rb_node; node = pool->tree.rb_node;
......
...@@ -74,8 +74,8 @@ struct rxe_type_info { ...@@ -74,8 +74,8 @@ struct rxe_type_info {
extern struct rxe_type_info rxe_type_info[]; extern struct rxe_type_info rxe_type_info[];
enum rxe_pool_state { enum rxe_pool_state {
rxe_pool_invalid, RXE_POOL_STATE_INVALID,
rxe_pool_valid, RXE_POOL_STATE_VALID,
}; };
struct rxe_pool_entry { struct rxe_pool_entry {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment