workqueue: annotate alloc_workqueue() as printf
authorRolf Eike Beer <eb@emlix.com>
Mon, 13 Sep 2021 10:02:56 +0000 (12:02 +0200)
committerTejun Heo <tj@kernel.org>
Mon, 13 Sep 2021 17:53:27 +0000 (07:53 -1000)
This also enables checking of allows alloc_ordered_workqueue().

Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
include/linux/workqueue.h

index 2ebef6b..74d3c1e 100644 (file)
@@ -399,9 +399,8 @@ extern struct workqueue_struct *system_freezable_power_efficient_wq;
  * RETURNS:
  * Pointer to the allocated workqueue on success, %NULL on failure.
  */
-struct workqueue_struct *alloc_workqueue(const char *fmt,
-                                        unsigned int flags,
-                                        int max_active, ...);
+__printf(1, 4) struct workqueue_struct *
+alloc_workqueue(const char *fmt, unsigned int flags, int max_active, ...);
 
 /**
  * alloc_ordered_workqueue - allocate an ordered workqueue