From: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
To: Helge Deller <deller@gmx.de>
Cc: Chen Ni <nichen@iscas.ac.cn>,
linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH v4 3/7] fbdev: au1100fb: Use proper conversion specifiers in printk formats
Date: Sun, 15 Feb 2026 14:58:30 +0100 [thread overview]
Message-ID: <3e1577c91f4dacb3cc45baf8edeb33a53cfc0c40.1771163316.git.u.kleine-koenig@baylibre.com> (raw)
In-Reply-To: <cover.1771163316.git.u.kleine-koenig@baylibre.com>
%zu is the dedicated type for size_t. %d only works on 32bit
architectures where size_t is typedef'd to be unsigned int. (And then
the signedness doesn't fit, but `gcc -Wformat` doesn't stumble over this.
Also the size of dma_addr_t is architecture dependant and it should be
printkd using %pad (and the value passed by reference).
This prepares allowing this driver to be compiled on non-mips platforms.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
---
drivers/video/fbdev/au1100fb.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
index b1da51683de7..e43687ac74a1 100644
--- a/drivers/video/fbdev/au1100fb.c
+++ b/drivers/video/fbdev/au1100fb.c
@@ -439,7 +439,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
print_dbg("Register memory map at %p", fbdev->regs);
- print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
+ print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
c = clk_get(NULL, "lcd_intclk");
if (!IS_ERR(c)) {
@@ -456,7 +456,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
PAGE_ALIGN(fbdev->fb_len),
&fbdev->fb_phys, GFP_KERNEL);
if (!fbdev->fb_mem) {
- print_err("fail to allocate framebuffer (size: %dK))",
+ print_err("fail to allocate framebuffer (size: %zuK))",
fbdev->fb_len / 1024);
return -ENOMEM;
}
@@ -465,7 +465,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
fbdev->info.fix.smem_len = fbdev->fb_len;
print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
- print_dbg("phys=0x%08x, size=%dK", fbdev->fb_phys, fbdev->fb_len / 1024);
+ print_dbg("phys=0x%pad, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
/* load the panel info into the var struct */
fbdev->info.var = (struct fb_var_screeninfo) {
--
2.47.3
next prev parent reply other threads:[~2026-02-15 13:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-15 13:58 [PATCH v4 0/7] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support and other cleanups Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 1/7] fbdev: au1100fb: Don't store device specific data in global variables Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 2/7] fbdev: au1100fb: Mark several local functions as static Uwe Kleine-König
2026-02-15 13:58 ` Uwe Kleine-König [this message]
2026-02-15 13:58 ` [PATCH v4 4/7] fbdev: au1100fb: Make driver compilable on non-mips platforms Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 5/7] fbdev: au1100fb: Replace custom printk wrappers by pr_* Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 6/7] fbdev: au1100fb: Fold au1100fb.h into its only user Uwe Kleine-König
2026-02-15 13:58 ` [PATCH v4 7/7] fbdev: au1100fb: Replace license boilerplate by SPDX header Uwe Kleine-König
2026-02-15 20:45 ` Claude review: fbdev: au1100fb: support COMPILE_TEST and fix multi-device support and other cleanups Claude Code Review Bot
2026-02-16 1:56 ` Claude review: fbdev: au1100fb: Mark several local functions as static Claude Code Review Bot
2026-02-16 1:56 ` Claude review: fbdev: au1100fb: Don't store device specific data in global variables Claude Code Review Bot
2026-02-16 1:56 ` Claude review: fbdev: au1100fb: Use proper conversion specifiers in printk formats Claude Code Review Bot
2026-02-16 1:57 ` Claude review: fbdev: au1100fb: Fold au1100fb.h into its only user Claude Code Review Bot
2026-02-16 1:57 ` Claude review: fbdev: au1100fb: Make driver compilable on non-mips platforms Claude Code Review Bot
2026-02-16 1:57 ` Claude review: fbdev: au1100fb: Replace custom printk wrappers by pr_* Claude Code Review Bot
2026-02-16 1:57 ` Claude review: fbdev: au1100fb: Replace license boilerplate by SPDX header Claude Code Review Bot
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=3e1577c91f4dacb3cc45baf8edeb33a53cfc0c40.1771163316.git.u.kleine-koenig@baylibre.com \
--to=u.kleine-koenig@baylibre.com \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=nichen@iscas.ac.cn \
/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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox