* [PATCH] kernel/workqueue: Use __printf markup to silence compiler in function 'alloc_workqueue'
@ 2019-03-12 20:21 Mathieu Malaterre
2019-03-15 15:47 ` Tejun Heo
0 siblings, 1 reply; 2+ messages in thread
From: Mathieu Malaterre @ 2019-03-12 20:21 UTC (permalink / raw)
To: Tejun Heo; +Cc: Mathieu Malaterre, Lai Jiangshan, linux-kernel
Silence warnings (triggered at W=1) by adding relevant __printf attributes.
kernel/workqueue.c:4249:2: warning: function 'alloc_workqueue' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
Signed-off-by: Mathieu Malaterre <malat@debian.org>
---
kernel/workqueue.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4026d1871407..56b7cf898f10 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -4208,6 +4208,7 @@ static int init_rescuer(struct workqueue_struct *wq)
return 0;
}
+__printf(1, 4)
struct workqueue_struct *alloc_workqueue(const char *fmt,
unsigned int flags,
int max_active, ...)
--
2.20.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] kernel/workqueue: Use __printf markup to silence compiler in function 'alloc_workqueue'
2019-03-12 20:21 [PATCH] kernel/workqueue: Use __printf markup to silence compiler in function 'alloc_workqueue' Mathieu Malaterre
@ 2019-03-15 15:47 ` Tejun Heo
0 siblings, 0 replies; 2+ messages in thread
From: Tejun Heo @ 2019-03-15 15:47 UTC (permalink / raw)
To: Mathieu Malaterre; +Cc: Lai Jiangshan, linux-kernel
On Tue, Mar 12, 2019 at 09:21:26PM +0100, Mathieu Malaterre wrote:
> Silence warnings (triggered at W=1) by adding relevant __printf attributes.
>
> kernel/workqueue.c:4249:2: warning: function 'alloc_workqueue' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
>
> Signed-off-by: Mathieu Malaterre <malat@debian.org>
Applied to wq/for-5.2.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-03-15 15:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-12 20:21 [PATCH] kernel/workqueue: Use __printf markup to silence compiler in function 'alloc_workqueue' Mathieu Malaterre
2019-03-15 15:47 ` Tejun Heo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox