]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
fbdev: au1100fb: Use proper conversion specifiers in printk formats
authorUwe Kleine-König <u.kleine-koenig@baylibre.com>
Sun, 15 Feb 2026 23:33:19 +0000 (00:33 +0100)
committerHelge Deller <deller@gmx.de>
Thu, 19 Feb 2026 16:38:17 +0000 (17:38 +0100)
%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 dependent 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>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/au1100fb.c

index 1abaa8e81315b2aaf82d2e6b911fe26a1f86da36..398375793f57d4646fd8dba21c7065e889515cdb 100644 (file)
@@ -440,7 +440,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)) {
@@ -457,7 +457,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;
        }
@@ -466,7 +466,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) {