Re: [PATCH 01/53] workqueue: Introduce the create*_workqueue2() macros

From: Bart Van Assche
Date: Mon Jul 01 2024 - 12:43:13 EST


On 6/30/24 7:51 PM, Lai Jiangshan wrote:
On Mon, Jul 1, 2024 at 6:29 AM Bart Van Assche <bvanassche@xxxxxxx> wrote:

--- a/include/linux/workqueue.h
+++ b/include/linux/workqueue.h
@@ -525,11 +525,20 @@ alloc_workqueue(const char *fmt, unsigned int flags, int max_active, ...);

#define create_workqueue(name) \
alloc_workqueue("%s", __WQ_LEGACY | WQ_MEM_RECLAIM, 1, (name))
+#define create_workqueue2(fmt, args...) \
+ alloc_workqueue(fmt, __WQ_LEGACY | WQ_MEM_RECLAIM, 1, ##args)
#define create_freezable_workqueue(name) \
alloc_workqueue("%s", __WQ_LEGACY | WQ_FREEZABLE | WQ_UNBOUND | \
WQ_MEM_RECLAIM, 1, (name))

Is there any possible preprocessor hack to avoid the renaming of the functions?

Thanks Lai for having taken a look. As one can see here the last patch of this patch series renames create_workqueue2() back to create_workqueue(): https://lore.kernel.org/linux-kernel/20240630222904.627462-1-bvanassche@xxxxxxx/

Bart.