Skip to content

Commit

Permalink
[SCSI] aacraid: suppress two GCC warnings
Browse files Browse the repository at this point in the history
Building 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]

These warnings are caused by a right shift of 32. Use upper_32_bits() to
suppress them.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Cc: Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
Paul Bolle authored and James Bottomley committed Feb 24, 2013
1 parent bcc48ff commit 98f99a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/scsi/aacraid/src.c
Original file line number Diff line number Diff line change
Expand Up @@ -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(upper_32_bits(address) != 0L);
address |= fibsize;
} else {
/* Calculate the amount to the fibsize bits */
Expand All @@ -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, upper_32_bits(address) & 0xffffffff);
src_writel(dev, MUnit.IQ_L, address & 0xffffffff);

return 0;
Expand Down

0 comments on commit 98f99a8

Please sign in to comment.