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

mfd: pcf50633: Use sprintf directly

When dump a content of the registers let's use snprintf() directly with %*ph
specifier.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>

authored by

Andy Shevchenko and committed by
Lee Jones
970d9fbc 8bdf87b4

+1 -4
+1 -4
drivers/mfd/pcf50633-core.c
··· 106 106 } else 107 107 dump[n1] = pcf50633_reg_read(pcf, n + n1); 108 108 109 - hex_dump_to_buffer(dump, sizeof(dump), 16, 1, buf1, 128, 0); 110 - buf1 += strlen(buf1); 111 - *buf1++ = '\n'; 112 - *buf1 = '\0'; 109 + buf1 += sprintf(buf1, "%*ph\n", (int)sizeof(dump), dump); 113 110 } 114 111 115 112 return buf1 - buf;