summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMike Belopuhov <mikeb@cvs.openbsd.org>2015-03-18 12:23:26 +0000
committerMike Belopuhov <mikeb@cvs.openbsd.org>2015-03-18 12:23:26 +0000
commit3255cf434614136f13b51ce22681186ac65b0a3b (patch)
tree13c4aa54f2167bdc9c5bc8ae821cc74d0af54ed0 /sys/dev
parentad24f0544af47d2d396e929fd8052bf0b0f674fa (diff)
Prevent sign extension due to pointer arithmetics
This should make mpii(4) work on i386 again, apparently. Problem identified and a slightly different fix proposed by Christiano F. Haesbaert and Pedro Martelletto of Bitrig. Huge thanks for tracking this down, guys!
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/mpii.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/mpii.c b/sys/dev/pci/mpii.c
index 7d8867f813b..862bfd1361c 100644
--- a/sys/dev/pci/mpii.c
+++ b/sys/dev/pci/mpii.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mpii.c,v 1.100 2015/03/14 03:38:48 jsg Exp $ */
+/* $OpenBSD: mpii.c,v 1.101 2015/03/18 12:23:25 mikeb Exp $ */
/*
* Copyright (c) 2010, 2012 Mike Belopuhov
* Copyright (c) 2009 James Giannoules
@@ -775,7 +775,7 @@ mpii_load_xs(struct mpii_ccb *ccb)
MPII_SGE_FL_SIZE_64 | len);
/* address of the next sge */
mpii_dvatosge(csge, ccb->ccb_cmd_dva +
- (caddr_t)nsge - (caddr_t)io);
+ ((caddr_t)nsge - (caddr_t)io));
}
sge = nsge;