Skip to content

Commit 13c89a3

Browse files
ukleinekhdeller
authored andcommitted
fbdev: au1100fb: Use proper conversion specifiers in printk formats
%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>
1 parent 2bb5300 commit 13c89a3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/video/fbdev/au1100fb.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
440440
fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start);
441441

442442
print_dbg("Register memory map at %p", fbdev->regs);
443-
print_dbg("phys=0x%08x, size=%d", fbdev->regs_phys, fbdev->regs_len);
443+
print_dbg("phys=0x%08x, size=%zu", fbdev->regs_phys, fbdev->regs_len);
444444

445445
c = clk_get(NULL, "lcd_intclk");
446446
if (!IS_ERR(c)) {
@@ -457,7 +457,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
457457
PAGE_ALIGN(fbdev->fb_len),
458458
&fbdev->fb_phys, GFP_KERNEL);
459459
if (!fbdev->fb_mem) {
460-
print_err("fail to allocate framebuffer (size: %dK))",
460+
print_err("fail to allocate framebuffer (size: %zuK))",
461461
fbdev->fb_len / 1024);
462462
return -ENOMEM;
463463
}
@@ -466,7 +466,7 @@ static int au1100fb_drv_probe(struct platform_device *dev)
466466
fbdev->info.fix.smem_len = fbdev->fb_len;
467467

468468
print_dbg("Framebuffer memory map at %p", fbdev->fb_mem);
469-
print_dbg("phys=0x%08x, size=%dK", fbdev->fb_phys, fbdev->fb_len / 1024);
469+
print_dbg("phys=0x%pad, size=%zuK", &fbdev->fb_phys, fbdev->fb_len / 1024);
470470

471471
/* load the panel info into the var struct */
472472
fbdev->info.var = (struct fb_var_screeninfo) {

0 commit comments

Comments
 (0)