aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2008-02-06 04:36:54 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:03 -0500
commit582539e5a0480f1e00e3b9ffbe50bd5b2f59a16f (patch)
tree1b5f40ebbf4680fe62aec25a0a27063fda06e690 /drivers
parent5e2cb1018a8a583b83d56c80f46507da6f3f2b57 (diff)
cciss: use upper_32_bits() macro to eliminate warnings
Use upper_32_bits(x) macro to handle shifts that may be >= the width of the data type. drivers/block/cciss.c: In function 'do_cciss_request': drivers/block/cciss.c:2655: warning: right shift count >= width of type drivers/block/cciss.c:2656: warning: right shift count >= width of type drivers/block/cciss.c:2657: warning: right shift count >= width of type drivers/block/cciss.c:2658: warning: right shift count >= width of type Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Cc: <mike.miller@hp.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/block/cciss.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c
index 855ce8e5efba..9715be3f2487 100644
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -2630,12 +2630,14 @@ static void do_cciss_request(struct request_queue *q)
2630 c->Request.CDB[8] = creq->nr_sectors & 0xff; 2630 c->Request.CDB[8] = creq->nr_sectors & 0xff;
2631 c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0; 2631 c->Request.CDB[9] = c->Request.CDB[11] = c->Request.CDB[12] = 0;
2632 } else { 2632 } else {
2633 u32 upper32 = upper_32_bits(start_blk);
2634
2633 c->Request.CDBLen = 16; 2635 c->Request.CDBLen = 16;
2634 c->Request.CDB[1]= 0; 2636 c->Request.CDB[1]= 0;
2635 c->Request.CDB[2]= (start_blk >> 56) & 0xff; //MSB 2637 c->Request.CDB[2]= (upper32 >> 24) & 0xff; //MSB
2636 c->Request.CDB[3]= (start_blk >> 48) & 0xff; 2638 c->Request.CDB[3]= (upper32 >> 16) & 0xff;
2637 c->Request.CDB[4]= (start_blk >> 40) & 0xff; 2639 c->Request.CDB[4]= (upper32 >> 8) & 0xff;
2638 c->Request.CDB[5]= (start_blk >> 32) & 0xff; 2640 c->Request.CDB[5]= upper32 & 0xff;
2639 c->Request.CDB[6]= (start_blk >> 24) & 0xff; 2641 c->Request.CDB[6]= (start_blk >> 24) & 0xff;
2640 c->Request.CDB[7]= (start_blk >> 16) & 0xff; 2642 c->Request.CDB[7]= (start_blk >> 16) & 0xff;
2641 c->Request.CDB[8]= (start_blk >> 8) & 0xff; 2643 c->Request.CDB[8]= (start_blk >> 8) & 0xff;