2020-01-08 07:49:01

by Dejin Zheng

[permalink] [raw]
Subject: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask

These patches just for cleanup codes in stmmac driver.

Changes since v1:
1, add a new commit for remove the useless member phy_mask.
2, adjust some commit comments for the original commit.

Dejin Zheng (2):
net: stmmac: pci: remove the duplicate code of set phy_mask
net: stmmac: remove the useless member phy_mask

drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 -
drivers/net/ethernet/stmicro/stmmac/stmmac_pci.c | 5 -----
include/linux/stmmac.h | 1 -
3 files changed, 7 deletions(-)

--
2.17.1


2020-01-08 07:49:04

by Dejin Zheng

[permalink] [raw]
Subject: [PATCH v2 1/2] net: stmmac: pci: remove the duplicate code of set phy_mask

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 <[email protected]>
---

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

2020-01-08 07:58:25

by Jose Abreu

[permalink] [raw]
Subject: RE: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask

From: Dejin Zheng <[email protected]>
Date: Jan/08/2020, 07:25:48 (UTC+00:00)

> Changes since v1:
> 1, add a new commit for remove the useless member phy_mask.

No, this is not useless. It's an API for developers that need only
certain PHYs to be detected. Please do not remove this.

---
Thanks,
Jose Miguel Abreu

2020-01-08 13:43:47

by Dejin Zheng

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask

On Wed, Jan 08, 2020 at 07:57:14AM +0000, Jose Abreu wrote:
> From: Dejin Zheng <[email protected]>
> Date: Jan/08/2020, 07:25:48 (UTC+00:00)
>
> > Changes since v1:
> > 1, add a new commit for remove the useless member phy_mask.
>
> No, this is not useless. It's an API for developers that need only
> certain PHYs to be detected. Please do not remove this.
>
Hi Jose:

Okay, If you think it is a feature that needs to be retained, I will
abandon it. since I am a newbie, after that, Do I need to update the
other commit in this patchset for patch v3? Thanks!

BR,
dejin

> ---
> Thanks,
> Jose Miguel Abreu

2020-01-08 14:30:40

by Dejin Zheng

[permalink] [raw]
Subject: Re: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask

On Wed, Jan 08, 2020 at 01:25:21PM +0000, Jose Abreu wrote:
> From: Dejin Zheng <[email protected]>
> Date: Jan/08/2020, 11:26:52 (UTC+00:00)
>
> > On Wed, Jan 08, 2020 at 07:57:14AM +0000, Jose Abreu wrote:
> > > From: Dejin Zheng <[email protected]>
> > > Date: Jan/08/2020, 07:25:48 (UTC+00:00)
> > >
> > > > Changes since v1:
> > > > 1, add a new commit for remove the useless member phy_mask.
> > >
> > > No, this is not useless. It's an API for developers that need only
> > > certain PHYs to be detected. Please do not remove this.
> > >
> > Hi Jose:
> >
> > Okay, If you think it is a feature that needs to be retained, I will
> > abandon it. since I am a newbie, after that, Do I need to update the
> > other commit in this patchset for patch v3? Thanks!
>
> Your first commit (1/2) looks okay so you can submit that stand-alone in
> my opinion.
>
Jose, thanks for your suggestions, You are so nice! I will do it.
> ---
> Thanks,
> Jose Miguel Abreu

2020-01-08 15:36:01

by Jose Abreu

[permalink] [raw]
Subject: RE: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask

From: Dejin Zheng <[email protected]>
Date: Jan/08/2020, 11:26:52 (UTC+00:00)

> On Wed, Jan 08, 2020 at 07:57:14AM +0000, Jose Abreu wrote:
> > From: Dejin Zheng <[email protected]>
> > Date: Jan/08/2020, 07:25:48 (UTC+00:00)
> >
> > > Changes since v1:
> > > 1, add a new commit for remove the useless member phy_mask.
> >
> > No, this is not useless. It's an API for developers that need only
> > certain PHYs to be detected. Please do not remove this.
> >
> Hi Jose:
>
> Okay, If you think it is a feature that needs to be retained, I will
> abandon it. since I am a newbie, after that, Do I need to update the
> other commit in this patchset for patch v3? Thanks!

Your first commit (1/2) looks okay so you can submit that stand-alone in
my opinion.

---
Thanks,
Jose Miguel Abreu