Sfoglia il codice sorgente

IB/core: Avoid unnecessary type cast

Type cast from void to struct find_gid_index_context is not needed.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Parav Pandit 7 anni fa
parent
commit
b0dd0d3353
1 ha cambiato i file con 1 aggiunte e 2 eliminazioni
  1. 1 2
      drivers/infiniband/core/verbs.c

+ 1 - 2
drivers/infiniband/core/verbs.c

@@ -421,8 +421,7 @@ static bool find_gid_index(const union ib_gid *gid,
 			   const struct ib_gid_attr *gid_attr,
 			   void *context)
 {
-	struct find_gid_index_context *ctx =
-		(struct find_gid_index_context *)context;
+	struct find_gid_index_context *ctx = context;
 
 	if (ctx->gid_type != gid_attr->gid_type)
 		return false;