Re: [PATCH 1/7] workqueue: Preserve OFFQ bits in cancel[_sync] paths

From: Lai Jiangshan
Date: Wed Feb 21 2024 - 23:35:53 EST


Hello,

On Thu, Feb 22, 2024 at 1:43 AM Tejun Heo <tj@xxxxxxxxxx> wrote:

>
> /* Convenience constants - of type 'unsigned long', not 'enum'! */
> #define WORK_OFFQ_CANCELING (1ul << WORK_OFFQ_CANCELING_BIT)
> +#define WORK_OFFQ_FLAG_MASK (((1ul << WORK_OFFQ_FLAG_BITS) - 1) << WORK_OFFQ_FLAG_SHIFT)

It can use GENMASK.

Thanks
Lai


> #define WORK_OFFQ_POOL_NONE ((1ul << WORK_OFFQ_POOL_BITS) - 1)
> #define WORK_STRUCT_NO_POOL (WORK_OFFQ_POOL_NONE << WORK_OFFQ_POOL_SHIFT)
> #define WORK_STRUCT_PWQ_MASK (~((1ul << WORK_STRUCT_PWQ_SHIFT) - 1))