ethtool: put driver specific code into drivers dir
Subsystems (4)
PATCH 1/1 ethtool: put driver specific code into drivers dir
the patch moves the driver specific code in drivers directory
--- Makefile.am | 18 +++++++++++------- amd8111e.c => drivers/amd8111e.c | 0 at76c50x-usb.c => drivers/at76c50x-usb.c | 0 bnxt.c => drivers/bnxt.c | 0 cmis.c => drivers/cmis.c | 0 cmis.h => drivers/cmis.h | 0 cpsw.c => drivers/cpsw.c | 0 de2104x.c => drivers/de2104x.c | 0 dsa.c => drivers/dsa.c | 0 e100.c => drivers/e100.c | 0 e1000.c => drivers/e1000.c | 0 et131x.c => drivers/et131x.c | 0 fec.c => drivers/fec.c | 0 fec_8xx.c => drivers/fec_8xx.c | 0 fjes.c => drivers/fjes.c | 0 fsl_enetc.c => drivers/fsl_enetc.c | 0 hns3.c => drivers/hns3.c | 0 ibm_emac.c => drivers/ibm_emac.c | 0 igb.c => drivers/igb.c | 0 igc.c => drivers/igc.c | 0 ixgb.c => drivers/ixgb.c | 0 ixgbe.c => drivers/ixgbe.c | 0 ixgbevf.c => drivers/ixgbevf.c | 0 lan743x.c => drivers/lan743x.c | 0 lan78xx.c => drivers/lan78xx.c | 0 marvell.c => drivers/marvell.c | 0 natsemi.c => drivers/natsemi.c | 0 pcnet32.c => drivers/pcnet32.c | 0 qsfp.c => drivers/qsfp.c | 0 qsfp.h => drivers/qsfp.h | 0 realtek.c => drivers/realtek.c | 0 sfc.c => drivers/sfc.c | 0 sff-common.c => drivers/sff-common.c | 0 sff-common.h => drivers/sff-common.h | 0 sfpdiag.c => drivers/sfpdiag.c | 0 sfpid.c => drivers/sfpid.c | 0 smsc911x.c => drivers/smsc911x.c | 0 stmmac.c => drivers/stmmac.c | 0 tg3.c => drivers/tg3.c | 0 tse.c => drivers/tse.c | 0 vioc.c => drivers/vioc.c | 0 vmxnet3.c => drivers/vmxnet3.c | 0 netlink/module-eeprom.c | 6 +++--- 43 files changed, 14 insertions(+), 10 deletions(-) rename amd8111e.c => drivers/amd8111e.c (100%) rename at76c50x-usb.c => drivers/at76c50x-usb.c (100%) rename bnxt.c => drivers/bnxt.c (100%) rename cmis.c => drivers/cmis.c (100%) rename cmis.h => drivers/cmis.h (100%) rename cpsw.c => drivers/cpsw.c (100%) rename de2104x.c => drivers/de2104x.c (100%) rename dsa.c => drivers/dsa.c (100%) rename e100.c => drivers/e100.c (100%) rename e1000.c => drivers/e1000.c (100%) rename et131x.c => drivers/et131x.c (100%) rename fec.c => drivers/fec.c (100%) rename fec_8xx.c => drivers/fec_8xx.c (100%) rename fjes.c => drivers/fjes.c (100%) rename fsl_enetc.c => drivers/fsl_enetc.c (100%) rename hns3.c => drivers/hns3.c (100%) rename ibm_emac.c => drivers/ibm_emac.c (100%) rename igb.c => drivers/igb.c (100%) rename igc.c => drivers/igc.c (100%) rename ixgb.c => drivers/ixgb.c (100%) rename ixgbe.c => drivers/ixgbe.c (100%) rename ixgbevf.c => drivers/ixgbevf.c (100%) rename lan743x.c => drivers/lan743x.c (100%) rename lan78xx.c => drivers/lan78xx.c (100%) rename marvell.c => drivers/marvell.c (100%) rename natsemi.c => drivers/natsemi.c (100%) rename pcnet32.c => drivers/pcnet32.c (100%) rename qsfp.c => drivers/qsfp.c (100%) rename qsfp.h => drivers/qsfp.h (100%) rename realtek.c => drivers/realtek.c (100%) rename sfc.c => drivers/sfc.c (100%) rename sff-common.c => drivers/sff-common.c (100%) rename sff-common.h => drivers/sff-common.h (100%) rename sfpdiag.c => drivers/sfpdiag.c (100%) rename sfpid.c => drivers/sfpid.c (100%) rename smsc911x.c => drivers/smsc911x.c (100%) rename stmmac.c => drivers/stmmac.c (100%) rename tg3.c => drivers/tg3.c (100%) rename tse.c => drivers/tse.c (100%) rename vioc.c => drivers/vioc.c (100%) rename vmxnet3.c => drivers/vmxnet3.c (100%)
Makefile.am +11 -7
@@ -17,13 +17,17 @@ ethtool_SOURCES = ethtool.c uapi/linux/const.h uapi/linux/ethtool.h internal.h \ list.h if ETHTOOL_ENABLE_PRETTY_DUMP ethtool_SOURCES += \ - amd8111e.c de2104x.c dsa.c e100.c e1000.c et131x.c igb.c \ - fec.c fec_8xx.c fsl_enetc.c ibm_emac.c ixgb.c ixgbe.c \ - natsemi.c pcnet32.c realtek.c tg3.c marvell.c vioc.c \ - smsc911x.c at76c50x-usb.c sfc.c stmmac.c \ - sff-common.c sff-common.h sfpid.c sfpdiag.c \ - ixgbevf.c tse.c vmxnet3.c qsfp.c qsfp.h fjes.c lan78xx.c \ - igc.c cmis.c cmis.h bnxt.c cpsw.c lan743x.c hns3.c + drivers/amd8111e.c drivers/de2104x.c drivers/dsa.c drivers/e100.c \ + drivers/e1000.c drivers/et131x.c drivers/igb.c drivers/fec.c \ + drivers/fec_8xx.c drivers/fsl_enetc.c drivers/ibm_emac.c drivers/ixgb.c \ + drivers/ixgbe.c drivers/natsemi.c drivers/pcnet32.c drivers/realtek.c \ + drivers/tg3.c drivers/marvell.c drivers/vioc.c drivers/smsc911x.c \ + drivers/at76c50x-usb.c drivers/sfc.c drivers/stmmac.c \ + drivers/sff-common.c drivers/sff-common.h drivers/sfpid.c drivers/sfpdiag.c \ + drivers/ixgbevf.c drivers/tse.c drivers/vmxnet3.c drivers/qsfp.c \ + drivers/qsfp.h drivers/fjes.c drivers/lan78xx.c drivers/igc.c \ + drivers/cmis.c drivers/cmis.h drivers/bnxt.c drivers/cpsw.c \ + drivers/lan743x.c drivers/hns3.c endif if ENABLE_BASH_COMPLETION
drivers/amd8111e.c renamed from amd8111e.c +0 -0
drivers/at76c50x-usb.c renamed from at76c50x-usb.c +0 -0
drivers/bnxt.c renamed from bnxt.c +0 -0
drivers/cmis.c renamed from cmis.c +0 -0
drivers/cmis.h renamed from cmis.h +0 -0
drivers/cpsw.c renamed from cpsw.c +0 -0
drivers/de2104x.c renamed from de2104x.c +0 -0
drivers/dsa.c renamed from dsa.c +0 -0
drivers/e100.c renamed from e100.c +0 -0
drivers/e1000.c renamed from e1000.c +0 -0
drivers/et131x.c renamed from et131x.c +0 -0
drivers/fec.c renamed from fec.c +0 -0
drivers/fec_8xx.c renamed from fec_8xx.c +0 -0
drivers/fjes.c renamed from fjes.c +0 -0
drivers/fsl_enetc.c renamed from fsl_enetc.c +0 -0
drivers/hns3.c renamed from hns3.c +0 -0
drivers/ibm_emac.c renamed from ibm_emac.c +0 -0
drivers/igb.c renamed from igb.c +0 -0
drivers/igc.c renamed from igc.c +0 -0
drivers/ixgb.c renamed from ixgb.c +0 -0
drivers/ixgbe.c renamed from ixgbe.c +0 -0
drivers/ixgbevf.c renamed from ixgbevf.c +0 -0
drivers/lan743x.c renamed from lan743x.c +0 -0
drivers/lan78xx.c renamed from lan78xx.c +0 -0
drivers/marvell.c renamed from marvell.c +0 -0
drivers/natsemi.c renamed from natsemi.c +0 -0
drivers/pcnet32.c renamed from pcnet32.c +0 -0
drivers/qsfp.c renamed from qsfp.c +0 -0
drivers/qsfp.h renamed from qsfp.h +0 -0
drivers/realtek.c renamed from realtek.c +0 -0
drivers/sfc.c renamed from sfc.c +0 -0
drivers/sff-common.c renamed from sff-common.c +0 -0
drivers/sff-common.h renamed from sff-common.h +0 -0
drivers/sfpdiag.c renamed from sfpdiag.c +0 -0
drivers/sfpid.c renamed from sfpid.c +0 -0
drivers/smsc911x.c renamed from smsc911x.c +0 -0
drivers/stmmac.c renamed from stmmac.c +0 -0
drivers/tg3.c renamed from tg3.c +0 -0
drivers/tse.c renamed from tse.c +0 -0
drivers/vioc.c renamed from vioc.c +0 -0
drivers/vmxnet3.c renamed from vmxnet3.c +0 -0
netlink/module-eeprom.c +3 -3
@@ -9,9 +9,9 @@#include <stdio.h> #include <stddef.h> -#include "../sff-common.h" -#include "../qsfp.h" -#include "../cmis.h" +#include "../drivers/sff-common.h" +#include "../drivers/qsfp.h" +#include "../drivers/cmis.h" #include "../internal.h" #include "../common.h" #include "../list.h"
Signature · 1 line
2.30.2
Quoted 2 lines · Denis Kirjanov
the patch moves the driver specific code in drivers directory
It is normal for the commit message to give the answer to the question "Why?".
Also, what is your definition of a driver? I would not really call the sfp parts drivers.
Andrew
Quoted 6 lines · Andrew Lunn
Quoted 2 lines · Denis Kirjanov
the patch moves the driver specific code in drivers directory
It is normal for the commit message to give the answer to the question "Why?".
"For better code organization the patch moves the driver-specific code into drivers directory"
Quoted 3 lines
Also, what is your definition of a driver? I would not really call the sfp parts drivers.
Sure, I'll put them back in the next version
Quoted 3 lines
Andrew
Quoted 11 lines · Denis Kirjanov
Quoted 6 lines · Andrew Lunn
Quoted 2 lines · Denis Kirjanov
the patch moves the driver specific code in drivers directory
It is normal for the commit message to give the answer to the question "Why?".
"For better code organization the patch moves the driver-specific code into drivers directory"
Is that enough justify the code churn? Are you about to add a lot more driver code?
Quoted 4 lines
Quoted 2 lines
Also, what is your definition of a driver? I would not really call the sfp parts drivers.
Sure, I'll put them back in the next version
It is i while since i looked at the insides of ethtool. But if i remember correctly, the 'drivers' are there to pretty print values returned by ethtool --register-dump. SFP was just an example, i suspect there are other files which you moved which are not used by register-dump as drivers. Hence my question, what is your definition of driver?
Andrew
Quoted 20 lines · Andrew Lunn
Quoted 11 lines · Denis Kirjanov
Quoted 6 lines · Andrew Lunn
Quoted 2 lines · Denis Kirjanov
the patch moves the driver specific code in drivers directory
It is normal for the commit message to give the answer to the question "Why?".
"For better code organization the patch moves the driver-specific code into drivers directory"
Is that enough justify the code churn? Are you about to add a lot more driver code?
Quoted 3 lines
Quoted 2 lines
Also, what is your definition of a driver? I would not really call the sfp parts drivers.
Quoted 8 lines
Quoted 1 line
Sure, I'll put them back in the next version
It is i while since i looked at the insides of ethtool. But if i remember correctly, the 'drivers' are there to pretty print values returned by ethtool --register-dump. SFP was just an example, i suspect there are other files which you moved which are not used by register-dump as drivers. Hence my question, what is your definition of driver?
Right, the code is used for dumping registers.
Actually ethtool already calls it driver_list:
#ifdef ETHTOOL_ENABLE_PRETTY_DUMP
static const struct {
const char *name;
int (*func)(struct ethtool_drvinfo *info, struct ethtool_regs *regs);} driver_list[]
....
Quoted 2 lines
Andrew