Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: Saeed Mahameed <saeedm@mellanox.com>,
	Leon Romanovsky <leonro@mellanox.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
	Parav Pandit <parav@mellanox.com>
Subject: [PATCH mlx5-next 5/6] {IB,net}/mlx5: No need to typecast from void* to mlx5_ib_dev*
Date: Wed, 29 May 2019 22:50:39 +0000	[thread overview]
Message-ID: <20190529224949.18194-6-saeedm@mellanox.com> (raw)
In-Reply-To: <20190529224949.18194-1-saeedm@mellanox.com>

From: Parav Pandit <parav@mellanox.com>

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              | 2 +-
 drivers/net/ethernet/mellanox/mlx5/core/en_rep.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/mlx5/ib_rep.h b/drivers/infiniband/hw/mlx5/ib_rep.h
index 1d9778da8a50..c995102b0276 100644
--- a/drivers/infiniband/hw/mlx5/ib_rep.h
+++ b/drivers/infiniband/hw/mlx5/ib_rep.h
@@ -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__ */
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
index 83b573b1abac..c40c025afd99 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rep.h
@@ -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 {
-- 
2.21.0


  parent reply	other threads:[~2019-05-29 22:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 22:50 [PATCH mlx5-next 0/6] Mellanox, mlx5-next minor updates 2019-05-29 Saeed Mahameed
2019-05-29 22:50 ` [PATCH mlx5-next 1/6] net/mlx5: Add core dump register access HW bits Saeed Mahameed
2019-05-29 22:50 ` [PATCH mlx5-next 2/6] net/mlx5: Introduce termination table bits Saeed Mahameed
2019-05-29 22:50 ` [PATCH mlx5-next 3/6] net/mlx5: E-Switch, Replace host_params event with functions_changed event Saeed Mahameed
2019-05-29 22:50 ` [PATCH mlx5-next 4/6] net/mlx5: E-Switch, Honor eswitch functions changed event cap Saeed Mahameed
2019-05-29 22:50 ` Saeed Mahameed [this message]
2019-05-29 22:50 ` [PATCH mlx5-next 6/6] {IB,net}/mlx5: Constify rep ops functions pointers Saeed Mahameed
2019-05-31 19:29 ` [PATCH mlx5-next 0/6] Mellanox, mlx5-next minor updates 2019-05-29 Saeed Mahameed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190529224949.18194-6-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=leonro@mellanox.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=parav@mellanox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox