[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1360440561.1350.27.camel@x61.thuisdomein>
Date: Sat, 09 Feb 2013 21:09:21 +0100
From: Paul Bolle <pebolle@...cali.nl>
To: Adaptec OEM Raid Solutions <aacraid@...ptec.com>,
"James E.J. Bottomley" <JBottomley@...allels.com>
Cc: linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] [SCSI] aacraid: silence two GCC warnings
Compiling src.o for a 32 bit system triggers two GCC warnings:
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]
Silence these warnings by casting the 'address' variable (of type
dma_addr_t) to u64 on those two lines.
Signed-off-by: Paul Bolle <pebolle@...cali.nl>
---
0) Compile tested only.
1) Changing '0L' to 'OUL' might be a bit of cargo cult programming. I
doubt it's necessary. Members of that cult might also change
'0xffffffff' to '0xffffffffUL', but I didn't.
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..dfa8a37 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) != 0UL);
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) & 0xffffffff);
src_writel(dev, MUnit.IQ_L, address & 0xffffffff);
return 0;
--
1.8.1.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists