提交 bb31b352 编写于 作者: H Hans de Goede 提交者: 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: NGuenter Roeck <linux@roeck-us.net>
Signed-off-by: NHans de Goede <hdegoede@redhat.com>
Acked-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 207338ec
......@@ -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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册