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

Petr Tesařík
2024-03-26T11:55:23Z

On Tue, 26 Mar 2024 08:56:06 +0100
Christoph Hellwig <hch@lst.de> wrote:

> 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.

Fair enough. The use in swiotlb depends on patch 1 from this series,
but you're right, I can send the macro addition as a separate patch to
get some feedback.

Thank you!
Petr T