* [PATCH 1/1] iio: industrialio-trigger: Use 'gnu_printf' format notation
@ 2020-11-02 11:17 Lee Jones
2020-11-02 11:23 ` Lars-Peter Clausen
0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2020-11-02 11:17 UTC (permalink / raw)
To: jic23, lars, pmeerw; +Cc: linux-iio, Lee Jones
Fixes the following W=1 kernel build warning(s):
drivers/iio/industrialio-trigger.c: In function ‘iio_alloc_pollfunc’:
drivers/iio/industrialio-trigger.c:338:2: warning: function ‘iio_alloc_pollfunc’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
Signed-off-by: Lee Jones <lee.jones@linaro.org>
---
drivers/iio/industrialio-trigger.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
index 583bb51f65a75..1d65c83439d84 100644
--- a/drivers/iio/industrialio-trigger.c
+++ b/drivers/iio/industrialio-trigger.c
@@ -320,6 +320,7 @@ irqreturn_t iio_pollfunc_store_time(int irq, void *p)
}
EXPORT_SYMBOL(iio_pollfunc_store_time);
+__printf(5, 6)
struct iio_poll_func
*iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
irqreturn_t (*thread)(int irq, void *p),
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] iio: industrialio-trigger: Use 'gnu_printf' format notation
2020-11-02 11:17 [PATCH 1/1] iio: industrialio-trigger: Use 'gnu_printf' format notation Lee Jones
@ 2020-11-02 11:23 ` Lars-Peter Clausen
2020-11-02 11:37 ` Lee Jones
0 siblings, 1 reply; 4+ messages in thread
From: Lars-Peter Clausen @ 2020-11-02 11:23 UTC (permalink / raw)
To: Lee Jones, jic23, pmeerw; +Cc: linux-iio
On 11/2/20 12:17 PM, Lee Jones wrote:
> Fixes the following W=1 kernel build warning(s):
>
> drivers/iio/industrialio-trigger.c: In function ‘iio_alloc_pollfunc’:
> drivers/iio/industrialio-trigger.c:338:2: warning: function ‘iio_alloc_pollfunc’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
Jonathan already sent a similar patch. See
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd7798cbd28044a3026619e36993160ba8fa118d
<https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd7798cbd28044a3026619e36993160ba8fa118d>
>
> Signed-off-by: Lee Jones <lee.jones@linaro.org>
> ---
> drivers/iio/industrialio-trigger.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> index 583bb51f65a75..1d65c83439d84 100644
> --- a/drivers/iio/industrialio-trigger.c
> +++ b/drivers/iio/industrialio-trigger.c
> @@ -320,6 +320,7 @@ irqreturn_t iio_pollfunc_store_time(int irq, void *p)
> }
> EXPORT_SYMBOL(iio_pollfunc_store_time);
>
> +__printf(5, 6)
> struct iio_poll_func
> *iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
> irqreturn_t (*thread)(int irq, void *p),
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] iio: industrialio-trigger: Use 'gnu_printf' format notation
2020-11-02 11:23 ` Lars-Peter Clausen
@ 2020-11-02 11:37 ` Lee Jones
2020-11-14 15:39 ` Jonathan Cameron
0 siblings, 1 reply; 4+ messages in thread
From: Lee Jones @ 2020-11-02 11:37 UTC (permalink / raw)
To: Lars-Peter Clausen; +Cc: jic23, pmeerw, linux-iio
On Mon, 02 Nov 2020, Lars-Peter Clausen wrote:
> On 11/2/20 12:17 PM, Lee Jones wrote:
> > Fixes the following W=1 kernel build warning(s):
> >
> > drivers/iio/industrialio-trigger.c: In function ‘iio_alloc_pollfunc’:
> > drivers/iio/industrialio-trigger.c:338:2: warning: function ‘iio_alloc_pollfunc’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
>
> Jonathan already sent a similar patch. See
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd7798cbd28044a3026619e36993160ba8fa118d
> <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd7798cbd28044a3026619e36993160ba8fa118d>
So adding this to the prototype also squashes the warning?
> > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > ---
> > drivers/iio/industrialio-trigger.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> > index 583bb51f65a75..1d65c83439d84 100644
> > --- a/drivers/iio/industrialio-trigger.c
> > +++ b/drivers/iio/industrialio-trigger.c
> > @@ -320,6 +320,7 @@ irqreturn_t iio_pollfunc_store_time(int irq, void *p)
> > }
> > EXPORT_SYMBOL(iio_pollfunc_store_time);
> > +__printf(5, 6)
> > struct iio_poll_func
> > *iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
> > irqreturn_t (*thread)(int irq, void *p),
>
>
--
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/1] iio: industrialio-trigger: Use 'gnu_printf' format notation
2020-11-02 11:37 ` Lee Jones
@ 2020-11-14 15:39 ` Jonathan Cameron
0 siblings, 0 replies; 4+ messages in thread
From: Jonathan Cameron @ 2020-11-14 15:39 UTC (permalink / raw)
To: Lee Jones; +Cc: Lars-Peter Clausen, pmeerw, linux-iio
On Mon, 2 Nov 2020 11:37:23 +0000
Lee Jones <lee.jones@linaro.org> wrote:
> On Mon, 02 Nov 2020, Lars-Peter Clausen wrote:
>
> > On 11/2/20 12:17 PM, Lee Jones wrote:
> > > Fixes the following W=1 kernel build warning(s):
> > >
> > > drivers/iio/industrialio-trigger.c: In function ‘iio_alloc_pollfunc’:
> > > drivers/iio/industrialio-trigger.c:338:2: warning: function ‘iio_alloc_pollfunc’ might be a candidate for ‘gnu_printf’ format attribute [-Wsuggest-attribute=format]
> >
> > Jonathan already sent a similar patch. See
> > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd7798cbd28044a3026619e36993160ba8fa118d
> > <https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cd7798cbd28044a3026619e36993160ba8fa118d>
>
> So adding this to the prototype also squashes the warning?
I'm not seeing the warning any more so I guess so?
J
>
> > > Signed-off-by: Lee Jones <lee.jones@linaro.org>
> > > ---
> > > drivers/iio/industrialio-trigger.c | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/drivers/iio/industrialio-trigger.c b/drivers/iio/industrialio-trigger.c
> > > index 583bb51f65a75..1d65c83439d84 100644
> > > --- a/drivers/iio/industrialio-trigger.c
> > > +++ b/drivers/iio/industrialio-trigger.c
> > > @@ -320,6 +320,7 @@ irqreturn_t iio_pollfunc_store_time(int irq, void *p)
> > > }
> > > EXPORT_SYMBOL(iio_pollfunc_store_time);
> > > +__printf(5, 6)
> > > struct iio_poll_func
> > > *iio_alloc_pollfunc(irqreturn_t (*h)(int irq, void *p),
> > > irqreturn_t (*thread)(int irq, void *p),
> >
> >
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-14 15:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-02 11:17 [PATCH 1/1] iio: industrialio-trigger: Use 'gnu_printf' format notation Lee Jones
2020-11-02 11:23 ` Lars-Peter Clausen
2020-11-02 11:37 ` Lee Jones
2020-11-14 15:39 ` Jonathan Cameron
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.