Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] freescale:Remove unnecessary (void*) conversions
@ 2023-05-09 10:25 wuych
  2023-05-09 10:58 ` Horatiu Vultur
  2023-05-09 12:04 ` Andrew Lunn
  0 siblings, 2 replies; 3+ messages in thread
From: wuych @ 2023-05-09 10:25 UTC (permalink / raw)
  To: davem, edumazet, pabeni
  Cc: andrew, michael, zhaoxiao, andrew, netdev, linux-kernel,
	kernel-janitors, wuych

Pointer variables of void * type do not require type cast.

Signed-off-by: wuych <yunchuan@nfschina.com>
---
 drivers/net/ethernet/freescale/xgmac_mdio.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c
index a13b4ba4d6e1..167a7fe04853 100644
--- a/drivers/net/ethernet/freescale/xgmac_mdio.c
+++ b/drivers/net/ethernet/freescale/xgmac_mdio.c
@@ -131,7 +131,7 @@ static int xgmac_wait_until_done(struct device *dev,
 static int xgmac_mdio_write_c22(struct mii_bus *bus, int phy_id, int regnum,
 				u16 value)
 {
-	struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv;
+	struct mdio_fsl_priv *priv = bus->priv;
 	struct tgec_mdio_controller __iomem *regs = priv->mdio_base;
 	bool endian = priv->is_little_endian;
 	u16 dev_addr = regnum & 0x1f;
@@ -163,7 +163,7 @@ static int xgmac_mdio_write_c22(struct mii_bus *bus, int phy_id, int regnum,
 static int xgmac_mdio_write_c45(struct mii_bus *bus, int phy_id, int dev_addr,
 				int regnum, u16 value)
 {
-	struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv;
+	struct mdio_fsl_priv *priv = bus->priv;
 	struct tgec_mdio_controller __iomem *regs = priv->mdio_base;
 	bool endian = priv->is_little_endian;
 	u32 mdio_ctl, mdio_stat;
@@ -205,7 +205,7 @@ static int xgmac_mdio_write_c45(struct mii_bus *bus, int phy_id, int dev_addr,
  */
 static int xgmac_mdio_read_c22(struct mii_bus *bus, int phy_id, int regnum)
 {
-	struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv;
+	struct mdio_fsl_priv *priv = bus->priv;
 	struct tgec_mdio_controller __iomem *regs = priv->mdio_base;
 	bool endian = priv->is_little_endian;
 	u16 dev_addr = regnum & 0x1f;
@@ -265,7 +265,7 @@ static int xgmac_mdio_read_c22(struct mii_bus *bus, int phy_id, int regnum)
 static int xgmac_mdio_read_c45(struct mii_bus *bus, int phy_id, int dev_addr,
 			       int regnum)
 {
-	struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv;
+	struct mdio_fsl_priv *priv = bus->priv;
 	struct tgec_mdio_controller __iomem *regs = priv->mdio_base;
 	bool endian = priv->is_little_endian;
 	u32 mdio_stat, mdio_ctl;
@@ -326,7 +326,7 @@ static int xgmac_mdio_read_c45(struct mii_bus *bus, int phy_id, int dev_addr,
 
 static int xgmac_mdio_set_mdc_freq(struct mii_bus *bus)
 {
-	struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv;
+	struct mdio_fsl_priv *priv = bus->priv;
 	struct tgec_mdio_controller __iomem *regs = priv->mdio_base;
 	struct device *dev = bus->parent;
 	u32 mdio_stat, div;
@@ -355,7 +355,7 @@ static int xgmac_mdio_set_mdc_freq(struct mii_bus *bus)
 
 static void xgmac_mdio_set_suppress_preamble(struct mii_bus *bus)
 {
-	struct mdio_fsl_priv *priv = (struct mdio_fsl_priv *)bus->priv;
+	struct mdio_fsl_priv *priv = bus->priv;
 	struct tgec_mdio_controller __iomem *regs = priv->mdio_base;
 	struct device *dev = bus->parent;
 	u32 mdio_stat;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-05-09 12:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 10:25 [PATCH net-next] freescale:Remove unnecessary (void*) conversions wuych
2023-05-09 10:58 ` Horatiu Vultur
2023-05-09 12:04 ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox