Skip to contentSkip to conversation

of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file

PATCH In review Thomas Huth 1 participant 3 messages Jun 19 – Sep 22 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: fdt: Replace __ASSEMBLY__ with __ASSEMBLER__ in of_fdt.h header file

From: Thomas Huth <[email protected]>

While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize now on the __ASSEMBLER__ macro that is provided by the compilers.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
Note: This patch has been split from an earlier bigger patch of mine to ease reviewing.

 include/linux/of_fdt.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/of_fdt.h +2 -2
index 51dadbaa3d63a..72b452e388eeb 100644
@@ -16,7 +16,7 @@
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if defined(CONFIG_OF_FLATTREE)
 
@@ -103,5 +103,5 @@ static inline void unflatten_device_tree(void) {}
 static inline void unflatten_and_copy_device_tree(void) {}
 #endif /* CONFIG_OF_EARLY_FLATTREE */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _LINUX_OF_FDT_H */
Signature · 1 line
2.54.0
#1 lore raw
Quoted 35 lines · Thomas Huth

From: Thomas Huth <[email protected]>

While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize now on the __ASSEMBLER__ macro that is provided by the compilers.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
Note: This patch has been split from an earlier bigger patch of mine to ease reviewing.

  include/linux/of_fdt.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/of_fdt.h +1 -1
index 51dadbaa3d63a..72b452e388eeb 100644
@@ -16,7 +16,7 @@
 /* Definitions used by the flattened device tree */
 #define OF_DT_HEADER		0xd00dfeed	/* marker */
 
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
 #if defined(CONFIG_OF_FLATTREE)
 

include/linux/of_fdt.h static inline void unflatten_device_tree(void) {} · line 107

Quoted 6 lines
include/linux/of_fdt.h +1 -1
@@ -103,5 +103,5 @@ static inline void unflatten_device_tree(void) {}
 static inline void unflatten_and_copy_device_tree(void) {}
 #endif /* CONFIG_OF_EARLY_FLATTREE */
 
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
 #endif /* _LINUX_OF_FDT_H */

Friendly ping!

Could anybody please pick this up? Thanks!

Thomas

#2 lore raw
Quoted 38 lines · Thomas Huth
Quoted 37 lines · Thomas Huth

From: Thomas Huth <[email protected]>

While the GCC and Clang compilers already define __ASSEMBLER__ automatically when compiling assembly code, __ASSEMBLY__ is a macro that only gets defined by the Makefiles in the kernel. This can be very confusing when switching between userspace and kernelspace coding, or when dealing with uapi headers that rather should use __ASSEMBLER__ instead. So let's standardize now on the __ASSEMBLER__ macro that is provided by the compilers.

This is a completely mechanical patch (done with a simple "sed -i" statement).

---
  Note: This patch has been split from an earlier bigger patch of mine to ease reviewing.

  include/linux/of_fdt.h | 4 ++--

  1 file changed, 2 insertions(+), 2 deletions(-)
include/linux/of_fdt.h +1 -1
index 51dadbaa3d63a..72b452e388eeb 100644
@@ -16,7 +16,7 @@
  /* Definitions used by the flattened device tree */
  #define OF_DT_HEADER        0xd00dfeed    /* marker */
-#ifndef __ASSEMBLY__
+#ifndef __ASSEMBLER__
 
  #if defined(CONFIG_OF_FLATTREE)
 
@@ -103,5 +103,5 @@ static inline void unflatten_device_tree(void) {}
  static inline void unflatten_and_copy_device_tree(void) {}
  #endif /* CONFIG_OF_EARLY_FLATTREE */
 
Quoted 5 lines

include/linux/of_fdt.h static inline void unflatten_device_tree(void) {} · line 107

Quoted 3 lines
include/linux/of_fdt.h +1 -1
-#endif /* __ASSEMBLY__ */
+#endif /* __ASSEMBLER__ */
  #endif /* _LINUX_OF_FDT_H */

Friendly ping!

Ping again!

Rob, Saravana, it's not a big patch, could you please pick it up? (or tell me if you don't like it, then I'll stop annoying you ;-))

Thanks,
Thomas