Skip to contentSkip to conversation

ARM: amba: don't include <asm/sizes.h>

PATCH In review Alessandro Rubini 3 participants 4 messages Feb 16, 2012 Arm primecell bus support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: amba: don't include <asm/sizes.h>

The file uses no SZ_* symbol and some architectures miss sizes.h

---

There a number of files including but not using it. This one in particular I need under x86 so the fix is trivial.

However, I remember different feelings about sizes.h . Should it die or should it proliferate to other archs using asm-generic/sizes.h ?

 drivers/amba/bus.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
drivers/amba/bus.c +0 -1
index 01c2cf4..928f80f 100644
@@ -18,7 +18,6 @@
 #include <linux/amba/bus.h>
 
 #include <asm/irq.h>
-#include <asm/sizes.h>
 
 #define to_amba_driver(d)	container_of(d, struct amba_driver, drv)
 
Signature · 1 line
1.7.7.2
#1 lore raw
Quoted 11 lines · Alessandro Rubini

The file uses no SZ_* symbol and some architectures miss sizes.h

---

There a number of files including but not using it. This one in particular I need under x86 so the fix is trivial.

However, I remember different feelings about sizes.h . Should it die or should it proliferate to other archs using asm-generic/sizes.h ?

It would be good to have it included for all architectures. It really has nothing arch specific in it so it ought to live in include/linux:

git mv include/asm-generic include/linux
And a fix for the archs that will be broken by this. A small wrapper in arch/$ARCH/include/asm could do the trick

And speaking of this file I sometime have missed:
#define SZ_1K_BITS 10
#define SZ_2K_BITS 11

Or something similar.

Sam

#2 lore raw
Quoted 5 lines

It would be good to have it included for all architectures. It really has nothing arch specific in it so it ought to live in include/linux:

git mv include/asm-generic include/linux

Ok. I can do this if it has any chance to be accepted. I find more and more SZ_4K as I dig into my PCIe-AMBA bridge.

/alessandro

#3 lore raw
In reply to Alessandro Rubini
Quoted 11 lines · Alessandro Rubini

The file uses no SZ_* symbol and some architectures miss sizes.h

---

There a number of files including but not using it. This one in particular I need under x86 so the fix is trivial.

However, I remember different feelings about sizes.h . Should it die or should it proliferate to other archs using asm-generic/sizes.h ?

If you're going to continue with this change, please make sure you test build Versatile Express, Versatile and Realview to ensure that this doesn't cause breakage.