Skip to contentSkip to conversation

workqueue: Add back __printf format validation

PATCH Applied Joe Perches 2 participants 2 messages Jun 3, 2021 – Jun 4, 2021 Workqueue

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 workqueue: Add back __printf format validation

commit 669de8bda87b ("kernel/workqueue: Use dynamic lockdep keys for workqueues") indirectly removed the printf validation for alloc_workqueue.

Add it back.

---

compiled x86-64 defconfig only, but there _might_ be some new warning for a fmt/arg mismatch somewhere. Hope not...

 include/linux/workqueue.h | 1 +
 1 file changed, 1 insertion(+)
include/linux/workqueue.h +1 -0
index d15a7730ee18b..7c177267a81f3 100644
@@ -404,6 +404,7 @@ extern struct workqueue_struct *system_freezable_power_efficient_wq;
  * RETURNS:
  * Pointer to the allocated workqueue on success, %NULL on failure.
  */
+__printf(1, 4)
 struct workqueue_struct *alloc_workqueue(const char *fmt,
 					 unsigned int flags,
 					 int max_active, ...);
maintainer Applied
#1 lore raw
Quoted 6 lines · Joe Perches

commit 669de8bda87b ("kernel/workqueue: Use dynamic lockdep keys for workqueues") indirectly removed the printf validation for alloc_workqueue.

Add it back.

Applied to wq/for-5.14.

Thanks.

Signature · 1 line
tejun