Re: [PATCH] include: drop pointless __compiler_offsetof indirection
From: Miguel Ojeda
Date: Wed Feb 02 2022 - 06:03:47 EST
On Wed, Feb 2, 2022 at 11:21 AM Rasmus Villemoes
<linux@xxxxxxxxxxxxxxxxxx> wrote:
>
> (1) compiler_types.h is unconditionally included via an -include
> flag (see scripts/Makefile.lib), and it defines __compiler_offsetof
> unconditionally. So testing for definedness of __compiler_offsetof is
> mostly pointless.
Sounds good to me.
By the way, there are a bunch of `#include <linux/compiler_types.h>`
around that could be removed.
> (2) Every relevant compiler provides __builtin_offsetof (even sparse
Indeed, even GCC 4.
Reviewed-by: Miguel Ojeda <ojeda@xxxxxxxxxx>
Cheers,
Miguel