diff mbox series

[PATHv11,21/43] mach-socfpga: do not overlap defines with lwip

Message ID 20231127125726.3735-22-maxim.uvarov@linaro.org
State Superseded
Headers show
Series net/lwip: add lwip library for the network stack | expand

Commit Message

Maxim Uvarov Nov. 27, 2023, 12:57 p.m. UTC
Fix compilation issue with overlapping lwip and march defines.

Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
---
 arch/arm/mach-socfpga/include/mach/handoff_soc64.h | 6 ------
 arch/arm/mach-socfpga/wrap_handoff_soc64.c         | 9 +++++++++
 2 files changed, 9 insertions(+), 6 deletions(-)

Comments

Tom Rini Nov. 27, 2023, 6:35 p.m. UTC | #1
On Mon, Nov 27, 2023 at 06:57:04PM +0600, Maxim Uvarov wrote:
> Fix compilation issue with overlapping lwip and march defines.
> 
> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
> ---
>  arch/arm/mach-socfpga/include/mach/handoff_soc64.h | 6 ------
>  arch/arm/mach-socfpga/wrap_handoff_soc64.c         | 9 +++++++++
>  2 files changed, 9 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
> index 902fc6bfb5..9b85e5865b 100644
> --- a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
> +++ b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
> @@ -78,12 +78,6 @@
>  
>  #ifndef __ASSEMBLY__
>  #include <asm/types.h>
> -enum endianness {
> -	LITTLE_ENDIAN = 0,
> -	BIG_ENDIAN,
> -	UNKNOWN_ENDIANNESS
> -};
> -
>  int socfpga_get_handoff_size(void *handoff_address);
>  int socfpga_handoff_read(void *handoff_address, void *table, u32 table_len);
>  #endif
> diff --git a/arch/arm/mach-socfpga/wrap_handoff_soc64.c b/arch/arm/mach-socfpga/wrap_handoff_soc64.c
> index e7cb5ea89c..df0701ec85 100644
> --- a/arch/arm/mach-socfpga/wrap_handoff_soc64.c
> +++ b/arch/arm/mach-socfpga/wrap_handoff_soc64.c
> @@ -10,6 +10,15 @@
>  #include <errno.h>
>  #include "log.h"
>  
> +#ifndef __ASSEMBLY__
> +#include <asm/types.h>
> +enum endianness {
> +	LITTLE_ENDIAN = 0,
> +	BIG_ENDIAN,
> +	UNKNOWN_ENDIANNESS
> +};
> +#endif

Since this moves from a header to a C file you don't need __ASSEMBLY__,
and just move the enum and don't move the <asm/types.h> portion as well.
diff mbox series

Patch

diff --git a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
index 902fc6bfb5..9b85e5865b 100644
--- a/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
+++ b/arch/arm/mach-socfpga/include/mach/handoff_soc64.h
@@ -78,12 +78,6 @@ 
 
 #ifndef __ASSEMBLY__
 #include <asm/types.h>
-enum endianness {
-	LITTLE_ENDIAN = 0,
-	BIG_ENDIAN,
-	UNKNOWN_ENDIANNESS
-};
-
 int socfpga_get_handoff_size(void *handoff_address);
 int socfpga_handoff_read(void *handoff_address, void *table, u32 table_len);
 #endif
diff --git a/arch/arm/mach-socfpga/wrap_handoff_soc64.c b/arch/arm/mach-socfpga/wrap_handoff_soc64.c
index e7cb5ea89c..df0701ec85 100644
--- a/arch/arm/mach-socfpga/wrap_handoff_soc64.c
+++ b/arch/arm/mach-socfpga/wrap_handoff_soc64.c
@@ -10,6 +10,15 @@ 
 #include <errno.h>
 #include "log.h"
 
+#ifndef __ASSEMBLY__
+#include <asm/types.h>
+enum endianness {
+	LITTLE_ENDIAN = 0,
+	BIG_ENDIAN,
+	UNKNOWN_ENDIANNESS
+};
+#endif
+
 static enum endianness check_endianness(u32 handoff)
 {
 	switch (handoff) {