linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [8/8] usb: typec: fusb302: Add __printf attribute to fusb302_log function
@ 2019-02-22 14:12 Hans de Goede
  0 siblings, 0 replies; only message in thread
From: Hans de Goede @ 2019-02-22 14:12 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Guenter Roeck, Heikki Krogerus
  Cc: Hans de Goede, linux-usb

Add __printf attribute to fusb302_log function, so that we get
compiler warnings when specifying wrong vararg parameters.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 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 940e096a4ac6..73b26eaea10c 100644
--- a/drivers/usb/typec/tcpm/fusb302.c
+++ b/drivers/usb/typec/tcpm/fusb302.c
@@ -120,13 +120,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)
 {

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2019-02-22 14:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-22 14:12 [8/8] usb: typec: fusb302: Add __printf attribute to fusb302_log function Hans de Goede

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).