Re: [PATCH] clang-format: Update with v6.11-rc1's `for_each` macro list

From: Javier Carrasco
Date: Mon Jul 29 2024 - 17:39:14 EST


On 29/07/2024 22:14, Miguel Ojeda wrote:
> Hi Javier,
>
> On Mon, Jul 29, 2024 at 9:56 PM Javier Carrasco
> <javier.carrasco.cruz@xxxxxxxxx> wrote:
>>
>> Note that commit 4792f9dd1293 ("clang-format: Update with the latest
>> for_each macro list") added the macro `displayid_iter_for_each`, which
>> is not part of include/ and tools/ (it is defined in
>> drivers/gpu/drm/drm_displayid_internal.h), and the shell fragment used
>> to update the list will drop it. In order to keep the macro on the list,
>> manual intervention will always be required.
>
> Thanks for the patch!
>
> That macro was inside `include/` back then, so now it should be
> removed from the list.
>
> Of course, if we want to include internal headers, that is also an
> option to be discussed, but we should be consistent either way.
>
> Cheers,
> Miguel


A quick test threw 326 extra macros that are defined in internal headers
under drivers/ and arch/. Including internal headers would remove the
need to update the list if a macro is moved from inlcude/ to an internal
header, but the list will need to be updated much more often.

Best regards,
Javier Carrasco