diff options
author | Jens Axboe <axboe@kernel.dk> | 2012-11-08 01:58:53 -0500 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2012-11-23 08:32:55 -0500 |
commit | 7c5d62388e88729775b10a1748f2810e413f1e51 (patch) | |
tree | 4d4d2cf8252a32f75a0c8b672ad921e161fa4cc1 /drivers/block/mtip32xx | |
parent | 4b9e884523f63f7bfd6fcbcdfe6f9f9545d98c13 (diff) |
mtip32xx: fix shift larger than type warning
If we're building a 32-bit kernel and CONFIG_LBADF isn't set,
sector_t is 32-bits wide. The shifts by 32 and 40 are thus
larger than we support.
Cast the sector offset to a u64 to avoid these warnings.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/block/mtip32xx')
-rw-r--r-- | drivers/block/mtip32xx/mtip32xx.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c index df46b5a3f56f..faa5591b579f 100644 --- a/drivers/block/mtip32xx/mtip32xx.c +++ b/drivers/block/mtip32xx/mtip32xx.c | |||
@@ -2439,7 +2439,7 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd, | |||
2439 | * return value | 2439 | * return value |
2440 | * None | 2440 | * None |
2441 | */ | 2441 | */ |
2442 | static void mtip_hw_submit_io(struct driver_data *dd, sector_t start, | 2442 | static void mtip_hw_submit_io(struct driver_data *dd, sector_t sector, |
2443 | int nsect, int nents, int tag, void *callback, | 2443 | int nsect, int nents, int tag, void *callback, |
2444 | void *data, int dir) | 2444 | void *data, int dir) |
2445 | { | 2445 | { |
@@ -2447,6 +2447,7 @@ static void mtip_hw_submit_io(struct driver_data *dd, sector_t start, | |||
2447 | struct mtip_port *port = dd->port; | 2447 | struct mtip_port *port = dd->port; |
2448 | struct mtip_cmd *command = &port->commands[tag]; | 2448 | struct mtip_cmd *command = &port->commands[tag]; |
2449 | int dma_dir = (dir == READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; | 2449 | int dma_dir = (dir == READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; |
2450 | u64 start = sector; | ||
2450 | 2451 | ||
2451 | /* Map the scatter list for DMA access */ | 2452 | /* Map the scatter list for DMA access */ |
2452 | nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir); | 2453 | nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir); |