From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Yueh-Shun Li <shamrocklee@posteo.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Mark Brown <broonie@kernel.org>,
Herve Codina <herve.codina@bootlin.com>,
Christophe Leroy <christophe.leroy@csgroup.eu>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] minmax: substitute local variables using __UNIQUE_ID()
Date: Thu, 15 Feb 2024 18:40:58 +0200 [thread overview]
Message-ID: <Zc4-mgji8VtQDqGe@smile.fi.intel.com> (raw)
In-Reply-To: <20240215160726.2254451-1-shamrocklee@posteo.net>
On Thu, Feb 15, 2024 at 04:07:21PM +0000, Yueh-Shun Li 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.
...
> +#define min_not_zero(x, y) \
> + __min_not_zero_impl(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y))
> +#define __min_not_zero_impl(x, y, __x, __y) \
Seems like the back slashes are indented at random.
Please, use TABs and make sure in a macro / group of (semantically related)
macros they are consistently occupy _the same_ column.
--
With Best Regards,
Andy Shevchenko
prev parent reply other threads:[~2024-02-15 16:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-15 16:07 [PATCH] minmax: substitute local variables using __UNIQUE_ID() Yueh-Shun Li
2024-02-15 16:40 ` Andy Shevchenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zc4-mgji8VtQDqGe@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=akpm@linux-foundation.org \
--cc=broonie@kernel.org \
--cc=christophe.leroy@csgroup.eu \
--cc=herve.codina@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shamrocklee@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox