]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drivers/scsi/aacraid/src.c: silence two GCC warnings
authorPaul Bolle <pebolle@tiscali.nl>
Wed, 20 Feb 2013 02:13:52 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:15 +0000 (16:52 +1100)
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@tiscali.nl>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/scsi/aacraid/src.c

index 3b021ec63255469aaac381f99cfcb54fb296887d..dfa8a374912d89258517662b629d52deddee6904 100644 (file)
@@ -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;