From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EFD7CC433F5 for ; Wed, 30 Mar 2022 15:55:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348481AbiC3P5Q (ORCPT ); Wed, 30 Mar 2022 11:57:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348471AbiC3P5N (ORCPT ); Wed, 30 Mar 2022 11:57:13 -0400 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3341E032 for ; Wed, 30 Mar 2022 08:55:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1648655728; x=1680191728; h=date:from:to:cc:subject:message-id:references: mime-version:content-transfer-encoding:in-reply-to; bh=imgBikfhZr82zU3PBkryKfey7V06+8mpRuA1SfZVnbs=; b=KoNoPzdZP8OeR08rNH4Q95uSgvH3Xaa4xjLp3qVhFXQqV3Xm0p/07/0j EnO0hbhx5wlGqiwOdSrwZaq+pn0iVil0+X3KQ+YaXT8/I6IOiG4ISc+FA wElR5I6gDCaAELFsSXfm1Y6fVNUeAoATjNfrmOtQkGDvPd9IHjjq4GhKL b0apBGJ/+WhFznAyQlfok5ixqAWc3fA63QoLA9vrvpU4mkoIKojbbE2rG jMi8hmtGQG8YtC94SXhADRD+ff+1vTPTg4la+VRDQV7xrwkTaHfx8cUSh MW2JWQ7gq/6ygpbg//l29TuCD2u8e1Dgg06YE/lkjhsfq3t6mWaLkOGRn Q==; X-IronPort-AV: E=McAfee;i="6200,9189,10302"; a="247077479" X-IronPort-AV: E=Sophos;i="5.90,223,1643702400"; d="scan'208";a="247077479" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 08:55:28 -0700 X-IronPort-AV: E=Sophos;i="5.90,223,1643702400"; d="scan'208";a="565603486" Received: from smile.fi.intel.com ([10.237.72.59]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Mar 2022 08:55:26 -0700 Received: from andy by smile.fi.intel.com with local (Exim 4.95) (envelope-from ) id 1nZaeq-009UHk-By; Wed, 30 Mar 2022 18:54:52 +0300 Date: Wed, 30 Mar 2022 18:54:52 +0300 From: Andy Shevchenko To: Dave Hansen Cc: Neil Armstrong , 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 Message-ID: References: <20220330152808.1461758-1-narmstrong@baylibre.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > > Signed-off-by: Neil Armstrong > > --- > > 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