[POC][PATCH 33/83] drivers/pci: get rid of pointless casts
From: Al Viro
Date: Mon Dec 21 2015 - 19:06:01 EST
From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
drivers/pci/host/pci-tegra.c | 10 +++++-----
drivers/pci/host/pcie-designware.c | 6 +++---
drivers/pci/host/pcie-designware.h | 2 +-
drivers/pci/host/pcie-rcar.c | 6 +++---
drivers/pci/host/pcie-xilinx.c | 10 +++++-----
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
index 9ad90fd..ba7fc9e 100644
--- a/drivers/pci/host/pci-tegra.c
+++ b/drivers/pci/host/pci-tegra.c
@@ -241,7 +241,7 @@ struct tegra_msi {
struct msi_controller chip;
DECLARE_BITMAP(used, INT_PCI_MSI_NR);
struct irq_domain *domain;
- unsigned long pages;
+ void *pages;
struct mutex lock;
int irq;
};
@@ -1214,7 +1214,7 @@ static int tegra_msi_setup_irq(struct msi_controller *chip,
irq_set_msi_desc(irq, desc);
- msg.address_lo = virt_to_phys((void *)msi->pages);
+ msg.address_lo = virt_to_phys(msi->pages);
/* 32 bit address only */
msg.address_hi = 0;
msg.data = hwirq;
@@ -1296,8 +1296,8 @@ static int tegra_pcie_enable_msi(struct tegra_pcie *pcie)
}
/* setup AFI/FPCI range */
- msi->pages = __get_free_pages(GFP_KERNEL, 0);
- base = virt_to_phys((void *)msi->pages);
+ msi->pages = (void *)__get_free_pages(GFP_KERNEL, 0);
+ base = virt_to_phys(msi->pages);
afi_writel(pcie, base >> soc->msi_base_shift, AFI_MSI_FPCI_BAR_ST);
afi_writel(pcie, base, AFI_MSI_AXI_BAR_ST);
@@ -1347,7 +1347,7 @@ static int tegra_pcie_disable_msi(struct tegra_pcie *pcie)
afi_writel(pcie, 0, AFI_MSI_EN_VEC6);
afi_writel(pcie, 0, AFI_MSI_EN_VEC7);
- free_pages((void *)msi->pages, 0);
+ free_pages(msi->pages, 0);
if (msi->irq > 0)
free_irq(msi->irq, pcie);
diff --git a/drivers/pci/host/pcie-designware.c b/drivers/pci/host/pcie-designware.c
index 02a7452..769fc9d 100644
--- a/drivers/pci/host/pcie-designware.c
+++ b/drivers/pci/host/pcie-designware.c
@@ -206,8 +206,8 @@ void dw_pcie_msi_init(struct pcie_port *pp)
{
u64 msi_target;
- pp->msi_data = __get_free_pages(GFP_KERNEL, 0);
- msi_target = virt_to_phys((void *)pp->msi_data);
+ pp->msi_data = (void *)__get_free_pages(GFP_KERNEL, 0);
+ msi_target = virt_to_phys(pp->msi_data);
/* program the msi_data */
dw_pcie_wr_own_conf(pp, PCIE_MSI_ADDR_LO, 4,
@@ -307,7 +307,7 @@ static void dw_msi_setup_msg(struct pcie_port *pp, unsigned int irq, u32 pos)
if (pp->ops->get_msi_addr)
msi_target = pp->ops->get_msi_addr(pp);
else
- msi_target = virt_to_phys((void *)pp->msi_data);
+ msi_target = virt_to_phys(pp->msi_data);
msg.address_lo = (u32)(msi_target & 0xffffffff);
msg.address_hi = (u32)(msi_target >> 32 & 0xffffffff);
diff --git a/drivers/pci/host/pcie-designware.h b/drivers/pci/host/pcie-designware.h
index 2356d29..c77704b 100644
--- a/drivers/pci/host/pcie-designware.h
+++ b/drivers/pci/host/pcie-designware.h
@@ -47,7 +47,7 @@ struct pcie_port {
struct pcie_host_ops *ops;
int msi_irq;
struct irq_domain *irq_domain;
- unsigned long msi_data;
+ void *msi_data;
DECLARE_BITMAP(msi_irq_in_use, MAX_MSI_IRQS);
};
diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
index f4fa6c5..fdeb72f 100644
--- a/drivers/pci/host/pcie-rcar.c
+++ b/drivers/pci/host/pcie-rcar.c
@@ -114,7 +114,7 @@ struct rcar_msi {
DECLARE_BITMAP(used, INT_PCI_MSI_NR);
struct irq_domain *domain;
struct msi_controller chip;
- unsigned long pages;
+ void *pages;
struct mutex lock;
int irq1;
int irq2;
@@ -734,8 +734,8 @@ static int rcar_pcie_enable_msi(struct rcar_pcie *pcie)
}
/* setup MSI data target */
- msi->pages = __get_free_pages(GFP_KERNEL, 0);
- base = virt_to_phys((void *)msi->pages);
+ msi->pages = (void *)__get_free_pages(GFP_KERNEL, 0);
+ base = virt_to_phys(msi->pages);
rcar_pci_write_reg(pcie, base | MSIFE, PCIEMSIALR);
rcar_pci_write_reg(pcie, 0, PCIEMSIAUR);
diff --git a/drivers/pci/host/pcie-xilinx.c b/drivers/pci/host/pcie-xilinx.c
index a9438d2..3cc679d 100644
--- a/drivers/pci/host/pcie-xilinx.c
+++ b/drivers/pci/host/pcie-xilinx.c
@@ -111,7 +111,7 @@
struct xilinx_pcie_port {
void __iomem *reg_base;
u32 irq;
- unsigned long msi_pages;
+ void *msi_pages;
u8 root_busno;
struct device *dev;
struct irq_domain *irq_domain;
@@ -297,7 +297,7 @@ static int xilinx_pcie_msi_setup_irq(struct msi_controller *chip,
irq_set_msi_desc(irq, desc);
- msg_addr = virt_to_phys((void *)port->msi_pages);
+ msg_addr = virt_to_phys(port->msi_pages);
msg.address_hi = 0;
msg.address_lo = msg_addr;
@@ -353,8 +353,8 @@ static void xilinx_pcie_enable_msi(struct xilinx_pcie_port *port)
{
phys_addr_t msg_addr;
- port->msi_pages = __get_free_pages(GFP_KERNEL, 0);
- msg_addr = virt_to_phys((void *)port->msi_pages);
+ port->msi_pages = (void *)__get_free_pages(GFP_KERNEL, 0);
+ msg_addr = virt_to_phys(port->msi_pages);
pcie_write(port, 0x0, XILINX_PCIE_REG_MSIBASE1);
pcie_write(port, msg_addr, XILINX_PCIE_REG_MSIBASE2);
}
@@ -527,7 +527,7 @@ static void xilinx_pcie_free_irq_domain(struct xilinx_pcie_port *port)
/* Free IRQ Domain */
if (IS_ENABLED(CONFIG_PCI_MSI)) {
- free_pages((void *)port->msi_pages, 0);
+ free_pages(port->msi_pages, 0);
num_irqs = XILINX_NUM_MSI_IRQS;
} else {
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/