[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJhGHyBgjMWtob2VRWhxCRyNuUVMzSEQufza5TRn7Cw-hBaQ3Q@mail.gmail.com>
Date: Thu, 22 Feb 2024 12:35:31 +0800
From: Lai Jiangshan <jiangshanlai@...il.com>
To: Tejun Heo <tj@...nel.org>
Cc: torvalds@...ux-foundation.org, linux-kernel@...r.kernel.org,
allen.lkml@...il.com, kernel-team@...a.com
Subject: Re: [PATCH 1/7] workqueue: Preserve OFFQ bits in cancel[_sync] paths
Hello,
On Thu, Feb 22, 2024 at 1:43 AM Tejun Heo <tj@...nel.org> 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))
Powered by blists - more mailing lists