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

usb: dwc2: add printf attribute to cat_printf()

As cat_printf() uses printf format strings in its parameters, adding
__printf attribute allows the compiler to detect at compile-time some
errors related to format strings (with -Wformat warning flag).

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Acked-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>

authored by

Nicolas Iooss and committed by
Felipe Balbi
e135ab74 0d799503

+2 -1
+2 -1
drivers/usb/dwc2/hcd_queue.c
··· 367 367 * @fmt: The format for printf. 368 368 * @...: The args for printf. 369 369 */ 370 - static void cat_printf(char **buf, size_t *size, const char *fmt, ...) 370 + static __printf(3, 4) 371 + void cat_printf(char **buf, size_t *size, const char *fmt, ...) 371 372 { 372 373 va_list args; 373 374 int i;