All of lore.kernel.org
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Hans de Goede <hdegoede@redhat.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	linux-usb@vger.kernel.org
Subject: [v2,8/8] usb: typec: fusb302: Add __printf attribute to fusb302_log function
Date: Thu, 7 Mar 2019 10:26:37 -0800	[thread overview]
Message-ID: <20190307182637.GH26282@roeck-us.net> (raw)

On Thu, Mar 07, 2019 at 05:36:07PM +0100, Hans de Goede wrote:
> 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>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  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 6cdc38b8da74..ad1538c31dc8 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)
>  {
> -- 
> 2.20.1
>

             reply	other threads:[~2019-03-07 18:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 18:26 Guenter Roeck [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-03-07 16:36 [v2,8/8] usb: typec: fusb302: Add __printf attribute to fusb302_log function Hans de Goede

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190307182637.GH26282@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=hdegoede@redhat.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.