Skip to contentSkip to conversation

asm/unaligned.h doesn't work well as the very first include

PATCH In review Al Viro 4 participants 5 messages Apr 27, 2008

Subsystems (3)
lore
Share & tools
lore

Al Viro

author
#0 lore raw

PATCH 1/1 asm/unaligned.h doesn't work well as the very first include

---
 net/mac80211/mesh.h      |    1 +
 net/mac80211/mesh_hwmp.c |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/mesh.h +1 -0
index 742003d..9ee3aff 100644
@@ -13,6 +13,7 @@
 
 #include <linux/types.h>
 #include <linux/jhash.h>
+#include <asm/unaligned.h>
 #include "ieee80211_i.h"
 
 
net/mac80211/mesh_hwmp.c +0 -1
index 02de8f1..3df8092 100644
@@ -7,7 +7,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <asm/unaligned.h>
 #include "mesh.h"
 
 #define TEST_FRAME_LEN	8192
Signature · 1 line
1.5.3.GIT
#2 lore raw
In reply to Al Viro
Quoted 23 lines · Al Viro
---
 net/mac80211/mesh.h      |    1 +
 net/mac80211/mesh_hwmp.c |    1 -
 2 files changed, 1 insertions(+), 1 deletions(-)
net/mac80211/mesh.h +1 -0
index 742003d..9ee3aff 100644
@@ -13,6 +13,7 @@
 
 #include <linux/types.h>
 #include <linux/jhash.h>
+#include <asm/unaligned.h>
 #include "ieee80211_i.h"
 
 
net/mac80211/mesh_hwmp.c +0 -0
index 02de8f1..3df8092 100644

net/mac80211/mesh_hwmp.c line 10

Quoted 5 lines
net/mac80211/mesh_hwmp.c +0 -1
@@ -7,7 +7,6 @@
  * published by the Free Software Foundation.
  */
 
-#include <asm/unaligned.h>
 #include "mesh.h"

It has been discussed that any .h file should pull in what it needs so the other of includes does not matter. Some do them alphabetically.

Why not fix asm-*/unaligned.h so all users now and future are fixed in one shot?

Sam

author
#3 lore raw
Quoted 3 lines · Sam Ravnborg

It has been discussed that any .h file should pull in what it needs so the other of includes does not matter. Some do them alphabetically.

It has been discussed or it has been agreed? IMO it's a bullshit - especially for low-level stuff like that.

As for the way some do includes... It's not exactly a family-friendly list, but still I'd rather not comment in details on the existing practices...

#4 lore raw
Quoted 11 lines · Al Viro
Quoted 3 lines · Sam Ravnborg

It has been discussed that any .h file should pull in what it needs so the other of includes does not matter. Some do them alphabetically.

It has been discussed or it has been agreed? IMO it's a bullshit - especially for low-level stuff like that.

As for the way some do includes... It's not exactly a family-friendly list, but still I'd rather not comment in details on the existing practices...

I'm redoing the unaligned handling in -mm at the moment, and it avoids this problem.

Harvey