From a6c32bcda69ac173bca8bf5063746f99b117342e Mon Sep 17 00:00:00 2001 From: wkoszek Date: Fri, 6 Feb 2009 20:57:10 +0000 Subject: Fix AGP debugging code: - correct format strings - fill opt_agp.h if AGP_DEBUG is defined - bring AGP_DEBUG to LINT by mentioning it in NOTES This should hopefully fix a warning that was... Found by: Coverity Prevent(tm) CID: 3676 Tested on: amd64, i386 --- sys/dev/agp/agp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'sys/dev/agp') diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c index 6d749ef..1e61871 100644 --- a/sys/dev/agp/agp.c +++ b/sys/dev/agp/agp.c @@ -27,6 +27,7 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_agp.h" #include "opt_bus.h" #include @@ -554,7 +555,7 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, */ m = vm_page_grab(mem->am_obj, OFF_TO_IDX(i), VM_ALLOC_WIRED | VM_ALLOC_ZERO | VM_ALLOC_RETRY); - AGP_DPF("found page pa=%#x\n", VM_PAGE_TO_PHYS(m)); + AGP_DPF("found page pa=%#jx\n", (uintmax_t)VM_PAGE_TO_PHYS(m)); } VM_OBJECT_UNLOCK(mem->am_obj); @@ -585,8 +586,8 @@ agp_generic_bind_memory(device_t dev, struct agp_memory *mem, for (j = 0; j < PAGE_SIZE && i + j < mem->am_size; j += AGP_PAGE_SIZE) { vm_offset_t pa = VM_PAGE_TO_PHYS(m) + j; - AGP_DPF("binding offset %#x to pa %#x\n", - offset + i + j, pa); + AGP_DPF("binding offset %#jx to pa %#jx\n", + (uintmax_t)offset + i + j, (uintmax_t)pa); error = AGP_BIND_PAGE(dev, offset + i + j, pa); if (error) { /* -- cgit v1.1