]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
{IB, net}/mlx5: No need to typecast from void* to mlx5_ib_dev*
authorParav Pandit <parav@mellanox.com>
Wed, 29 May 2019 22:50:39 +0000 (22:50 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 31 May 2019 19:28:14 +0000 (12:28 -0700)
Avoid typecasting from void* to mlx5_ib_dev* or mlx5e_rep_priv*
as it is not needed.

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/ib_rep.h
drivers/net/ethernet/mellanox/mlx5/core/en_rep.h

index 1d9778da8a50b4c5d04225654bc41c8f94739821..c995102b02766a19d62dc3222aed8bcd3aa333c2 100644 (file)
@@ -72,6 +72,6 @@ struct net_device *mlx5_ib_get_rep_netdev(struct mlx5_eswitch *esw,
 static inline
 struct mlx5_ib_dev *mlx5_ib_rep_to_dev(struct mlx5_eswitch_rep *rep)
 {
-       return (struct mlx5_ib_dev *)rep->rep_if[REP_IB].priv;
+       return rep->rep_if[REP_IB].priv;
 }
 #endif /* __MLX5_IB_REP_H__ */
index 83b573b1abac78038876cc217f1c934ad90a7036..c40c025afd998eac8afceef78db697bdf366d832 100644 (file)
@@ -91,7 +91,7 @@ struct mlx5e_rep_priv {
 static inline
 struct mlx5e_rep_priv *mlx5e_rep_to_rep_priv(struct mlx5_eswitch_rep *rep)
 {
-       return (struct mlx5e_rep_priv *)rep->rep_if[REP_ETH].priv;
+       return rep->rep_if[REP_ETH].priv;
 }
 
 struct mlx5e_neigh {