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: Re: [PATCH v2 3/4] fbdev: au1100fb: Use %zu to printk a value of type size_t
Date: Sat, 7 Feb 2026 22:32:07 +0100 [thread overview]
Message-ID: <aYeu_fgYxHSk9pjK@monoceros> (raw)
In-Reply-To: <615c1263-fbdc-40bd-aff6-b1411af012fe@gmx.de>
[-- Attachment #1: Type: text/plain, Size: 1704 bytes --]
On Sat, Feb 07, 2026 at 08:06:18PM +0100, Helge Deller wrote:
> On 2/7/26 18:12, Uwe Kleine-König wrote:
> > %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.
> >
> > Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
> > ---
> > drivers/video/fbdev/au1100fb.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/video/fbdev/au1100fb.c b/drivers/video/fbdev/au1100fb.c
> > index beba8befaec9..a0e1aceaf9a6 100644
> > --- a/drivers/video/fbdev/au1100fb.c
> > +++ b/drivers/video/fbdev/au1100fb.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;
> > }
>
> I think there is a second hunk missing?
>
> @@ -470,7 +470,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%08x, size=%zuK", fbdev->fb_phys, fbdev->fb_len / 1024);
Ah, the compiler didn't stumble about this one because print_dbg is a
stub without DEBUG defined.
I will prepare a v3.
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2026-02-07 21:32 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-07 17:12 [PATCH v2 0/4] fbdev: au1100fb: support COMPILE_TEST and fix multi-device support Uwe Kleine-König
2026-02-07 17:12 ` [PATCH v2 1/4] fbdev: au1100fb: Don't store device specific data in global variables Uwe Kleine-König
2026-02-07 19:04 ` Helge Deller
2026-02-07 21:34 ` Uwe Kleine-König
2026-02-08 17:48 ` Uwe Kleine-König
2026-02-07 17:12 ` [PATCH v2 2/4] fbdev: au1100fb: Mark several local functions as static Uwe Kleine-König
2026-02-07 17:12 ` [PATCH v2 3/4] fbdev: au1100fb: Use %zu to printk a value of type size_t Uwe Kleine-König
2026-02-07 19:06 ` Helge Deller
2026-02-07 21:32 ` Uwe Kleine-König [this message]
2026-02-07 17:12 ` [PATCH v2 4/4] fbdev: au1100fb: Make driver compilable on non-mips platforms Uwe Kleine-König
2026-02-07 22:02 ` kernel test robot
2026-02-07 23:04 ` kernel test robot
2026-02-08 11:12 ` kernel test robot
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=aYeu_fgYxHSk9pjK@monoceros \
--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