From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754808AbbIBOYG (ORCPT ); Wed, 2 Sep 2015 10:24:06 -0400 Received: from foss.arm.com ([217.140.101.70]:36656 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754296AbbIBOYD (ORCPT ); Wed, 2 Sep 2015 10:24:03 -0400 Date: Wed, 2 Sep 2015 15:23:54 +0100 From: Mark Rutland To: Yury Norov Cc: Suzuki Poulose , Catalin Marinas , "klimov.linux@gmail.com" , "ddaney.cavm@gmail.com" , "ard.biesheuvel@linaro.org" , Will Deacon , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "yury.norov@gmail.com" Subject: Re: [PATCH v2 1/2] arm64: cpufeature.h: resolve hidden header dependencies Message-ID: <20150902142353.GB15051@leverpostej> References: <1441202438-27005-1-git-send-email-ynorov@caviumnetworks.com> <1441202438-27005-2-git-send-email-ynorov@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441202438-27005-2-git-send-email-ynorov@caviumnetworks.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 02, 2015 at 03:00:37PM +0100, Yury Norov wrote: > Functions implemented in cpufeature.h depend on some headers, but > cpufeature.h does not include them. This may cause build failure if > cpufeature.h user does not include that headers by itself. (Like it > happens in next patch of this series.) > > Signed-off-by: Yury Norov It would be worth mentioning that the cpu_feature() macro was moved as it depends on the include of for ilog2(). Otherwise this looks like a sensible cleanup/fix to me: Reviewed-by: Mark Rutland Mark. > --- > arch/arm64/include/asm/cpufeature.h | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/arch/arm64/include/asm/cpufeature.h b/arch/arm64/include/asm/cpufeature.h > index c104421..f0e4017 100644 > --- a/arch/arm64/include/asm/cpufeature.h > +++ b/arch/arm64/include/asm/cpufeature.h > @@ -19,7 +19,6 @@ > */ > > #define MAX_CPU_FEATURES (8 * sizeof(elf_hwcap)) > -#define cpu_feature(x) ilog2(HWCAP_ ## x) > > #define ARM64_WORKAROUND_CLEAN_CACHE 0 > #define ARM64_WORKAROUND_DEVICE_LOAD_ACQUIRE 1 > @@ -30,6 +29,14 @@ > > #ifndef __ASSEMBLY__ > > +#include > +#include > +#include > +#include > +#include > + > +#define cpu_feature(x) ilog2(HWCAP_ ## x) > + > struct arm64_cpu_capabilities { > const char *desc; > u16 capability; > -- > 2.1.4 >