Skip to contentSkip to conversation

workqueue: annotate alloc_workqueue() as printf

PATCH Applied Rolf Eike Beer 2 participants 2 messages Sep 13, 2021 Workqueue

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 workqueue: annotate alloc_workqueue() as printf

This also enables checking of allows alloc_ordered_workqueue().

---
 include/linux/workqueue.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
include/linux/workqueue.h +3 -3
index 2ebef6b1a3d6..49e93f5b46ad 100644
@@ -399,9 +399,9 @@ 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
Signature · 11 lines
2.33.0


-- 
Rolf Eike Beer, emlix GmbH, https://www.emlix.com
Fon +49 551 30664-0, Fax +49 551 30664-11
Gothaer Platz 3, 37083 Göttingen, Germany
Sitz der Gesellschaft: Göttingen, Amtsgericht Göttingen HR B 3160
Geschäftsführung: Heike Jordan, Dr. Uwe Kracke – Ust-IdNr.: DE 205 198 055

emlix - smart embedded open source
maintainer Applied
#1 lore raw
Quoted 3 lines · Rolf Eike Beer

This also enables checking of allows alloc_ordered_workqueue().

Applied to wq/for-5.16.

include/linux/workqueue.h extern struct workqueue_struct *system_freezable_power_efficient_wq; · line 404

Quoted 3 lines
include/linux/workqueue.h +3 -0
+__printf(1, 4) struct workqueue_struct *alloc_workqueue(const char *fmt,
+							unsigned int flags,
+							int max_active, ...);

I broke the line after the return type while applying.

Thanks.

Signature · 1 line
tejun