[PATCH] [SCSI] aacraid: Fix invalid bit shifts of DMA address

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

 



Commit b5f1758f221e ('[SCSI] aacraid: Fix endian issues in core and
SRC portions of driver') changed the type of the address variable in
aac_src_deliver_message() from u64 to dma_addr_t.  In configurations
with 32-bit dma_addr_t, this results in:

drivers/scsi/aacraid/src.c: In function 'aac_src_deliver_message':
drivers/scsi/aacraid/src.c:410:3: warning: right shift count >= width of type [enabled by default]
drivers/scsi/aacraid/src.c:434:2: warning: right shift count >= width of type [enabled by default]

Signed-off-by: Ben Hutchings <ben@xxxxxxxxxxxxxxx>
Cc: stable <stable@xxxxxxxxxxxxxxx> # v3.6+
---
This is compile-tested only.

Ben.

 drivers/scsi/aacraid/src.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index 3b021ec..129b984 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -407,7 +407,7 @@ static int aac_src_deliver_message(struct fib *fib)
 		fib->hw_fib_va->header.StructType = FIB_MAGIC2;
 		fib->hw_fib_va->header.SenderFibAddress = (u32)address;
 		fib->hw_fib_va->header.u.TimeStamp = 0;
-		BUG_ON((u32)(address >> 32) != 0L);
+		BUG_ON((u64)address >> 32);
 		address |= fibsize;
 	} else {
 		/* Calculate the amount to the fibsize bits */
@@ -431,7 +431,7 @@ static int aac_src_deliver_message(struct fib *fib)
 		address |= fibsize;
 	}
 
-	src_writel(dev, MUnit.IQ_H, (address >> 32) & 0xffffffff);
+	src_writel(dev, MUnit.IQ_H, (u64)address >> 32);
 	src_writel(dev, MUnit.IQ_L, address & 0xffffffff);
 
 	return 0;

Attachment: signature.asc
Description: This is a digitally signed message part


[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