diff options
author | Nicolas Iooss <nicolas.iooss_linux@m4x.org> | 2016-06-26 04:12:38 -0400 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-06-29 04:11:07 -0400 |
commit | e135ab7405f562c7709806e355b1521ee68548dc (patch) | |
tree | 701174279d1c5fe88eb58e9e877af40ff657d9b3 | |
parent | 0d7995031a8e7a34e5638d57a44a51aae39e321c (diff) |
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>
-rw-r--r-- | drivers/usb/dwc2/hcd_queue.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c index b5c7793a2df2..13754353251f 100644 --- a/drivers/usb/dwc2/hcd_queue.c +++ b/drivers/usb/dwc2/hcd_queue.c | |||
@@ -367,7 +367,8 @@ static void pmap_unschedule(unsigned long *map, int bits_per_period, | |||
367 | * @fmt: The format for printf. | 367 | * @fmt: The format for printf. |
368 | * @...: The args for printf. | 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 | va_list args; | 373 | va_list args; |
373 | int i; | 374 | int i; |