summaryrefslogtreecommitdiffstats
path: root/sys/sparc64
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2004-08-15 21:37:52 +0000
committermarius <marius@FreeBSD.org>2004-08-15 21:37:52 +0000
commit98632f045699d138b6e9a4d385dd734feef3ce52 (patch)
treeaa4c20e6be637866aa0f89406439a2fbf99e45f2 /sys/sparc64
parentd463e5d529baf19fa1ea3fbd64d6d61ddd6f0338 (diff)
downloadFreeBSD-src-98632f045699d138b6e9a4d385dd734feef3ce52.zip
FreeBSD-src-98632f045699d138b6e9a4d385dd734feef3ce52.tar.gz
Correct some uses of the wrong members of the *min()/*max()-familiy, e.g.
min() on unsigned long. None of these are believed to have been fatal though. Reviewed by: tmm
Diffstat (limited to 'sys/sparc64')
-rw-r--r--sys/sparc64/pci/ofw_pcibus.c4
-rw-r--r--sys/sparc64/sparc64/mem.c4
-rw-r--r--sys/sparc64/sparc64/uio_machdep.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/sys/sparc64/pci/ofw_pcibus.c b/sys/sparc64/pci/ofw_pcibus.c
index 85369d1..c4cf9e5 100644
--- a/sys/sparc64/pci/ofw_pcibus.c
+++ b/sys/sparc64/pci/ofw_pcibus.c
@@ -179,7 +179,7 @@ ofw_pcibus_setup_device(device_t bridge, u_int busno, u_int slot, u_int func)
PCIR_LATTIMER, 1), lat);
#endif /* OFW_PCI_DEBUG */
PCIB_WRITE_CONFIG(bridge, busno, slot, func,
- PCIR_LATTIMER, imin(lat, 255), 1);
+ PCIR_LATTIMER, min(lat, 255), 1);
}
/*
@@ -187,7 +187,7 @@ ofw_pcibus_setup_device(device_t bridge, u_int busno, u_int slot, u_int func)
* The role of the streaming cache is unclear in write invalidate
* transfers, so it is made sure that it's line size is always reached.
*/
- clnsz = imax(cache.ec_linesize, STRBUF_LINESZ);
+ clnsz = max(cache.ec_linesize, STRBUF_LINESZ);
KASSERT((clnsz / STRBUF_LINESZ) * STRBUF_LINESZ == clnsz &&
(clnsz / cache.ec_linesize) * cache.ec_linesize == clnsz &&
(clnsz / 4) * 4 == clnsz, ("bogus cache line size %d", clnsz));
diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c
index 66bbea9..5960fe8 100644
--- a/sys/sparc64/sparc64/mem.c
+++ b/sys/sparc64/sparc64/mem.c
@@ -121,8 +121,8 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
off = uio->uio_offset & PAGE_MASK;
cnt = PAGE_SIZE - ((vm_offset_t)iov->iov_base &
PAGE_MASK);
- cnt = min(cnt, PAGE_SIZE - off);
- cnt = min(cnt, iov->iov_len);
+ cnt = ulmin(cnt, PAGE_SIZE - off);
+ cnt = ulmin(cnt, iov->iov_len);
m = NULL;
for (i = 0; phys_avail[i] != 0; i += 2) {
diff --git a/sys/sparc64/sparc64/uio_machdep.c b/sys/sparc64/sparc64/uio_machdep.c
index c9e3b6c..2999ade 100644
--- a/sys/sparc64/sparc64/uio_machdep.c
+++ b/sys/sparc64/sparc64/uio_machdep.c
@@ -89,7 +89,7 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio)
if (cnt > n)
cnt = n;
page_offset = offset & PAGE_MASK;
- cnt = min(cnt, PAGE_SIZE - page_offset);
+ cnt = ulmin(cnt, PAGE_SIZE - page_offset);
m = ma[offset >> PAGE_SHIFT];
pa = VM_PAGE_TO_PHYS(m);
if (m->md.color != DCACHE_COLOR(pa)) {
OpenPOWER on IntegriCloud