From bb31b352510be206d2797b2225e6ae37ff567c8e Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Mon, 11 Mar 2019 11:48:18 +0100 Subject: [PATCH] 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: Guenter Roeck Signed-off-by: Hans de Goede Acked-by: Heikki Krogerus Signed-off-by: Greg Kroah-Hartman --- drivers/usb/typec/tcpm/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index 0029d7a061f6..261b82900fec 100644 --- a/drivers/usb/typec/tcpm/fusb302.c +++ b/drivers/usb/typec/tcpm/fusb302.c @@ -125,13 +125,13 @@ struct fusb302_chip { */ #ifdef CONFIG_DEBUG_FS - static bool fusb302_log_full(struct fusb302_chip *chip) { return chip->logbuffer_tail == (chip->logbuffer_head + 1) % LOG_BUFFER_ENTRIES; } +__printf(2, 0) static void _fusb302_log(struct fusb302_chip *chip, const char *fmt, va_list args) {