diff mbox

[05/15] IB/rxe: Remove superfluous casts

Message ID 1483353522.3592.22.camel@sandisk.com (mailing list archive)
State Changes Requested
Headers show

Commit Message

Bart Van Assche Jan. 2, 2017, 10:40 a.m. UTC
Casting a pointer to 'void *' explicitly is not necessary in C code.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>

Cc: Moni Shoua <monis@mellanox.com>
Cc: Andrew Boyer <andrew.boyer@dell.com>
---
 drivers/infiniband/sw/rxe/rxe_pool.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.11.0

Comments

Leon Romanovsky Jan. 5, 2017, 6:48 a.m. UTC | #1
On Mon, Jan 02, 2017 at 10:40:30AM +0000, Bart Van Assche wrote:
> Casting a pointer to 'void *' explicitly is not necessary in C code.
>
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> Cc: Moni Shoua <monis@mellanox.com>
> Cc: Andrew Boyer <andrew.boyer@dell.com>

Thanks,
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Andrew Boyer Jan. 9, 2017, 2:29 p.m. UTC | #2
On 1/2/17, 5:40 AM, "Bart Van Assche" <Bart.VanAssche@sandisk.com> wrote:

>Casting a pointer to 'void *' explicitly is not necessary in C code.
>
>Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
>Cc: Moni Shoua <monis@mellanox.com>
>Cc: Andrew Boyer <andrew.boyer@dell.com>
>---
> drivers/infiniband/sw/rxe/rxe_pool.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Andrew Boyer <andrew.boyer@dell.com>


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/infiniband/sw/rxe/rxe_pool.c b/drivers/infiniband/sw/rxe/rxe_pool.c
index 4fe11148b304..7d1e2862b928 100644
--- a/drivers/infiniband/sw/rxe/rxe_pool.c
+++ b/drivers/infiniband/sw/rxe/rxe_pool.c
@@ -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;
 }