Re: [PATCH] drm/komeda: Clean warning 'komeda_component_add' might be a candidate for 'gnu_printf'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
> ---
>  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@xxxxxxx>
>  struct komeda_component *
>  komeda_component_add(struct komeda_pipeline *pipe,
>  		     size_t comp_sz, u32 id, u32 hw_id,
> -- 
> 2.20.1
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux