Re: [PATCH v4 2/2] bug: introduce ASSERT_VAR_CAN_HOLD()

Christoph Hellwig
2024-03-26T07:56:10Z

On Mon, Mar 25, 2024 at 09:31:05AM +0100, Petr Tesarik wrote:
> From: Petr Tesarik <petr.tesarik1@huawei-partners.com>
>
> Introduce an ASSERT_VAR_CAN_HOLD() macro to check at build time that a
> variable can hold the given value.

This really should be run past whoever maintains build_bug.h and
also cc linux-kernel. Please also split the addition and the user
in swiotlb into separate patches.

I plan to pick up patch 1 for now, and wait for the discussion on
this addition.