From: Ayan Halder <Ayan.Halder@arm.com>
To: "james qian wang (Arm Technology China)" <james.qian.wang@arm.com>
Cc: Liviu Dudau <Liviu.Dudau@arm.com>,
"airlied@linux.ie" <airlied@linux.ie>,
Brian Starkey <Brian.Starkey@arm.com>,
"maarten.lankhorst@linux.intel.com"
<maarten.lankhorst@linux.intel.com>,
"sean@poorly.run" <sean@poorly.run>,
"Jonathan Chai (Arm Technology China)" <Jonathan.Chai@arm.com>,
"Julien Yin (Arm Technology China)" <Julien.Yin@arm.com>,
"Thomas Sun (Arm Technology China)" <thomas.Sun@arm.com>,
"Lowry Li (Arm Technology China)" <Lowry.Li@arm.com>,
"Tiannan Zhu (Arm Technology China)" <Tiannan.Zhu@arm.com>,
"Yiqi Kang (Arm Technology China)" <Yiqi.Kang@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>, Ben Davis <Ben.Davis@arm.com>,
"Oscar Zhang (Arm Technology China)" <Oscar.Zhang@arm.com>,
"Channing Chen (Arm Technology China)" <Channing.Chen@arm.com>,
Mihail Atanassov <Mihail.Atanassov@arm.com>
Subject: Re: [PATCH] drm/komeda: Clean warning 'komeda_component_add' might be a candidate for 'gnu_printf'
Date: Thu, 22 Aug 2019 10:27:30 +0000 [thread overview]
Message-ID: <20190822102729.GA29026@arm.com> (raw)
In-Reply-To: <20190813110759.10425-1-james.qian.wang@arm.com>
On Tue, Aug 13, 2019 at 11:08:20AM +0000, james qian wang (Arm Technology China) wrote:
> komeda/komeda_pipeline.c: In function 'komeda_component_add':
> komeda/komeda_pipeline.c:212:3: warning: function 'komeda_component_add' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
> vsnprintf(c->name, sizeof(c->name), name_fmt, args);
> ^~~~~~~~~
>
> Signed-off-by: james qian wang (Arm Technology China) <james.qian.wang@arm.com>
> ---
> drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h
> index a90bcbb3cb23..14b683164544 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_pipeline.h
> @@ -480,6 +480,7 @@ void komeda_pipeline_dump_register(struct komeda_pipeline *pipe,
> struct seq_file *sf);
>
> /* component APIs */
> +extern __printf(10, 11)
Took me a while to understand this and found this link very helpful :) :-
https://www.avrfreaks.net/forum/gnuprintf-format-attribute
Reviewed-by: Ayan Kumar Halder <ayan.halder@arm.com>
> struct komeda_component *
> komeda_component_add(struct komeda_pipeline *pipe,
> size_t comp_sz, u32 id, u32 hw_id,
> --
> 2.20.1
prev parent reply other threads:[~2019-08-22 10:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-13 11:08 [PATCH] drm/komeda: Clean warning 'komeda_component_add' might be a candidate for 'gnu_printf' james qian wang (Arm Technology China)
2019-08-22 10:27 ` Ayan Halder [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=20190822102729.GA29026@arm.com \
--to=ayan.halder@arm.com \
--cc=Ben.Davis@arm.com \
--cc=Brian.Starkey@arm.com \
--cc=Channing.Chen@arm.com \
--cc=Jonathan.Chai@arm.com \
--cc=Julien.Yin@arm.com \
--cc=Liviu.Dudau@arm.com \
--cc=Lowry.Li@arm.com \
--cc=Mihail.Atanassov@arm.com \
--cc=Oscar.Zhang@arm.com \
--cc=Tiannan.Zhu@arm.com \
--cc=Yiqi.Kang@arm.com \
--cc=airlied@linux.ie \
--cc=dri-devel@lists.freedesktop.org \
--cc=james.qian.wang@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=nd@arm.com \
--cc=sean@poorly.run \
--cc=thomas.Sun@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