lkml.org 
[lkml]   [2024]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] minmax: substitute local variables using __UNIQUE_ID()
On Thu, 15 Feb 2024 18:58:15 +0000 Yueh-Shun Li <shamrocklee@posteo.net> wrote:

> Substitute identifier names of local variables used in macro
> definitions inside minmax.h with those generated by __UNIQUE_ID(prefix)
> to eliminate passible naming collisions.
>
> Identifier names like __x, __y and __tmp are everywhere inside the
> kernel source. This patch ensures that macros provided by minmax.h
> will work even when identifiers of these names appear in the expanded
> input arguments.

Makes sense I guess. However I do wonder how far this goes:

# grep typeof include/linux/*.h | wc -l
313

Many of these are locals being defined within macros. Do they all need
changing? If so, do we really want to implement this fix for what has
always been, to my knowledge, a non-problem?


\
 
 \ /
  Last update: 2024-05-27 15:05    [W:0.036 / U:0.564 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site