Commit bb31b352 authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman

usb: typec: fusb302: Add __printf attribute to fusb302_log function

Add __printf attribute to fusb302_log function, so that we get
compiler warnings when specifying wrong vararg parameters.
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 207338ec
...@@ -125,13 +125,13 @@ struct fusb302_chip { ...@@ -125,13 +125,13 @@ struct fusb302_chip {
*/ */
#ifdef CONFIG_DEBUG_FS #ifdef CONFIG_DEBUG_FS
static bool fusb302_log_full(struct fusb302_chip *chip) static bool fusb302_log_full(struct fusb302_chip *chip)
{ {
return chip->logbuffer_tail == return chip->logbuffer_tail ==
(chip->logbuffer_head + 1) % LOG_BUFFER_ENTRIES; (chip->logbuffer_head + 1) % LOG_BUFFER_ENTRIES;
} }
__printf(2, 0)
static void _fusb302_log(struct fusb302_chip *chip, const char *fmt, static void _fusb302_log(struct fusb302_chip *chip, const char *fmt,
va_list args) va_list args)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment