diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2013-07-01 07:18:24 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2013-07-01 07:18:24 +0000 |
commit | 70392592d49bc22595d33802f6546a03973e5b4d (patch) | |
tree | a6eb5e2e8e64bf71290e1272708ad82d348dbcd0 | |
parent | 1fcf290161d78a5f72d81eaa4ef6979c18c72ae0 (diff) |
Remove vaddr_t casts in bktr_mmap().
Pointed out by LLVM.
bktr_os.c:478:22: error: comparison of unsigned expression < 0 is always false
ok krw@ kettenis@
-rw-r--r-- | sys/dev/pci/bktr/bktr_os.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/pci/bktr/bktr_os.c b/sys/dev/pci/bktr/bktr_os.c index 4ddccc7d741..48a3e5ddf74 100644 --- a/sys/dev/pci/bktr/bktr_os.c +++ b/sys/dev/pci/bktr/bktr_os.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_os.c,v 1.30 2009/03/29 21:53:53 sthen Exp $ */ +/* $OpenBSD: bktr_os.c,v 1.31 2013/07/01 07:18:23 brad Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_os.c,v 1.20 2000/10/20 08:16:53 roger Exp $ */ /* @@ -475,14 +475,14 @@ bktr_mmap(dev_t dev, off_t offset, int nprot) bktr = bktr_cd.cd_devs[unit]; - if ((vaddr_t)offset < 0) + if (offset < 0) return(-1); - if ((vaddr_t)offset >= bktr->alloc_pages * PAGE_SIZE) + if (offset >= bktr->alloc_pages * PAGE_SIZE) return(-1); return (bus_dmamem_mmap(bktr->dmat, bktr->dm_mem->dm_segs, 1, - (vaddr_t)offset, nprot, BUS_DMA_WAITOK)); + offset, nprot, BUS_DMA_WAITOK)); } #if NRADIO > 0 |