Re: [PATCH v5] scsi: new zorro_esp.c for Amiga Zorro NCR53C9x boards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 3 Apr 2018, Christoph Hellwig wrote:

> 
> > +
> > +	if (zep->zorro3) {
> > +		/* Only Fastlane Z3 for now - add switch for correct struct
> > +		 * dma_registers size if adding any more
> > +		 */
> > +		esp->dma_regs = ioremap_nocache(dmaaddr,
> > +				sizeof(struct fastlane_dma_registers));
> > +	} else
> > +		esp->dma_regs = (void __iomem *)ZTWO_VADDR(dmaaddr);
> 
> doesn't this need a __force (and a comment on why it is safe) to make
> sparse happy?
> 

Sparse is happy with that cast. These are the warnings I get:

  CHECK   /home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:976:33: warning: incorrect type in assignment (different address spaces)
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:976:33:    expected unsigned long *board_base
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:976:33:    got void [noderef] <asn:2>*
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:1068:28: warning: incorrect type in argument 1 (different address spaces)
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:1068:28:    expected void [noderef] <asn:2>*addr
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:1068:28:    got unsigned long *board_base
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:1096:28: warning: incorrect type in argument 1 (different address spaces)
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:1096:28:    expected void [noderef] <asn:2>*addr
/home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c:1096:28:    got unsigned long *board_base

which seems to indicate that board_base should have type void __iomem *.

-- 



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux