Commit 7c5d6238 authored by Jens Axboe's avatar Jens Axboe

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: default avatarJens Axboe <axboe@kernel.dk>
parent 4b9e8845
...@@ -2439,7 +2439,7 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd, ...@@ -2439,7 +2439,7 @@ static int mtip_hw_ioctl(struct driver_data *dd, unsigned int cmd,
* return value * return value
* None * None
*/ */
static void mtip_hw_submit_io(struct driver_data *dd, sector_t start, static void mtip_hw_submit_io(struct driver_data *dd, sector_t sector,
int nsect, int nents, int tag, void *callback, int nsect, int nents, int tag, void *callback,
void *data, int dir) void *data, int dir)
{ {
...@@ -2447,6 +2447,7 @@ static void mtip_hw_submit_io(struct driver_data *dd, sector_t start, ...@@ -2447,6 +2447,7 @@ static void mtip_hw_submit_io(struct driver_data *dd, sector_t start,
struct mtip_port *port = dd->port; struct mtip_port *port = dd->port;
struct mtip_cmd *command = &port->commands[tag]; struct mtip_cmd *command = &port->commands[tag];
int dma_dir = (dir == READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE; int dma_dir = (dir == READ) ? DMA_FROM_DEVICE : DMA_TO_DEVICE;
u64 start = sector;
/* Map the scatter list for DMA access */ /* Map the scatter list for DMA access */
nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir); nents = dma_map_sg(&dd->pdev->dev, command->sg, nents, dma_dir);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment