]> Git Repo - linux.git/commitdiff
usb: typec: fusb302: Add __printf attribute to fusb302_log function
authorHans de Goede <[email protected]>
Mon, 11 Mar 2019 10:48:18 +0000 (11:48 +0100)
committerGreg Kroah-Hartman <[email protected]>
Tue, 19 Mar 2019 14:06:12 +0000 (15:06 +0100)
Add __printf attribute to fusb302_log function, so that we get
compiler warnings when specifying wrong vararg parameters.

Reviewed-by: Guenter Roeck <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
drivers/usb/typec/tcpm/fusb302.c

index 0029d7a061f679f185f4b543efcf32b5a8f1bcc5..261b82900fec6af10c8129d83ab48b4607cd847f 100644 (file)
@@ -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)
 {
This page took 0.063085 seconds and 4 git commands to generate.