PCI: Remove pci_enable_device_io()
cover PCI: Remove pci_enable_device_io()
The call to pci_enable_device_io() in cs5520 isn't needed and can be removed. This was the last user, so the function itself can be removed afterwards.
I'd propose to apply the series through the PCI tree.
Heiner Kallweit (2):
ata: pata_cs5520: Remove not needed call to pci_enable_device_io
PCI: Remove pci_enable_device_io()
drivers/ata/pata_cs5520.c | 6 ------ drivers/pci/pci.c | 14 -------------- include/linux/pci.h | 1 - 3 files changed, 21 deletions(-)
Signature · 1 line
2.44.0
PATCH 1/2 ata: pata_cs5520: Remove not needed call to pci_enable_device_io
A few lines earlier pcim_enable_device() is called, which includes the functionality of pci_enable_device_io(). Therefore we can safely remove the call to pci_enable_device_io().
--- drivers/ata/pata_cs5520.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/ata/pata_cs5520.c +0 -6
@@ -151,12 +151,6 @@ static int cs5520_init_one(struct pci_dev *pdev, const struct pci_device_id *id)if (!host)return -ENOMEM ; -/* Perform set up for DMA */ -if (pci_enable_device_io (pdev)) { -dev_err (&pdev->dev,"unable to configure BAR2.\n" ); -return -ENODEV ; - } -if (dma_set_mask_and_coherent (&pdev->dev,DMA_BIT_MASK (32 ))) {dev_err (&pdev->dev,"unable to configure DMA mask.\n" );return -ENODEV ;
Signature · 1 line
2.44.0
Re: [PATCH 1/2] ata: pata_cs5520: Remove not needed call to pci_enable_device_io
Hello!
Quoted 5 lines · Heiner Kallweit
A few lines earlier
pcim_enable_device()is called, which includes the functionality ofpci_enable_device_io(). Therefore we can safely remove the call topci_enable_device_io().Signed-off-by Heiner Kallweit <[email protected]>
[...]
MBR, Sergey
Re: [PATCH 1/2] ata: pata_cs5520: Remove not needed call to pci_enable_device_io
In reply to Heiner KallweitQuoted 5 lines · Heiner Kallweit
A few lines earlier
pcim_enable_device()is called, which includes the functionality ofpci_enable_device_io(). Therefore we can safely remove the call topci_enable_device_io().Signed-off-by Heiner Kallweit <[email protected]>
Looks OK to me.
Signature · 2 lines
Damien Le Moal Western Digital Research
PATCH 2/2 PCI: Remove pci_enable_device_io()
In reply to Heiner KallweitAfter the last user was removed, remove this PCI core function. It's very unlikely that we'll see a new device requiring io space access, even though memory space access is supported.
--- drivers/pci/pci.c | 14 -------------- include/linux/pci.h | 1 - 2 files changed, 15 deletions(-)
drivers/pci/pci.c +0 -14
@@ -2110,20 +2110,6 @@ static int pci_enable_device_flags(struct pci_dev *dev, unsigned long flags)return err; } -/** -* pci_enable_device_io - Initialize a device for use with IO space -* @dev: PCI device to be initialized -* -* Initialize device before it's used by a driver. Ask low-level code -* to enable I/O resources. Wake up the device if it was suspended. -* Beware, this function can fail. -*/ -int pci_enable_device_io (struct pci_dev *dev) -{ -return pci_enable_device_flags (dev,IORESOURCE_IO ); -} -EXPORT_SYMBOL (pci_enable_device_io); -/** * pci_enable_device_mem - Initialize a device for use with Memory space * @dev: PCI device to be initialized
include/linux/pci.h +0 -1
@@ -1315,7 +1315,6 @@ int pci_user_write_config_word(struct pci_dev *dev, int where, u16 val);int pci_user_write_config_dword (struct pci_dev *dev,int where,u32 val);int __must_check pci_enable_device (struct pci_dev *dev); -int __must_check pci_enable_device_io (struct pci_dev *dev);int __must_check pci_enable_device_mem (struct pci_dev *dev);int __must_check pci_reenable_device (struct pci_dev *);int __must_check pcim_enable_device (struct pci_dev *pdev);
Signature · 1 line
2.44.0
Quoted 5 lines · Heiner Kallweit
After the last user was removed, remove this PCI core function. It's very unlikely that we'll see a new device requiring io space access, even though memory space access is supported.
Signed-off-by Heiner Kallweit <[email protected]>
Looks OK to me.
Signature · 2 lines
Damien Le Moal Western Digital Research
Bjorn Helgaas
AppliedQuoted 6 lines · Heiner Kallweit
The call to
pci_enable_device_io()in cs5520 isn't needed and can be removed. This was the last user, so the function itself can be removed afterwards.I'd propose to apply the series through the PCI tree.
Quoted 8 lines
Heiner Kallweit (2):
ata:pata_cs5520: Remove not needed call topci_enable_device_io
PCI: Removepci_enable_device_io()drivers/ata/pata_cs5520.c | 6 ------ drivers/pci/pci.c | 14 -------------- include/linux/pci.h | 1 - 3 files changed, 21 deletions(-)
Applied to pci/enumeration with acks/reviewed-by from Damien and Sergey, thank you!