Message ID | 20190621163921.26188-4-puranjay12@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Delegated to: | Bjorn Helgaas |
Headers | show |
Series | net: ethernet: atheros: atlx: Use PCI generic definitions instead of private duplicates | expand |
On Fri, Jun 21, 2019 at 11:40 AM Puranjay Mohan <puranjay12@gmail.com> wrote: > > Remove unused private PCI definitions from skfbi.h because generic PCI > symbols are already included from pci_regs.h. > > Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> > --- > drivers/net/ethernet/atheros/atlx/atl2.h | 2 -- > drivers/net/ethernet/atheros/atlx/atlx.h | 1 - > 2 files changed, 3 deletions(-) > > diff --git a/drivers/net/ethernet/atheros/atlx/atl2.h b/drivers/net/ethernet/atheros/atlx/atl2.h > index c53b810a831d..1b25d6d747de 100644 > --- a/drivers/net/ethernet/atheros/atlx/atl2.h > +++ b/drivers/net/ethernet/atheros/atlx/atl2.h > @@ -32,7 +32,6 @@ > int ethtool_ioctl(struct ifreq *ifr); > #endif > > -#define PCI_COMMAND_REGISTER PCI_COMMAND > #define CMD_MEM_WRT_INVALIDATE PCI_COMMAND_INVALIDATE > > #define ATL2_WRITE_REG(a, reg, value) (iowrite32((value), \ > @@ -202,7 +201,6 @@ static void atl2_force_ps(struct atl2_hw *hw); > #define MII_DBG_DATA 0x1E > > /* PCI Command Register Bit Definitions */ > -#define PCI_COMMAND 0x04 > #define CMD_IO_SPACE 0x0001 > #define CMD_MEMORY_SPACE 0x0002 > #define CMD_BUS_MASTER 0x0004 These bit definitions (CMD_IO_SPACE, CMD_MEMORY_SPACE, etc) are also generic PCI things that should be replaced with PCI_COMMAND_IO, PCI_COMMAND_MEMORY, etc. I haven't looked at the file, but there are likely more.
From: Puranjay Mohan <puranjay12@gmail.com> Date: Fri, 21 Jun 2019 22:09:21 +0530 > Remove unused private PCI definitions from skfbi.h because generic PCI > symbols are already included from pci_regs.h. > > Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> Please also handle the PCI register bit value define duplications as well, as pointed out by Bjorn. Thanks.
diff --git a/drivers/net/ethernet/atheros/atlx/atl2.h b/drivers/net/ethernet/atheros/atlx/atl2.h index c53b810a831d..1b25d6d747de 100644 --- a/drivers/net/ethernet/atheros/atlx/atl2.h +++ b/drivers/net/ethernet/atheros/atlx/atl2.h @@ -32,7 +32,6 @@ int ethtool_ioctl(struct ifreq *ifr); #endif -#define PCI_COMMAND_REGISTER PCI_COMMAND #define CMD_MEM_WRT_INVALIDATE PCI_COMMAND_INVALIDATE #define ATL2_WRITE_REG(a, reg, value) (iowrite32((value), \ @@ -202,7 +201,6 @@ static void atl2_force_ps(struct atl2_hw *hw); #define MII_DBG_DATA 0x1E /* PCI Command Register Bit Definitions */ -#define PCI_COMMAND 0x04 #define CMD_IO_SPACE 0x0001 #define CMD_MEMORY_SPACE 0x0002 #define CMD_BUS_MASTER 0x0004 diff --git a/drivers/net/ethernet/atheros/atlx/atlx.h b/drivers/net/ethernet/atheros/atlx/atlx.h index 09464cb02ce0..4d355dbc2d01 100644 --- a/drivers/net/ethernet/atheros/atlx/atlx.h +++ b/drivers/net/ethernet/atheros/atlx/atlx.h @@ -445,7 +445,6 @@ #define MII_DBG_DATA 0x1E /* PCI Command Register Bit Definitions */ -#define PCI_COMMAND 0x04 /* PCI Command Register */ #define CMD_IO_SPACE 0x0001 #define CMD_MEMORY_SPACE 0x0002 #define CMD_BUS_MASTER 0x0004
Remove unused private PCI definitions from skfbi.h because generic PCI symbols are already included from pci_regs.h. Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> --- drivers/net/ethernet/atheros/atlx/atl2.h | 2 -- drivers/net/ethernet/atheros/atlx/atlx.h | 1 - 2 files changed, 3 deletions(-)