Re: [PATCH net-next 1/6] tools: ynl-gen: bitshift the flag values in the generated code
From: Asbjørn Sloth Tønnesen
Date: Tue Oct 14 2025 - 13:29:47 EST
On 10/13/25 11:07 PM, Jacob Keller wrote:
On 10/13/2025 9:49 AM, Asbjørn Sloth Tønnesen wrote:
Instead of pre-computing the flag values within the code generator,
then move the bitshift operation into the generated code.
This IMHO makes the generated code read more like handwritten code.
No functional changes.
Could we use BIT() here? or is that not available within uAPI headers?
Correct, BIT() is not exported to uAPI[1].
Thank you for the reviews!
[1] [PATCH v2] checkpatch: don't complain about BIT macro in uapi
https://lore.kernel.org/all/1468707033-16173-1-git-send-email-tomas.winkler@xxxxxxxxx/