Re: [PATCH v4] checkpatch: Check WQ_PERCPU or WQ_UNBOUND presence in alloc_workqueue() users

From: Breno Leitao

Date: Mon Jun 08 2026 - 05:37:56 EST


On Mon, Jun 08, 2026 at 10:37:11AM +0200, Marco Crivellari wrote:
> The workqueue API introduced a new flag, WQ_PERCPU, that has to be used when
> WQ_UNBOUND is not present. One of these flags must be present, but not
> both of them.
>
> To limit usage mistakes, emit an ERROR if one of the below condition is met:

The changelog still says "emit an ERROR", but since v3 the code uses
WARN()

> - alloc_workqueue() is called without WQ_PERCPU nor WQ_UNBOUND
> - alloc_workqueue() is called with both WQ_PERCPU and WQ_UNBOUND
>
> Signed-off-by: Marco Crivellari <marco.crivellari@xxxxxxxx>

Reviewed-by: Breno Leitao <leitao@xxxxxxxxxx>