Project

General

Profile

Actions

Bug #2737

closed

i386 drm_bufs.c:259:2 '%lx' offset type 'resource_size_t'

Added by davshao over 9 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
11/18/2014
Due date:
% Done:

0%

Estimated time:

Description

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;
Actions

Also available in: Atom PDF