From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Thomas Zimmermann <tzimmermann@suse.de>, dri-devel@lists.freedesktop.org Subject: [PATCH -next] drm: simpledrm: print resource info using '%pr' Date: Wed, 12 May 2021 16:34:59 -0700 [thread overview] Message-ID: <20210512233459.19534-1-rdunlap@infradead.org> (raw) 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 <rdunlap@infradead.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/tiny/simpledrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20210512.orig/drivers/gpu/drm/tiny/simpledrm.c +++ linux-next-20210512/drivers/gpu/drm/tiny/simpledrm.c @@ -530,8 +530,8 @@ static int simpledrm_device_init_mm(stru 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; }
WARNING: multiple messages have this Message-ID (diff)
From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, dri-devel@lists.freedesktop.org, Thomas Zimmermann <tzimmermann@suse.de> Subject: [PATCH -next] drm: simpledrm: print resource info using '%pr' Date: Wed, 12 May 2021 16:34:59 -0700 [thread overview] Message-ID: <20210512233459.19534-1-rdunlap@infradead.org> (raw) 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 <rdunlap@infradead.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> Cc: dri-devel@lists.freedesktop.org --- drivers/gpu/drm/tiny/simpledrm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20210512.orig/drivers/gpu/drm/tiny/simpledrm.c +++ linux-next-20210512/drivers/gpu/drm/tiny/simpledrm.c @@ -530,8 +530,8 @@ static int simpledrm_device_init_mm(stru 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; }
next reply other threads:[~2021-05-12 23:56 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-05-12 23:34 Randy Dunlap [this message] 2021-05-12 23:34 ` [PATCH -next] drm: simpledrm: print resource info using '%pr' Randy Dunlap 2021-05-13 13:03 ` Thomas Zimmermann
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210512233459.19534-1-rdunlap@infradead.org \ --to=rdunlap@infradead.org \ --cc=dri-devel@lists.freedesktop.org \ --cc=linux-kernel@vger.kernel.org \ --cc=tzimmermann@suse.de \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.