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

[media] media/pci/cobalt: Use %*ph to print small buffers

printk() supports %*ph format specifier for printing a small buffers,
let's use it intead of %02x %02x...

Signed-off-by: Alexander Kuleshov <kuleshovmail@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

authored by

Alexander Kuleshov and committed by
Mauro Carvalho Chehab
67dcfebd f1a81afc

+3 -5
+3 -5
drivers/media/pci/cobalt/cobalt-cpld.c
··· 290 290 0x01, 0xc7, 0xfc, 0x7f, 0x53, 0x62). 291 291 */ 292 292 293 - cobalt_dbg(1, "%u: %02x %02x %02x %02x %02x %02x\n", f_out, 294 - regs[0], regs[1], regs[2], regs[3], regs[4], regs[5]); 293 + cobalt_dbg(1, "%u: %6ph\n", f_out, regs); 294 + 295 295 while (retries--) { 296 296 u8 read_regs[6]; 297 297 ··· 330 330 331 331 if (!memcmp(read_regs, regs, sizeof(read_regs))) 332 332 break; 333 - cobalt_dbg(1, "retry: %02x %02x %02x %02x %02x %02x\n", 334 - read_regs[0], read_regs[1], read_regs[2], 335 - read_regs[3], read_regs[4], read_regs[5]); 333 + cobalt_dbg(1, "retry: %6ph\n", read_regs); 336 334 } 337 335 if (2 - retries) 338 336 cobalt_info("Needed %d retries\n", 2 - retries);