Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Uwe Kleine-König and committed by
Helge Deller
13c89a37 2bb53005

+3 -3
+3 -3
drivers/video/fbdev/au1100fb.c
··· 440 440 fbdev->regs = (struct au1100fb_regs*)KSEG1ADDR(fbdev->info.fix.mmio_start); 441 441 442 442 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); 444 444 445 445 c = clk_get(NULL, "lcd_intclk"); 446 446 if (!IS_ERR(c)) { ··· 457 457 PAGE_ALIGN(fbdev->fb_len), 458 458 &fbdev->fb_phys, GFP_KERNEL); 459 459 if (!fbdev->fb_mem) { 460 - print_err("fail to allocate framebuffer (size: %dK))", 460 + print_err("fail to allocate framebuffer (size: %zuK))", 461 461 fbdev->fb_len / 1024); 462 462 return -ENOMEM; 463 463 } ··· 466 466 fbdev->info.fix.smem_len = fbdev->fb_len; 467 467 468 468 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); 470 470 471 471 /* load the panel info into the var struct */ 472 472 fbdev->info.var = (struct fb_var_screeninfo) {