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

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

 



Hi Finn,

Am 07.04.2018 um 12:59 schrieb Finn Thain:
> On Sat, 7 Apr 2018, Michael Schmitz wrote:
> 
>> Changes since v5:
>>
>> Christoph Hellwig:
>>
>> - fix comment style
>> - drop initialization to zero in driver data init
>> - fix alignment in struct declarations
>> - drop braces around asm macros
>> - change board_base type to void __iomem *
>> - drop unneeded void __iomem * cast from ZTWO_VADDR() use
>> - add comment to explain why ZTWO_VADDR() use is safe
>> - move board specific functions to per-board esp_ops
>>
> 
> The sparse warnings have changed to this:
> 
>   CHECK   /home/fthain/src/kernel.org/linux/drivers/scsi/zorro_esp.c
> drivers/scsi/zorro_esp.c:274:14: warning: cast removes address space of expression
> drivers/scsi/zorro_esp.c:712:14: warning: cast removes address space of expression
> 
> Why not just call writel() and get rid of the 't' temporary pointer?

As far as I can see, that will invoke cpu_to_le32() on the data written.
Geert?

Rewriting line this

*((__force unsigned long *)zep->board_base) = 0;

and this

*(__force unsigned long *)((addr & 0x00ffffff) + zep->board_base) = addr;

does suppress the warning and omits the temp pointer. But is that any
better?

Cheers,

	Michael





[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