Re: [PATCH] linux/container_of.h: switch to static_assert

From: Rasmus Villemoes
Date: Fri Oct 15 2021 - 07:46:15 EST


On 15/10/2021 15.13, Andy Shevchenko wrote:

> Btw, shouldn't we also remove build_bug.h in the container_of.h with this?
> (Or if this goes first, do we still need bug.h?)
>

We absolutely need build_bug.h, as that is where static_assert is defined.

container_of.h doesn't include bug.h AFAICT, nor should it need to.

(We should still find a quiet place for __same_type and have
container_of include that header, but that's unrelated to this patch.)

Rasmus