mirror of
https://github.com/torvalds/linux.git
synced 2026-05-23 22:52:19 +02:00
staging: gpib: Use __iomem attribute for io addresses
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>
This commit is contained in:
parent
d43f18d947
commit
77b41a9342
|
|
@ -808,15 +808,15 @@ void agilent_82350b_detach(gpib_board_t *board)
|
|||
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)
|
||||
|
|
|
|||
|
|
@ -45,11 +45,11 @@ enum board_model {
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ struct fluke_priv {
|
|||
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
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ struct fmh_priv {
|
|||
u8 *dma_buffer;
|
||||
int dma_buffer_size;
|
||||
int dma_burst_length;
|
||||
void *fifo_base;
|
||||
void __iomem *fifo_base;
|
||||
unsigned supports_fifo_interrupts : 1;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1122,7 +1122,7 @@ static int ines_gpib_config(struct pcmcia_device *link)
|
|||
{
|
||||
struct local_info *dev;
|
||||
int retval;
|
||||
void *virt;
|
||||
void __iomem *virt;
|
||||
|
||||
dev = link->priv;
|
||||
DEBUG(0, "%s(0x%p)\n", __func__, link);
|
||||
|
|
@ -1156,7 +1156,7 @@ static int ines_gpib_config(struct pcmcia_device *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
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ static inline void tnt_paged_writeb(struct tnt4882_priv *priv, unsigned int valu
|
|||
/* 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;
|
||||
|
|
@ -154,7 +154,7 @@ static inline unsigned short tnt_readb(struct tnt4882_priv *priv, unsigned long
|
|||
|
||||
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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user