From: Mihail Atanassov <Mihail.Atanassov@arm.com>
To: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
Cc: nd <nd@arm.com>, Liviu Dudau <Liviu.Dudau@arm.com>,
"Lowry Li (Arm Technology China)" <Lowry.Li@arm.com>,
nd <nd@arm.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/komeda: Clean warnings: candidate for 'gnu_printf’ format attribute
Date: Fri, 15 Nov 2019 00:01:00 +0000 [thread overview]
Message-ID: <3596931.2M0sqJgrhf@e123338-lin> (raw)
In-Reply-To: <20191114100421.30510-1-james.qian.wang@arm.com>
On Thursday, 14 November 2019 10:04:37 GMT james qian wang (Arm Technology China) wrote:
> komeda/komeda_event.c: In function ‘komeda_sprintf’:
> komeda/komeda_event.c:31:2: warning: function ‘komeda_sprintf’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
> num = vsnprintf(str->str + str->len, free_sz, fmt, args);
>
> v2: Update the comment msg.
>
> Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_event.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_event.c b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> index bf269683f811..977c38d516da 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_event.c
> @@ -17,6 +17,7 @@ struct komeda_str {
>
> /* return 0 on success, < 0 on no space.
> */
> +__printf(2, 3)
> static int komeda_sprintf(struct komeda_str *str, const char *fmt, ...)
> {
> va_list args;
> --
> 2.20.1
>
>
Reviewed-by: Mihail Atanassov <mihail.atanassov@arm.com>
--
Mihail
next prev parent reply other threads:[~2019-11-15 0:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-14 10:04 [PATCH] drm/komeda: Clean warnings: candidate for 'gnu_printf’ format attribute james qian wang (Arm Technology China)
2019-11-15 0:01 ` Mihail Atanassov [this message]
-- strict thread matches above, loose matches on Subject: below --
2019-11-14 7:18 james qian wang (Arm Technology China)
2019-11-14 8:47 ` Mihail Atanassov
2019-11-14 8:58 ` james qian wang (Arm Technology China)
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=3596931.2M0sqJgrhf@e123338-lin \
--to=mihail.atanassov@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=Lowry.Li@arm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=james.qian.wang@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=nd@arm.com \
/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