platform/x86: Fix header inclusion in linux/platform_data/x86/soc.h
PATCH 1/1 platform/x86: Fix header inclusion in linux/platform_data/x86/soc.h
First of all, we don't use intel-family.h directly. On the other hand we actively use boolean type, that is defined in the types.h (we take top-level header for that) and x86_cpu_id, that is provided in the mod_devicetable.h.
Secondly, we don't need to spread SOC_INTEL_IS_CPU() macro to the users. Hence, undefine it when it's appropriate.
--- include/linux/platform_data/x86/soc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
include/linux/platform_data/x86/soc.h +6 -1
@@ -8,10 +8,13 @@#ifndef __PLATFORM_DATA_X86_SOC_H#define __PLATFORM_DATA_X86_SOC_H +#include <linux/types.h> +#if IS_ENABLED (CONFIG_X86 ) +#include <linux/mod_devicetable.h> +#include <asm/cpu_device_id.h> -#include <asm/intel-family.h> #define SOC_INTEL_IS_CPU (soc, type) \ static inline bool soc_intel_is_##soc(void) \
@@ -34,6 +37,8 @@ SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT);SOC_INTEL_IS_CPU (glk,ATOM_GOLDMONT_PLUS );SOC_INTEL_IS_CPU (cml,KABYLAKE_L ); +#undef SOC_INTEL_IS_CPU +#else /* IS_ENABLED(CONFIG_X86) */ static inline bool soc_intel_is_byt (void )
Signature · 1 line
2.39.1
Hi,
Quoted 9 lines · Andy Shevchenko
First of all, we don't use
intel-family.hdirectly. On the other hand we actively use boolean type, that is defined in thetypes.h(we take top-level header for that) andx86_cpu_id, that is provided in themod_devicetable.h.Secondly, we don't need to spread
SOC_INTEL_IS_CPU()macro to the users. Hence, undefine it when it's appropriate.Signed-off-by Andy Shevchenko <[email protected]>
Thank you for your patch, I've applied this patch to my review-hans branch:
https://git.kernel.org/pub/scm/linux/kernel/git/pdx86/platform-drivers-x86.git/log/?h=review-hans
Note it will show up in my review-hans branch once I've pushed my local branch there, which might take a while.
Once I've run some tests on this branch the patches there will be added to the platform-drivers-x86/for-next branch and eventually will be included in the pdx86 pull-request to Linus for the next merge-window.
Regards,
Hans
Quoted 32 lines
--- include/linux/platform_data/x86/soc.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)include/linux/platform_data/x86/soc.h +6
-1@@ -8,10 +8,13 @@#ifndef __PLATFORM_DATA_X86_SOC_H#define __PLATFORM_DATA_X86_SOC_H +#include <linux/types.h> +#if IS_ENABLED (CONFIG_X86 ) +#include <linux/mod_devicetable.h> +#include <asm/cpu_device_id.h> -#include <asm/intel-family.h> #define SOC_INTEL_IS_CPU (soc, type) \ static inline bool soc_intel_is_##soc(void) \@@ -34,6 +37,8 @@ SOC_INTEL_IS_CPU(apl, ATOM_GOLDMONT);SOC_INTEL_IS_CPU (glk,ATOM_GOLDMONT_PLUS );SOC_INTEL_IS_CPU (cml,KABYLAKE_L ); +#undef SOC_INTEL_IS_CPU +#else /* IS_ENABLED(CONFIG_X86) */ static inline bool soc_intel_is_byt (void )