[PATCH v6 1/7] bits: split the definition of the asm and non-asm GENMASK()

Andy Shevchenko andriy.shevchenko at linux.intel.com
Fri Mar 7 17:42:58 UTC 2025


On Sat, Mar 08, 2025 at 01:48:48AM +0900, Vincent Mailhol via B4 Relay wrote:
> From: Vincent Mailhol <mailhol.vincent at wanadoo.fr>
> 
> In an upcoming change, GENMASK() and its friends will indirectly
> depend on sizeof() which is not available in asm.
> 
> Instead of adding further complexity to __GENMASK() to make it work
> for both asm and non asm, just split the definition of the two
> variants.

...

> -/*
> - * BUILD_BUG_ON_ZERO is not available in h files included from asm files,
> - * disable the input check if that is the case.
> - */

> +/*
> + * BUILD_BUG_ON_ZERO() is not available in h files included from asm files, so
> + * no input checks in assembly.
> + */

In case of a new version I would reformat this as

/*
 * BUILD_BUG_ON_ZERO() is not available in h files included from asm files,
 * so no input checks in assembly.
 */

It makes easier to review the changes and see that the first line is kept
the same.

-- 
With Best Regards,
Andy Shevchenko




More information about the dri-devel mailing list