PCI: vmd: Update type of the __iomem pointers
authorKrzysztof Wilczyński <kw@linux.com>
Sun, 29 Nov 2020 23:07:42 +0000 (23:07 +0000)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 10 Dec 2020 20:56:08 +0000 (14:56 -0600)
Use "void __iomem" instead "char __iomem" pointer type when working with
the accessor functions (with names like readb() or writel(), etc.) to
better match a given accessor function signature where commonly the address
pointing to an I/O memory region would be a "void __iomem" pointer.

Related: https://lwn.net/Articles/102232/

Suggested-by: Bjorn Helgaas <bhelgaas@google.com>
Link: https://lore.kernel.org/r/20201129230743.3006978-5-kw@linux.com
Signed-off-by: Krzysztof Wilczyński <kw@linux.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Jon Derrick <jonathan.derrick@intel.com>
drivers/pci/controller/vmd.c

index 1361a79..59fa9a9 100644 (file)
@@ -95,7 +95,7 @@ struct vmd_dev {
        struct pci_dev          *dev;
 
        spinlock_t              cfg_lock;
-       char __iomem            *cfgbar;
+       void __iomem            *cfgbar;
 
        int msix_count;
        struct vmd_irq_list     *irqs;
@@ -326,7 +326,7 @@ static void vmd_remove_irq_domain(struct vmd_dev *vmd)
        }
 }
 
-static char __iomem *vmd_cfg_addr(struct vmd_dev *vmd, struct pci_bus *bus,
+static void __iomem *vmd_cfg_addr(struct vmd_dev *vmd, struct pci_bus *bus,
                                  unsigned int devfn, int reg, int len)
 {
        unsigned int busnr_ecam = bus->number - vmd->busn_start;
@@ -346,7 +346,7 @@ static int vmd_pci_read(struct pci_bus *bus, unsigned int devfn, int reg,
                        int len, u32 *value)
 {
        struct vmd_dev *vmd = vmd_from_bus(bus);
-       char __iomem *addr = vmd_cfg_addr(vmd, bus, devfn, reg, len);
+       void __iomem *addr = vmd_cfg_addr(vmd, bus, devfn, reg, len);
        unsigned long flags;
        int ret = 0;
 
@@ -381,7 +381,7 @@ static int vmd_pci_write(struct pci_bus *bus, unsigned int devfn, int reg,
                         int len, u32 value)
 {
        struct vmd_dev *vmd = vmd_from_bus(bus);
-       char __iomem *addr = vmd_cfg_addr(vmd, bus, devfn, reg, len);
+       void __iomem *addr = vmd_cfg_addr(vmd, bus, devfn, reg, len);
        unsigned long flags;
        int ret = 0;