From d84680d359378a79664fa840cd144ba0f715968d Mon Sep 17 00:00:00 2001 From: Randy Dunlap Date: Wed, 12 May 2021 16:34:59 -0700 Subject: [PATCH] drm: simpledrm: print resource info using '%pr' MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit struct resource start and end fields are not always long long, so using %llx to print them can cause build warnings (below). Fix these by using the special "%pr" for printing struct resource info. ../drivers/gpu/drm/tiny/simpledrm.c: In function ‘simpledrm_device_init_mm’: ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=] ../drivers/gpu/drm/tiny/simpledrm.c:533:54: note: format string is defined here drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n", ~~~^ %x ../include/drm/drm_print.h:412:32: warning: format ‘%llx’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘resource_size_t {aka unsigned int}’ [-Wformat=] ../drivers/gpu/drm/tiny/simpledrm.c:533:61: note: format string is defined here drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n", ~~~^ %x Fixes: 4aae79f77e3a ("drm/simpledrm: Acquire memory aperture for framebuffer") Signed-off-by: Randy Dunlap Cc: Thomas Zimmermann Cc: dri-devel@lists.freedesktop.org Signed-off-by: Thomas Zimmermann Link: https://patchwork.freedesktop.org/patch/msgid/20210512233459.19534-1-rdunlap@infradead.org --- drivers/gpu/drm/tiny/simpledrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c index 2bdb477d9326..00e118c6e2e8 100644 --- a/drivers/gpu/drm/tiny/simpledrm.c +++ b/drivers/gpu/drm/tiny/simpledrm.c @@ -530,8 +530,8 @@ static int simpledrm_device_init_mm(struct simpledrm_device *sdev) ret = devm_aperture_acquire_from_firmware(dev, mem->start, resource_size(mem)); if (ret) { - drm_err(dev, "could not acquire memory range [0x%llx:0x%llx]: error %d\n", - mem->start, mem->end, ret); + drm_err(dev, "could not acquire memory range %pr: error %d\n", + mem, ret); return ret; } -- 2.25.1