From: John Youn <John.Youn@synopsys.com>
To: Nicolas Iooss <nicolas.iooss_linux@m4x.org>,
John Youn <John.Youn@synopsys.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <balbi@kernel.org>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/1] usb: dwc2: add printf attribute to cat_printf()
Date: Mon, 27 Jun 2016 18:59:08 -0700 [thread overview]
Message-ID: <8db5f04a-2d16-854b-9a90-001dc286e18b@synopsys.com> (raw)
In-Reply-To: <20160626081238.4668-1-nicolas.iooss_linux@m4x.org>
On 6/26/2016 1:12 AM, Nicolas Iooss wrote:
> As cat_printf() uses printf format strings in its parameters, adding
> __printf attribute allows the compiler to detect at compile-time some
> errors related to format strings (with -Wformat warning flag).
>
> Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
> ---
> drivers/usb/dwc2/hcd_queue.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc2/hcd_queue.c b/drivers/usb/dwc2/hcd_queue.c
> index b5c7793a2df2..13754353251f 100644
> --- a/drivers/usb/dwc2/hcd_queue.c
> +++ b/drivers/usb/dwc2/hcd_queue.c
> @@ -367,7 +367,8 @@ static void pmap_unschedule(unsigned long *map, int bits_per_period,
> * @fmt: The format for printf.
> * @...: The args for printf.
> */
> -static void cat_printf(char **buf, size_t *size, const char *fmt, ...)
> +static __printf(3, 4)
> +void cat_printf(char **buf, size_t *size, const char *fmt, ...)
> {
> va_list args;
> int i;
>
Acked-by: John Youn <johnyoun@synopsys.com>
John
prev parent reply other threads:[~2016-06-28 1:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-26 8:12 Nicolas Iooss
2016-06-28 1:59 ` John Youn [this message]
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=8db5f04a-2d16-854b-9a90-001dc286e18b@synopsys.com \
--to=john.youn@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=nicolas.iooss_linux@m4x.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®