* [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask
@ 2020-01-08 7:25 Dejin Zheng
2020-01-08 7:25 ` [PATCH v2 1/2] net: stmmac: pci: remove the duplicate code of set phy_mask Dejin Zheng
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: Dejin Zheng @ 2020-01-08 7:25 UTC (permalink / raw)
To: peppe.cavallaro, alexandre.torgue, joabreu, davem,
mcoquelin.stm32, martin.blumenstingl, treding, andrew,
weifeng.voon, tglx
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, Dejin Zheng
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/2] net: stmmac: pci: remove the duplicate code of set phy_mask
2020-01-08 7:25 [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Dejin Zheng
@ 2020-01-08 7:25 ` Dejin Zheng
2020-01-08 7:25 ` [PATCH v2 2/2] net: stmmac: remove the useless member phy_mask Dejin Zheng
2020-01-08 7:57 ` [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Jose Abreu
2 siblings, 0 replies; 9+ messages in thread
From: Dejin Zheng @ 2020-01-08 7:25 UTC (permalink / raw)
To: peppe.cavallaro, alexandre.torgue, joabreu, davem,
mcoquelin.stm32, martin.blumenstingl, treding, andrew,
weifeng.voon, tglx
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 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] 9+ messages in thread
* [PATCH v2 2/2] net: stmmac: remove the useless member phy_mask
2020-01-08 7:25 [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Dejin Zheng
2020-01-08 7:25 ` [PATCH v2 1/2] net: stmmac: pci: remove the duplicate code of set phy_mask Dejin Zheng
@ 2020-01-08 7:25 ` Dejin Zheng
2020-01-18 7:51 ` kbuild test robot
2020-01-08 7:57 ` [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Jose Abreu
2 siblings, 1 reply; 9+ messages in thread
From: Dejin Zheng @ 2020-01-08 7:25 UTC (permalink / raw)
To: peppe.cavallaro, alexandre.torgue, joabreu, davem,
mcoquelin.stm32, martin.blumenstingl, treding, andrew,
weifeng.voon, tglx
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel, Dejin Zheng
The value of phy_mask in struct stmmac_mdio_bus_data will be passed
to phy_mask of struct mii_bus before register mdiobus, the mii_bus
was obtained by mdiobus_alloc() and set mii_bus->phy_mask as zero
by default. the stmmac_mdio_bus_data->phy_mask also set zero when
got stmmac_mdio_bus_data by devm_kzalloc(), so doesn't need to pass
the value and remove the useless member phy_mask in the struct
stmmac_mdio_bus_data.
Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
---
Changes since v1:
add this new commit.
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 1 -
include/linux/stmmac.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index cfe5d8b73142..662b1cde51ae 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -388,7 +388,6 @@ int stmmac_mdio_register(struct net_device *ndev)
snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s-%x",
new_bus->name, priv->plat->bus_id);
new_bus->priv = ndev;
- new_bus->phy_mask = mdio_bus_data->phy_mask;
new_bus->parent = priv->device;
err = of_mdiobus_register(new_bus, mdio_node);
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h
index d4bcd9387136..e9aaa9bfb304 100644
--- a/include/linux/stmmac.h
+++ b/include/linux/stmmac.h
@@ -79,7 +79,6 @@
/* Platfrom data for platform device structure's platform_data field */
struct stmmac_mdio_bus_data {
- unsigned int phy_mask;
int *irqs;
int probed_phy_irq;
bool needs_reset;
--
2.17.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* RE: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask
2020-01-08 7:25 [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Dejin Zheng
2020-01-08 7:25 ` [PATCH v2 1/2] net: stmmac: pci: remove the duplicate code of set phy_mask Dejin Zheng
2020-01-08 7:25 ` [PATCH v2 2/2] net: stmmac: remove the useless member phy_mask Dejin Zheng
@ 2020-01-08 7:57 ` Jose Abreu
2020-01-08 11:26 ` Dejin Zheng
2 siblings, 1 reply; 9+ messages in thread
From: Jose Abreu @ 2020-01-08 7:57 UTC (permalink / raw)
To: Dejin Zheng, peppe.cavallaro, alexandre.torgue, davem,
mcoquelin.stm32, martin.blumenstingl, treding, andrew,
weifeng.voon, tglx
Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel
From: Dejin Zheng <zhengdejin5@gmail.com>
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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask
2020-01-08 7:57 ` [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Jose Abreu
@ 2020-01-08 11:26 ` Dejin Zheng
2020-01-08 13:25 ` Jose Abreu
0 siblings, 1 reply; 9+ messages in thread
From: Dejin Zheng @ 2020-01-08 11:26 UTC (permalink / raw)
To: Jose Abreu
Cc: peppe.cavallaro, alexandre.torgue, davem, mcoquelin.stm32,
martin.blumenstingl, treding, andrew, weifeng.voon, tglx, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
On Wed, Jan 08, 2020 at 07:57:14AM +0000, Jose Abreu wrote:
> From: Dejin Zheng <zhengdejin5@gmail.com>
> 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask
2020-01-08 11:26 ` Dejin Zheng
@ 2020-01-08 13:25 ` Jose Abreu
2020-01-08 13:43 ` Dejin Zheng
0 siblings, 1 reply; 9+ messages in thread
From: Jose Abreu @ 2020-01-08 13:25 UTC (permalink / raw)
To: Dejin Zheng
Cc: peppe.cavallaro, alexandre.torgue, davem, mcoquelin.stm32,
martin.blumenstingl, treding, andrew, weifeng.voon, tglx, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
From: Dejin Zheng <zhengdejin5@gmail.com>
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 <zhengdejin5@gmail.com>
> > 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask
2020-01-08 13:25 ` Jose Abreu
@ 2020-01-08 13:43 ` Dejin Zheng
0 siblings, 0 replies; 9+ messages in thread
From: Dejin Zheng @ 2020-01-08 13:43 UTC (permalink / raw)
To: Jose Abreu
Cc: peppe.cavallaro, alexandre.torgue, davem, mcoquelin.stm32,
martin.blumenstingl, treding, andrew, weifeng.voon, tglx, netdev,
linux-stm32, linux-arm-kernel, linux-kernel
On Wed, Jan 08, 2020 at 01:25:21PM +0000, Jose Abreu wrote:
> From: Dejin Zheng <zhengdejin5@gmail.com>
> 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 <zhengdejin5@gmail.com>
> > > 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
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] net: stmmac: remove the useless member phy_mask
2020-01-08 7:25 ` [PATCH v2 2/2] net: stmmac: remove the useless member phy_mask Dejin Zheng
@ 2020-01-18 7:51 ` kbuild test robot
2020-01-20 16:28 ` Dejin Zheng
0 siblings, 1 reply; 9+ messages in thread
From: kbuild test robot @ 2020-01-18 7:51 UTC (permalink / raw)
To: Dejin Zheng
Cc: kbuild-all, peppe.cavallaro, alexandre.torgue, joabreu, davem,
mcoquelin.stm32, martin.blumenstingl, treding, andrew,
weifeng.voon, tglx, netdev, linux-stm32, linux-arm-kernel,
linux-kernel, Dejin Zheng
[-- Attachment #1: Type: text/plain, Size: 2394 bytes --]
Hi Dejin,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on net/master linus/master v5.5-rc6]
[cannot apply to sparc-next/master next-20200117]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Dejin-Zheng/net-stmmac-remove-useless-code-of-phy_mask/20200110-011131
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git daea5b4dc16c3edc90392a512492dae504f1a37a
config: mips-randconfig-a001-20200118 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 5.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=5.5.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> arch/mips//loongson32/common/platform.c:82:2: error: unknown field 'phy_mask' specified in initializer
.phy_mask = 0,
^
vim +/phy_mask +82 arch/mips//loongson32/common/platform.c
f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 79
ca585cf9fb818b arch/mips/loongson1/common/platform.c Kelvin Cheung 2012-07-25 80 /* Synopsys Ethernet GMAC */
f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 81 static struct stmmac_mdio_bus_data ls1x_mdio_bus_data = {
f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 @82 .phy_mask = 0,
f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 83 };
f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 84
:::::: The code at line 82 was first introduced by commit
:::::: f29ad10de6c345c8ae4cb33a99ba8ff29bdcd751 MIPS: Loongson1B: Some fixes/updates for LS1B
:::::: TO: Kelvin Cheung <keguang.zhang@gmail.com>
:::::: CC: Ralf Baechle <ralf@linux-mips.org>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 28071 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/2] net: stmmac: remove the useless member phy_mask
2020-01-18 7:51 ` kbuild test robot
@ 2020-01-20 16:28 ` Dejin Zheng
0 siblings, 0 replies; 9+ messages in thread
From: Dejin Zheng @ 2020-01-20 16:28 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, peppe.cavallaro, alexandre.torgue, joabreu, davem,
mcoquelin.stm32, martin.blumenstingl, treding, andrew,
weifeng.voon, tglx, netdev, linux-stm32, linux-arm-kernel,
linux-kernel
On Sat, Jan 18, 2020 at 03:51:11PM +0800, kbuild test robot wrote:
> Hi Dejin,
>
> Thank you for the patch! Yet something to improve:
>
Thanks for reminding, This patch has been dropped, the patch V3 that replaced
it no longer contains this content, Please refer to
https://patchwork.ozlabs.org/patch/1219694/ for details. It should be fine after
giving up this commit.
Finally, Thanks a lot for Jose's help (Jose.Abreu@synopsys.com), he told me
that the phy_mask is useful and should be kept when I submit this commit.
BR,
Dejin
> [auto build test ERROR on net-next/master]
> [also build test ERROR on net/master linus/master v5.5-rc6]
> [cannot apply to sparc-next/master next-20200117]
> [if your patch is applied to the wrong git tree, please drop us a note to help
> improve the system. BTW, we also suggest to use '--base' option to specify the
> base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
>
> url: https://github.com/0day-ci/linux/commits/Dejin-Zheng/net-stmmac-remove-useless-code-of-phy_mask/20200110-011131
> base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git daea5b4dc16c3edc90392a512492dae504f1a37a
> config: mips-randconfig-a001-20200118 (attached as .config)
> compiler: mipsel-linux-gcc (GCC) 5.5.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> GCC_VERSION=5.5.0 make.cross ARCH=mips
>
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
>
> All errors (new ones prefixed by >>):
>
> >> arch/mips//loongson32/common/platform.c:82:2: error: unknown field 'phy_mask' specified in initializer
> .phy_mask = 0,
> ^
>
> vim +/phy_mask +82 arch/mips//loongson32/common/platform.c
>
> f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 79
> ca585cf9fb818b arch/mips/loongson1/common/platform.c Kelvin Cheung 2012-07-25 80 /* Synopsys Ethernet GMAC */
> f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 81 static struct stmmac_mdio_bus_data ls1x_mdio_bus_data = {
> f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 @82 .phy_mask = 0,
> f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 83 };
> f29ad10de6c345 arch/mips/loongson1/common/platform.c Kelvin Cheung 2014-10-10 84
>
> :::::: The code at line 82 was first introduced by commit
> :::::: f29ad10de6c345c8ae4cb33a99ba8ff29bdcd751 MIPS: Loongson1B: Some fixes/updates for LS1B
>
> :::::: TO: Kelvin Cheung <keguang.zhang@gmail.com>
> :::::: CC: Ralf Baechle <ralf@linux-mips.org>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-01-20 16:28 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-08 7:25 [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Dejin Zheng
2020-01-08 7:25 ` [PATCH v2 1/2] net: stmmac: pci: remove the duplicate code of set phy_mask Dejin Zheng
2020-01-08 7:25 ` [PATCH v2 2/2] net: stmmac: remove the useless member phy_mask Dejin Zheng
2020-01-18 7:51 ` kbuild test robot
2020-01-20 16:28 ` Dejin Zheng
2020-01-08 7:57 ` [PATCH v2 0/2] net: stmmac: remove useless code of phy_mask Jose Abreu
2020-01-08 11:26 ` Dejin Zheng
2020-01-08 13:25 ` Jose Abreu
2020-01-08 13:43 ` Dejin Zheng
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).