IB/rxe: Remove superfluous casts
authorBart Van Assche <bart.vanassche@sandisk.com>
Tue, 10 Jan 2017 19:15:44 +0000 (11:15 -0800)
committerDoug Ledford <dledford@redhat.com>
Tue, 10 Jan 2017 21:52:47 +0000 (16:52 -0500)
Casting a pointer to 'void *' explicitly is not necessary in C code.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Reviewed-by: Andrew Boyer <andrew.boyer@dell.com>
Cc: Moni Shoua <monis@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/sw/rxe/rxe_pool.c

index 4fe1114..7d1e286 100644 (file)
@@ -454,7 +454,7 @@ void *rxe_pool_get_index(struct rxe_pool *pool, u32 index)
 
 out:
        spin_unlock_irqrestore(&pool->pool_lock, flags);
-       return node ? (void *)elem : NULL;
+       return node ? elem : NULL;
 }
 
 void *rxe_pool_get_key(struct rxe_pool *pool, void *key)
@@ -490,5 +490,5 @@ void *rxe_pool_get_key(struct rxe_pool *pool, void *key)
 
 out:
        spin_unlock_irqrestore(&pool->pool_lock, flags);
-       return node ? ((void *)elem) : NULL;
+       return node ? elem : NULL;
 }