mbox series

[0/2] workqueue: Have 'alloc_workqueue()' like macros accept a format specifier

Message ID cover.1618780558.git.christophe.jaillet@wanadoo.fr (mailing list archive)
Headers show
Series workqueue: Have 'alloc_workqueue()' like macros accept a format specifier | expand

Message

Christophe JAILLET April 18, 2021, 9:25 p.m. UTC
Improve 'create_workqueue', 'create_freezable_workqueue' and
'create_singlethread_workqueue' so that they accept a format
specifier and a variable number of arguments.

This will put these macros more in line with 'alloc_ordered_workqueue' and
the underlying 'alloc_workqueue()' function.

This will also allow further code simplification.

Patch 1 is the modification of the macro.
Patch 2 is an example of simplification possible with this patch

Christophe JAILLET (2):
  workqueue: Have 'alloc_workqueue()' like macros accept a  format
    specifier
  net/mlx5: Simplify workqueue name creation

 drivers/net/ethernet/mellanox/mlx5/core/health.c |  9 +--------
 include/linux/workqueue.h                        | 14 +++++++-------
 2 files changed, 8 insertions(+), 15 deletions(-)

Comments

Tejun Heo April 19, 2021, 10:22 a.m. UTC | #1
Hello, Christophe.

On Sun, Apr 18, 2021 at 11:25:52PM +0200, Christophe JAILLET wrote:
> Improve 'create_workqueue', 'create_freezable_workqueue' and
> 'create_singlethread_workqueue' so that they accept a format
> specifier and a variable number of arguments.
> 
> This will put these macros more in line with 'alloc_ordered_workqueue' and
> the underlying 'alloc_workqueue()' function.

Those interfaces are deprecated and if you're doing anything with the users,
the right course of action would be converting them to use one of the
alloc_workqueue interfaces.

Thanks.