In a number of drivers the PCI memory pointers were declared simply as
void *.
This caused sparse to emit the following warning, for example:
agilent_82350b/agilent_82350b.c:44:58: warning: incorrect type in argument 2 (different address spaces)
agilent_82350b/agilent_82350b.c:44:58: expected void volatile [noderef] __iomem *addr
Declare the PCI memory pointers as void __iomem *addr.
Signed-off-by: Dave Penkler <dpenkler@gmail.com>
Link: https://lore.kernel.org/r/20250114165403.16410-2-dpenkler@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (a_priv->gpib_base) {
tms9914_board_reset(tms_priv);
if (a_priv->misc_base)
- iounmap((void *)a_priv->misc_base);
+ iounmap(a_priv->misc_base);
if (a_priv->borg_base)
- iounmap((void *)a_priv->borg_base);
+ iounmap(a_priv->borg_base);
if (a_priv->sram_base)
- iounmap((void *)a_priv->sram_base);
+ iounmap(a_priv->sram_base);
if (a_priv->gpib_base)
- iounmap((void *)a_priv->gpib_base);
+ iounmap(a_priv->gpib_base);
if (a_priv->plx_base)
- iounmap((void *)a_priv->plx_base);
+ iounmap(a_priv->plx_base);
pci_release_regions(a_priv->pci_device);
}
if (a_priv->pci_device)
struct agilent_82350b_priv {
struct tms9914_priv tms9914_priv;
struct pci_dev *pci_device;
- void *plx_base; //82350a only
- void *gpib_base;
- void *sram_base;
- void *misc_base;
- void *borg_base;
+ void __iomem *plx_base; //82350a only
+ void __iomem *gpib_base;
+ void __iomem *sram_base;
+ void __iomem *misc_base;
+ void __iomem *borg_base;
int irq;
unsigned short card_mode_bits;
unsigned short event_status_bits;
struct dma_chan *dma_channel;
u8 *dma_buffer;
int dma_buffer_size;
- void *write_transfer_counter;
+ void __iomem *write_transfer_counter;
};
// cb7210 specific registers and bits
u8 *dma_buffer;
int dma_buffer_size;
int dma_burst_length;
- void *fifo_base;
+ void __iomem *fifo_base;
unsigned supports_fifo_interrupts : 1;
};
{
struct local_info *dev;
int retval;
- void *virt;
+ void __iomem *virt;
dev = link->priv;
DEBUG(0, "%s(0x%p)\n", __func__, link);
}
virt = ioremap(link->resource[2]->start, resource_size(link->resource[2]));
writeb((link->resource[2]->start >> 2) & 0xff, virt + 0xf0); // IOWindow base
- iounmap((void *)virt);
+ iounmap(virt);
/*
* This actually configures the PCMCIA socket -- setting up
/* readb/writeb wrappers */
static inline unsigned short tnt_readb(struct tnt4882_priv *priv, unsigned long offset)
{
- void *address = priv->nec7210_priv.mmiobase + offset;
+ void __iomem *address = priv->nec7210_priv.mmiobase + offset;
unsigned long flags;
unsigned short retval;
spinlock_t *register_lock = &priv->nec7210_priv.register_page_lock;
static inline void tnt_writeb(struct tnt4882_priv *priv, unsigned short value, unsigned long offset)
{
- void *address = priv->nec7210_priv.mmiobase + offset;
+ void __iomem *address = priv->nec7210_priv.mmiobase + offset;
unsigned long flags;
spinlock_t *register_lock = &priv->nec7210_priv.register_page_lock;