summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp/agp_amd.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2009-06-11 17:06:07 +0000
committeravg <avg@FreeBSD.org>2009-06-11 17:06:07 +0000
commit33c80de118e2575a0feda8b5d5560e1e01d06a84 (patch)
tree0b750c6ce593cf15425e104eec338803366e2d97 /sys/dev/agp/agp_amd.c
parentfb53877c40785622630ba3c164b143f542bbe47c (diff)
downloadFreeBSD-src-33c80de118e2575a0feda8b5d5560e1e01d06a84.zip
FreeBSD-src-33c80de118e2575a0feda8b5d5560e1e01d06a84.tar.gz
strict kobj signatures: fixes in agp driver
offset parameter has vm_offset_t type in calling code and in kobj method Reviewed by: imp, rnoland, lulf, current@ Approved by: jhb (mentor)
Diffstat (limited to 'sys/dev/agp/agp_amd.c')
-rw-r--r--sys/dev/agp/agp_amd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/dev/agp/agp_amd.c b/sys/dev/agp/agp_amd.c
index e0cb679..fabb9b1 100644
--- a/sys/dev/agp/agp_amd.c
+++ b/sys/dev/agp/agp_amd.c
@@ -342,11 +342,11 @@ agp_amd_set_aperture(device_t dev, u_int32_t aperture)
}
static int
-agp_amd_bind_page(device_t dev, int offset, vm_offset_t physical)
+agp_amd_bind_page(device_t dev, vm_offset_t offset, vm_offset_t physical)
{
struct agp_amd_softc *sc = device_get_softc(dev);
- if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
+ if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
return EINVAL;
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = physical | 1;
@@ -357,11 +357,11 @@ agp_amd_bind_page(device_t dev, int offset, vm_offset_t physical)
}
static int
-agp_amd_unbind_page(device_t dev, int offset)
+agp_amd_unbind_page(device_t dev, vm_offset_t offset)
{
struct agp_amd_softc *sc = device_get_softc(dev);
- if (offset < 0 || offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
+ if (offset >= (sc->gatt->ag_entries << AGP_PAGE_SHIFT))
return EINVAL;
sc->gatt->ag_virtual[offset >> AGP_PAGE_SHIFT] = 0;
OpenPOWER on IntegriCloud