[DragonFlyBSD - Bug #2737] i386 drm_bufs.c:259:2 '%lx' offset type 'resource_size_t'

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Wed Nov 19 08:38:35 PST 2014


Issue #2737 has been updated by davshao.


	movl	PCPU(CURPCB),%ecx
in sys/platform/pc32/i386/support.s also gives a compilation error building kernel:

sh /usr/src/sys/conf/newvers.sh /usr/src/sys/..
cc -c -O -pipe  -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes  -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual  -Wold-style-definition -Wno-inline  -Wno-pointer-sign -Winit-self -std=c99 -Wno-unused-but-set-variable -g -nostdinc -I. -Iinclude -I/usr/src/sys -I/usr/src/sys/../include -I/usr/obj/usr/src/sys/GENERIC -I"/usr/src/sys/dev/acpica" -I"/usr/src/sys/contrib/dev/acpica/source/include" -I/usr/src/sys/dev/netif/ath/ath_hal -I/usr/src/sys/contrib/dev/ath/ath_hal -I/usr/src/sys/dev/drm/include  -D_KERNEL -include opt_global.h  -Wold-style-declaration  -finline-limit=8000  --param inline-unit-growth=100  --param large-function-growth=1000 -fno-common -ffreestanding -fno-stack-protector -mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -mpreferred-stack-boundary=2 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -mno-sse4 -mno-sse4a  -mno-sse5 -mno-abm -mno-aes -mno-avx -mno-pclmul -mno-popcnt -mno-avx2 -mno-fsgsbase -mno-rdrnd -mno-f16c -mno-fma -mno-fma4 -mno-bmi!
  -mno-bmi2 -mno-xop -mno-lwp -mno-lzcnt -mno-tbm -msoft-float  vers.c -Werror
linking kernel.debug
support.o: In function `wrmsr_safe':
/usr/src/sys/platform/pc32/i386/support.s:806: undefined reference to `gd_CURPCB'
*** Error code 1


----------------------------------------
Bug #2737: i386 drm_bufs.c:259:2 '%lx' offset type 'resource_size_t'
http://bugs.dragonflybsd.org/issues/2737#change-12320

* Author: davshao
* Status: New
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
i386 GENERIC kernel compilation fails with

/usr/src/sys/dev/drm/drm/../drm_bufs.c: In function 'drm_addmap':
/usr/src/sys/dev/drm/drm/../drm_bufs.c:259:2: error: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'resource_size_t' [-Werror=format]
cc1: all warnings being treated as errors

Argument offset is type resource_size_t which appears to be vm_paddr_t and thus __unit64_t.

A patch similar to the below fixes compilation problems on i386:

diff --git a/sys/dev/drm/drm_bufs.c b/sys/dev/drm/drm_bufs.c
index 575dbcf..7c66ea8 100644
--- a/sys/dev/drm/drm_bufs.c
+++ b/sys/dev/drm/drm_bufs.c
@@ -256,7 +256,7 @@ int drm_addmap(struct drm_device * dev, resource_size_t offset,
 done:
        /* Jumped to, with lock held, when a kernel map is found. */

-       DRM_DEBUG("Added map %d 0x%lx/0x%lx\n", map->type, map->offset,
+       DRM_DEBUG("Added map %d 0x%lx/0x%lx\n", map->type, (unsigned long)map->offset,
            map->size);

        *map_ptr = map;



-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Bugs mailing list