linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3] net: stmmac: pci: remove the duplicate code of set phy_mask
@ 2020-01-08 13:56 Dejin Zheng
  2020-01-10  2:35 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Dejin Zheng @ 2020-01-08 13:56 UTC (permalink / raw)
  To: peppe.cavallaro, alexandre.torgue, joabreu, davem, mcoquelin.stm32
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, Dejin Zheng

All members of mdio_bus_data are cleared to 0 when it was obtained
by devm_kzalloc(). so It doesn't need to set phy_mask as 0 again.

Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---

Changes since v2:
    Abandoned the other commits, now only this one commit is
    in the patch set.

Changes since v1:
    adjust some commit comments.

 drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
index 8237dbc3e991..40f171d310d7 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c
@@ -65,7 +65,6 @@ static void common_default_data(struct plat_stmmacenet_data *plat)
 	plat->force_sf_dma_mode = 1;
 
 	plat->mdio_bus_data->needs_reset = true;
-	plat->mdio_bus_data->phy_mask = 0;
 
 	/* Set default value for multicast hash bins */
 	plat->multicast_filter_bins = HASH_TABLE_SIZE;
@@ -154,8 +153,6 @@ static int intel_mgbe_common_data(struct pci_dev *pdev,
 	plat->tx_queues_cfg[6].weight = 0x0F;
 	plat->tx_queues_cfg[7].weight = 0x10;
 
-	plat->mdio_bus_data->phy_mask = 0;
-
 	plat->dma_cfg->pbl = 32;
 	plat->dma_cfg->pblx8 = true;
 	plat->dma_cfg->fixed_burst = 0;
@@ -386,8 +383,6 @@ static int snps_gmac5_default_data(struct pci_dev *pdev,
 	plat->tso_en = 1;
 	plat->pmt = 1;
 
-	plat->mdio_bus_data->phy_mask = 0;
-
 	/* Set default value for multicast hash bins */
 	plat->multicast_filter_bins = HASH_TABLE_SIZE;
 
-- 
2.17.1


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

* Re: [PATCH v3] net: stmmac: pci: remove the duplicate code of set phy_mask
  2020-01-08 13:56 [PATCH v3] net: stmmac: pci: remove the duplicate code of set phy_mask Dejin Zheng
@ 2020-01-10  2:35 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2020-01-10  2:35 UTC (permalink / raw)
  To: zhengdejin5
  Cc: peppe.cavallaro, alexandre.torgue, joabreu, mcoquelin.stm32,
	netdev, linux-stm32, linux-arm-kernel, linux-kernel

From: Dejin Zheng <zhengdejin5@gmail.com>
Date: Wed,  8 Jan 2020 21:56:49 +0800

> All members of mdio_bus_data are cleared to 0 when it was obtained
> by devm_kzalloc(). so It doesn't need to set phy_mask as 0 again.
> 
> Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
> ---
> 
> Changes since v2:
>     Abandoned the other commits, now only this one commit is
>     in the patch set.
> 
> Changes since v1:
>     adjust some commit comments.

Applied to net-next, thanks.

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

end of thread, other threads:[~2020-01-10  2:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 13:56 [PATCH v3] net: stmmac: pci: remove the duplicate code of set phy_mask Dejin Zheng
2020-01-10  2:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).