Skip to contentSkip to conversation

microblaze: fixes includes in sigcontext.h

PATCH In review Nicholas Krause 2 participants 5 messages Jul 3, 2014 Microblaze architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 microblaze: fixes includes in sigcontext.h

This patch changes this file to use linux/ptrace.h instead of included file to fix this FIXME message in this file.

---
 arch/microblaze/include/uapi/asm/sigcontext.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/microblaze/include/uapi/asm/sigcontext.h +1 -2
index 55873c8..1180d9b 100644
@@ -9,8 +9,7 @@
 #ifndef _ASM_MICROBLAZE_SIGCONTEXT_H
 #define _ASM_MICROBLAZE_SIGCONTEXT_H
 
-/* FIXME should be linux/ptrace.h */
-#include <asm/ptrace.h>
+#include <linux/ptrace.h>
 
 struct sigcontext {
 	struct pt_regs regs;
Signature · 1 line
1.9.1
#1 lore raw
Quoted 5 lines · Nicholas Krause
arch/microblaze/include/uapi/asm/sigcontext.h +0 -0
index 55873c8..1180d9b 100644

arch/microblaze/include/uapi/asm/sigcontext.h line 15

Quoted 9 lines
arch/microblaze/include/uapi/asm/sigcontext.h +1 -2
@@ -9,8 +9,7 @@
 #ifndef _ASM_MICROBLAZE_SIGCONTEXT_H
 #define _ASM_MICROBLAZE_SIGCONTEXT_H
 
-/* FIXME should be linux/ptrace.h */
-#include <asm/ptrace.h>
+#include <linux/ptrace.h>
 
 struct sigcontext {
 	struct pt_regs regs;

Umm, does this even compile? How does sigcontext.h get the definition of struct pt_regs? Seems like it would be better to just do a forward declaration.

#2 lore raw

You may be right I don't have a compiler that supports microblaze therefore I would suggest removing this FIXME message.
Cheers Nick

Quoted 20 lines · David Rientjes
Quoted 5 lines · Nicholas Krause
arch/microblaze/include/uapi/asm/sigcontext.h +0 -0
index 55873c8..1180d9b 100644

arch/microblaze/include/uapi/asm/sigcontext.h line 15

Quoted 9 lines
arch/microblaze/include/uapi/asm/sigcontext.h +1 -2
@@ -9,8 +9,7 @@
 #ifndef _ASM_MICROBLAZE_SIGCONTEXT_H
 #define _ASM_MICROBLAZE_SIGCONTEXT_H
 
-/* FIXME should be linux/ptrace.h */
-#include <asm/ptrace.h>
+#include <linux/ptrace.h>
 
 struct sigcontext {
      struct pt_regs regs;

Umm, does this even compile? How does sigcontext.h get the definition of struct pt_regs? Seems like it would be better to just do a forward declaration.

#3 lore raw
Quoted 2 lines · Nick Krause

You may be right I don't have a compiler that supports microblaze therefore I would suggest removing this FIXME message.

The FIXME here is obviously stating that the code needs to be fixed so that it can include linux/ptrace.h rather than asm/ptrace.h since we want to include the former rather than the latter. It doesn't imply, in any way, that you can just do the conversion without some due diligence (compilation) to ensure it works; otherwise it would have been including linux/ptrace.h since the beginning.

It's bad practice to mess with per-arch header files for platforms that you cannot compile yourself.

Quoted 24 lines

Cheers Nick

Quoted 20 lines · David Rientjes
Quoted 5 lines · Nicholas Krause
arch/microblaze/include/uapi/asm/sigcontext.h +0 -0
index 55873c8..1180d9b 100644

arch/microblaze/include/uapi/asm/sigcontext.h line 15

Quoted 9 lines
arch/microblaze/include/uapi/asm/sigcontext.h +1 -2
@@ -9,8 +9,7 @@
 #ifndef _ASM_MICROBLAZE_SIGCONTEXT_H
 #define _ASM_MICROBLAZE_SIGCONTEXT_H
 
-/* FIXME should be linux/ptrace.h */
-#include <asm/ptrace.h>
+#include <linux/ptrace.h>
 
 struct sigcontext {
      struct pt_regs regs;

Umm, does this even compile? How does sigcontext.h get the definition of struct pt_regs? Seems like it would be better to just do a forward declaration.

#4 lore raw

Very well ,
I guess this bug is outside my scope.
Cheers Nick

Quoted 39 lines · David Rientjes
Quoted 2 lines · Nick Krause

You may be right I don't have a compiler that supports microblaze therefore I would suggest removing this FIXME message.

The FIXME here is obviously stating that the code needs to be fixed so that it can include linux/ptrace.h rather than asm/ptrace.h since we want to include the former rather than the latter. It doesn't imply, in any way, that you can just do the conversion without some due diligence (compilation) to ensure it works; otherwise it would have been including linux/ptrace.h since the beginning.

It's bad practice to mess with per-arch header files for platforms that you cannot compile yourself.

Quoted 24 lines

Cheers Nick

Quoted 20 lines · David Rientjes
Quoted 5 lines · Nicholas Krause
arch/microblaze/include/uapi/asm/sigcontext.h +0 -0
index 55873c8..1180d9b 100644

arch/microblaze/include/uapi/asm/sigcontext.h line 15

Quoted 9 lines
arch/microblaze/include/uapi/asm/sigcontext.h +1 -2
@@ -9,8 +9,7 @@
 #ifndef _ASM_MICROBLAZE_SIGCONTEXT_H
 #define _ASM_MICROBLAZE_SIGCONTEXT_H
 
-/* FIXME should be linux/ptrace.h */
-#include <asm/ptrace.h>
+#include <linux/ptrace.h>
 
 struct sigcontext {
      struct pt_regs regs;

Umm, does this even compile? How does sigcontext.h get the definition of struct pt_regs? Seems like it would be better to just do a forward declaration.