summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aha1542.c
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2018-11-27 21:41:24 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2018-12-07 22:16:00 -0500
commit492ca4da6f0798cf20ecaf330abc8d79e540a43a (patch)
treeff5e588e22a11098e3d58f9722fe02165c20fc31 /drivers/scsi/aha1542.c
parent7171455354eb2ed494ddb6fe50988e98bb5cfa96 (diff)
downloadlinux-492ca4da6f0798cf20ecaf330abc8d79e540a43a.tar.gz
linux-492ca4da6f0798cf20ecaf330abc8d79e540a43a.tar.bz2
linux-492ca4da6f0798cf20ecaf330abc8d79e540a43a.zip
scsi: aha1542: Fix zeroday __udivdi3 warning
dma_addr_t can be u64 on pae systems but isa_virt_to_bus only ever returns unsigned long (because an ISA physical address can only be 24 bits). Cast to unsigned long to avoid division. Fixes: 1794ef2b150d ("scsi: aha1542: convert to DMA mapping API") Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Reviewed-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aha1542.c')
-rw-r--r--drivers/scsi/aha1542.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/aha1542.c b/drivers/scsi/aha1542.c
index a9c29757172f..afb693d7b44f 100644
--- a/drivers/scsi/aha1542.c
+++ b/drivers/scsi/aha1542.c
@@ -325,7 +325,7 @@ static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
return IRQ_HANDLED;
};
- mbo = (scsi2int(mb[mbi].ccbptr) - aha1542->ccb_handle) / sizeof(struct ccb);
+ mbo = (scsi2int(mb[mbi].ccbptr) - (unsigned long)aha1542->ccb_handle) / sizeof(struct ccb);
mbistatus = mb[mbi].status;
mb[mbi].status = 0;
aha1542->aha1542_last_mbi_used = mbi;