On Jun 20, 2012, at 1:02 PM, James Bottomley wrote:
> On Wed, 2012-06-20 at 12:52 -0500, Ben Collins wrote:
>> On Jun 20, 2012, at 12:44 PM, Ben Collins wrote:
>>
>>> On Jun 20, 2012, at 12:12 PM, wfg@xxxxxxxxxxxxxxx wrote:
>>>
>>>> Hi Ben,
>>>>
>>>> There are new compile warnings show up in
>>>>
>>>> tree: git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git pending
>>>> head: e766db42f45c7685fce5c0d48ba74eaa97e6d715
>>>> commit: e766db42f45c7685fce5c0d48ba74eaa97e6d715 [3/3] [SCSI] aacraid: Fix endian issues in core and SRC portions of driver
>>>>
>>>> All warnings:
>>>>
>>>> drivers/scsi/aacraid/src.c: In function 'aac_src_deliver_message':
>>>> drivers/scsi/aacraid/src.c:425:2: warning: right shift count >= width of type [enabled by default]
>>>
>>> Hrmm, pretty innocuous, but I guess it could be rewritten as:
>>>
>>> #if BITS_PER_LONG > 32
>>> src_writel(dev, MUnit.IQ_H, (address >> 32) & 0xffffffff);
>>> #else
>>> src_writel(dev, MUnit.IQ_H, 0);
>>> #endif
>>
>> Actually, this is wrong too, since it's a dma_addr_t, not an unsigned long, so:
>>
>> #ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
>> src_writel(dev, MUnit.IQ_H, (address >> 32) & 0xffffffff);
>> #else
>> src_writel(dev, MUnit.IQ_H, 0);
>> #endif
>
> Heh, three strikes and you're out. To forestall this, the actual answer
> is
>
> src_writel(dev, MUnit.IQ_H, upper_32_bits(address));
Saved by the misfortune of others it appears. Then I guess changing the next line to lower_32_bits() would be in order as well.
--
Bluecherry: http://www.bluecherrydvr.com/
SwissDisk : http://www.swissdisk.com/
Ubuntu : http://www.ubuntu.com/
My Blog : http://ben-collins.blogspot.com/
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI Target Devel]
[Linux SCSI Target Infrastructure]
[Kernel Newbies]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photos]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Linux IIO]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]