From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, hpa@zytor.com, x86@kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] x86: undef REG_IN/REG_OUT to avoid define collisions
Date: Wed, 30 Mar 2022 18:54:52 +0300 [thread overview]
Message-ID: <YkR9TD4+9LzH1N6b@smile.fi.intel.com> (raw)
In-Reply-To: <c54c8c77-d35f-49b0-ff2f-21eb597f41f0@intel.com>
On Wed, Mar 30, 2022 at 08:33:26AM -0700, Dave Hansen wrote:
> On 3/30/22 08:28, Neil Armstrong wrote:
> > These defines are only used in the inline functions declared
> > in the arch_hweight.h file, and collides with internal defines
> > of the Amlogic Mes pinctrl driver when COMPILE_TEST is enabled:
> >
> > arch/x86/include/asm/arch_hweight.h:9:17: error: expected identifier before string constant
> > 9 | #define REG_OUT "a"
> > | ^~~
> > drivers/pinctrl/meson/pinctrl-meson.h:69:9: note: in expansion of macro ‘REG_OUT’
> > 69 | REG_OUT,
Thanks for the patch!
> > Reported-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> > Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
> > ---
> > arch/x86/include/asm/arch_hweight.h | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/x86/include/asm/arch_hweight.h b/arch/x86/include/asm/arch_hweight.h
> > index ba88edd0d58b..139a4b0a2a14 100644
> > --- a/arch/x86/include/asm/arch_hweight.h
> > +++ b/arch/x86/include/asm/arch_hweight.h
> > @@ -52,4 +52,7 @@ static __always_inline unsigned long __arch_hweight64(__u64 w)
> > }
> > #endif /* CONFIG_X86_32 */
> >
> > +#undef REG_IN
> > +#undef REG_OUT
>
> Wouldn't it be a bit less hackish to give these a more qualified name
> like HWEIGHT_REG_IN?
Either way, would it be good to undef them here anyway?
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-03-30 15:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-30 15:28 Neil Armstrong
2022-03-30 15:33 ` Dave Hansen
2022-03-30 15:54 ` Andy Shevchenko [this message]
2022-03-30 22:32 ` Thomas Gleixner
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=YkR9TD4+9LzH1N6b@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=narmstrong@baylibre.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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
all inboxes | Powered by JetHome®