Skip to contentSkip to conversation

remove asm/bitops.h includes

PATCH In review Jiri Slaby 4 participants 8 messages Sep 8, 2007 – Sep 10, 2007

Subsystems (25)
lore
Share & tools
lore

Jiri Slaby

author
#0 lore raw

PATCH 1/2 remove asm/bitops.h includes

remove asm/bitops.h includes

including asm/bitops directly may cause compile errors. don't include it and include linux/bitops instead. next patch will deny including asm header directly.

---
commit 3c05eef3d0a98065323d7d6d9a78e0985eba4b10
tree cb9691832992f570b0363dd568f6fa3d2c81e3f5
parent 132bb039c741d00f066e7501e3613d2d20bf0595
author Jiri Slaby <[email protected]> Tue, 04 Sep 2007 21:01:35 +0200 committer Jiri Slaby <[email protected]> Tue, 04 Sep 2007 21:01:35 +0200

 arch/alpha/lib/fls.c                        |    2 +-
 arch/frv/kernel/irq-mb93091.c               |    2 +-
 arch/frv/kernel/irq-mb93093.c               |    2 +-
 arch/frv/kernel/irq-mb93493.c               |    2 +-
 arch/frv/kernel/irq.c                       |    2 +-
 arch/mips/au1000/pb1200/irqmap.c            |    2 +-
 arch/mips/basler/excite/excite_irq.c        |    2 +-
 arch/mips/gt64120/wrppmc/irq.c              |    1 -
 arch/mips/tx4938/common/setup.c             |    2 +-
 arch/powerpc/platforms/maple/setup.c        |    2 +-
 drivers/char/esp.c                          |    2 +-
 drivers/char/mxser.c                        |    2 +-
 drivers/char/mxser_new.c                    |    2 +-
 drivers/ide/ide-io.c                        |    2 +-
 drivers/media/dvb/ttpci/av7110_ir.c         |    2 +-
 drivers/net/bnx2.c                          |    2 +-
 drivers/net/cris/eth_v10.c                  |    2 +-
 drivers/net/cxgb3/adapter.h                 |    2 +-
 drivers/net/hamradio/dmascc.c               |    2 +-
 drivers/net/mac89x0.c                       |    2 +-
 drivers/net/spider_net.c                    |    2 +-
 drivers/net/tulip/uli526x.c                 |    2 +-
 drivers/net/wireless/bcm43xx/bcm43xx_leds.c |    2 +-
 drivers/pcmcia/m32r_pcc.c                   |    2 +-
 drivers/pcmcia/m8xx_pcmcia.c                |    2 +-
 drivers/ps3/vuart.c                         |    2 +-
 drivers/rtc/rtc-pl031.c                     |    2 +-
 drivers/rtc/rtc-sa1100.c                    |    2 +-
 drivers/s390/cio/idset.c                    |    2 +-
 drivers/s390/net/claw.c                     |    2 +-
 drivers/scsi/ide-scsi.c                     |    2 +-
 drivers/serial/crisv10.c                    |    2 +-
 drivers/watchdog/at91rm9200_wdt.c           |    2 +-
 drivers/watchdog/ks8695_wdt.c               |    2 +-
 drivers/watchdog/omap_wdt.c                 |    2 +-
 drivers/watchdog/sa1100_wdt.c               |    2 +-
 fs/reiser4/jnode.h                          |    2 +-
 fs/reiser4/plugin/space/bitmap.c            |    2 +-
 include/asm-cris/posix_types.h              |    2 +-
 include/asm-i386/pgtable.h                  |    5 +----
 include/asm-i386/smp.h                      |    2 +-
 include/asm-ia64/cacheflush.h               |    2 +-
 include/asm-ia64/pgtable.h                  |    2 +-
 include/asm-ia64/smp.h                      |    2 +-
 include/asm-ia64/spinlock.h                 |    2 +-
 include/asm-m32r/pgtable.h                  |    2 +-
 include/asm-mips/fpu.h                      |    2 +-
 include/asm-parisc/pgtable.h                |    2 +-
 include/asm-powerpc/iommu.h                 |    2 +-
 include/asm-powerpc/mmu_context.h           |    2 +-
 include/asm-ppc/mmu_context.h               |    3 ++-
 include/asm-sparc64/smp.h                   |    2 +-
 include/asm-x86_64/pgtable.h                |    2 +-
 include/asm-x86_64/topology.h               |    2 +-
 include/linux/of.h                          |    2 +-
 lib/hweight.c                               |    2 +-
 net/core/gen_estimator.c                    |    2 +-
 net/core/pktgen.c                           |    2 +-
 net/ipv4/fib_trie.c                         |    2 +-
 net/netfilter/xt_connbytes.c                |    2 +-
 60 files changed, 60 insertions(+), 63 deletions(-)
arch/alpha/lib/fls.c +1 -1
index 7ad84ea..32afaa3 100644
@@ -3,7 +3,7 @@
  */
 
 #include <linux/module.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 
 /* This is fls(x)-1, except zero is held to zero.  This allows most
    efficent input into extbl, plus it allows easy handling of fls(0)=0.  */
arch/frv/kernel/irq-mb93091.c +1 -1
index ad753c1..9e38f99 100644
@@ -17,10 +17,10 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
 #include <asm/irc-regs.h>
arch/frv/kernel/irq-mb93093.c +1 -1
index e0983f6..3c2752c 100644
@@ -17,10 +17,10 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
 #include <asm/irc-regs.h>
arch/frv/kernel/irq-mb93493.c +1 -1
index c157eef..7754c73 100644
@@ -17,10 +17,10 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/irq.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/delay.h>
 #include <asm/irq.h>
 #include <asm/irc-regs.h>
arch/frv/kernel/irq.c +1 -1
index c7e59dc..7ddb690 100644
@@ -24,12 +24,12 @@
 #include <linux/proc_fs.h>
 #include <linux/seq_file.h>
 #include <linux/module.h>
+#include <linux/bitops.h>
 
 #include <asm/atomic.h>
 #include <asm/io.h>
 #include <asm/smp.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 #include <asm/pgalloc.h>
 #include <asm/delay.h>
arch/mips/au1000/pb1200/irqmap.c +1 -1
index b73b2d1..e5cd0da 100644
@@ -36,8 +36,8 @@
 #include <linux/slab.h>
 #include <linux/random.h>
 #include <linux/delay.h>
+#include <linux/bitops.h>
 
-#include <asm/bitops.h>
 #include <asm/bootinfo.h>
 #include <asm/io.h>
 #include <asm/mipsregs.h>
arch/mips/basler/excite/excite_irq.c +1 -1
index 94ce5d4..934e0a6 100644
@@ -29,7 +29,7 @@
 #include <linux/timex.h>
 #include <linux/slab.h>
 #include <linux/random.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/bootinfo.h>
 #include <asm/io.h>
 #include <asm/irq.h>
arch/mips/gt64120/wrppmc/irq.c +0 -1
index 06177bf..6f30572 100644
@@ -24,7 +24,6 @@
 #include <linux/bitops.h>
 #include <asm/bootinfo.h>
 #include <asm/io.h>
-#include <asm/bitops.h>
 #include <asm/mipsregs.h>
 #include <asm/system.h>
 #include <asm/irq_cpu.h>
arch/mips/tx4938/common/setup.c +1 -1
index 142abf4..f252a7c 100644
@@ -24,7 +24,7 @@
 #include <linux/slab.h>
 #include <linux/random.h>
 #include <linux/irq.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/bootinfo.h>
 #include <asm/io.h>
 #include <asm/irq.h>
arch/powerpc/platforms/maple/setup.c +1 -1
index 354c058..144177d 100644
@@ -41,13 +41,13 @@
 #include <linux/root_dev.h>
 #include <linux/serial.h>
 #include <linux/smp.h>
+#include <linux/bitops.h>
 
 #include <asm/processor.h>
 #include <asm/sections.h>
 #include <asm/prom.h>
 #include <asm/system.h>
 #include <asm/pgtable.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/kexec.h>
 #include <asm/pci-bridge.h>
drivers/char/esp.c +1 -1
index 2e7ae42..0f8fb13 100644
@@ -58,10 +58,10 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/delay.h>
+#include <linux/bitops.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
-#include <asm/bitops.h>
 
 #include <asm/dma.h>
 #include <linux/slab.h>
drivers/char/mxser.c +1 -1
index a24738e..dfacb66 100644
@@ -56,11 +56,11 @@
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
+#include <linux/bitops.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 
 #include "mxser.h"
drivers/char/mxser_new.c +1 -1
index 854dbf5..081c84c 100644
@@ -39,11 +39,11 @@
 #include <linux/mm.h>
 #include <linux/delay.h>
 #include <linux/pci.h>
+#include <linux/bitops.h>
 
 #include <asm/system.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 
 #include "mxser_new.h"
drivers/ide/ide-io.c +1 -1
index c1692d9..14b8ab0 100644
@@ -47,12 +47,12 @@
 #include <linux/device.h>
 #include <linux/kmod.h>
 #include <linux/scatterlist.h>
+#include <linux/bitops.h>
 
 #include <asm/byteorder.h>
 #include <asm/irq.h>
 #include <asm/uaccess.h>
 #include <asm/io.h>
-#include <asm/bitops.h>
 
 static int __ide_end_request(ide_drive_t *drive, struct request *rq,
 			     int uptodate, unsigned int nr_bytes)
drivers/media/dvb/ttpci/av7110_ir.c +1 -1
index e8f5537..57212f6 100644
@@ -27,7 +27,7 @@
 #include <linux/module.h>
 #include <linux/proc_fs.h>
 #include <linux/kernel.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 
 #include "av7110.h"
 #include "av7110_hw.h"
drivers/net/bnx2.c +1 -1
index b2139c0..38c12f2 100644
@@ -26,7 +26,7 @@
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/dma-mapping.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <linux/delay.h>
drivers/net/cris/eth_v10.c +1 -1
index 5bdf5ca..427cd1b 100644
@@ -234,6 +234,7 @@
 #include <linux/spinlock.h>
 #include <linux/errno.h>
 #include <linux/init.h>
+#include <linux/bitops.h>
 
 #include <linux/if.h>
 #include <linux/mii.h>
@@ -247,7 +248,6 @@
 #include <asm/irq.h>
 #include <asm/dma.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/ethernet.h>
 #include <asm/cache.h>
 
drivers/net/cxgb3/adapter.h +1 -1
index e723e7b..f7b3a3f 100644
@@ -41,9 +41,9 @@
 #include <linux/timer.h>
 #include <linux/cache.h>
 #include <linux/mutex.h>
+#include <linux/bitops.h>
 #include "t3cdev.h"
 #include <asm/semaphore.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 
 typedef irqreturn_t(*intr_handler_t) (int, void *);
drivers/net/hamradio/dmascc.c +1 -1
index 205f096..db20685 100644
@@ -21,6 +21,7 @@
 
 
 #include <linux/module.h>
+#include <linux/bitops.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/if_arp.h>
@@ -35,7 +36,6 @@
 #include <linux/sockios.h>
 #include <linux/workqueue.h>
 #include <asm/atomic.h>
-#include <asm/bitops.h>
 #include <asm/dma.h>
 #include <asm/io.h>
 #include <asm/irq.h>
drivers/net/mac89x0.c +1 -1
index 62c1c62..1858d92 100644
@@ -99,9 +99,9 @@ static char *version =
 #include <linux/etherdevice.h>
 #include <linux/skbuff.h>
 #include <linux/delay.h>
+#include <linux/bitops.h>
 
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/hwtest.h>
 #include <asm/macints.h>
drivers/net/spider_net.c +1 -1
index a144327..ce08ba2 100644
@@ -46,7 +46,7 @@
 #include <linux/vmalloc.h>
 #include <linux/wait.h>
 #include <linux/workqueue.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/pci-bridge.h>
 #include <net/checksum.h>
 
drivers/net/tulip/uli526x.c +1 -1
index 77a1bfb..6f6a667 100644
@@ -34,9 +34,9 @@
 #include <linux/delay.h>
 #include <linux/spinlock.h>
 #include <linux/dma-mapping.h>
+#include <linux/bitops.h>
 
 #include <asm/processor.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/uaccess.h>
drivers/net/wireless/bcm43xx/bcm43xx_leds.c +1 -1
index 8f198be..cb51dc5 100644
@@ -29,7 +29,7 @@
 #include "bcm43xx_radio.h"
 #include "bcm43xx.h"
 
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 
 
 static void bcm43xx_led_changestate(struct bcm43xx_led *led)
drivers/pcmcia/m32r_pcc.c +1 -1
index 67d28ee..c5e0d89 100644
@@ -22,9 +22,9 @@
 #include <linux/workqueue.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
+#include <linux/bitops.h>
 #include <asm/irq.h>
 #include <asm/io.h>
-#include <asm/bitops.h>
 #include <asm/system.h>
 #include <asm/addrspace.h>
 
drivers/pcmcia/m8xx_pcmcia.c +1 -1
index b019854..d182760 100644
@@ -48,9 +48,9 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/fsl_devices.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
-#include <asm/bitops.h>
 #include <asm/system.h>
 #include <asm/time.h>
 #include <asm/mpc8xx.h>
drivers/ps3/vuart.c +1 -1
index bea25a1..9dea585 100644
@@ -22,11 +22,11 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/workqueue.h>
+#include <linux/bitops.h>
 #include <asm/ps3.h>
 
 #include <asm/firmware.h>
 #include <asm/lv1call.h>
-#include <asm/bitops.h>
 
 #include "vuart.h"
 
drivers/rtc/rtc-pl031.c +1 -1
index e4bf68c..2fd49ed 100644
@@ -21,11 +21,11 @@
 #include <linux/interrupt.h>
 #include <linux/string.h>
 #include <linux/pm.h>
+#include <linux/bitops.h>
 
 #include <linux/amba/bus.h>
 
 #include <asm/io.h>
-#include <asm/bitops.h>
 #include <asm/hardware.h>
 #include <asm/irq.h>
 #include <asm/rtc.h>
drivers/rtc/rtc-sa1100.c +1 -1
index 0918b78..6f1e9a9 100644
@@ -29,8 +29,8 @@
 #include <linux/interrupt.h>
 #include <linux/string.h>
 #include <linux/pm.h>
+#include <linux/bitops.h>
 
-#include <asm/bitops.h>
 #include <asm/hardware.h>
 #include <asm/irq.h>
 #include <asm/rtc.h>
drivers/s390/cio/idset.c +1 -1
index 16ea828..ef7bc0a 100644
@@ -6,7 +6,7 @@
  */
 
 #include <linux/slab.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include "idset.h"
 #include "css.h"
 
drivers/s390/net/claw.c +1 -1
index 023455a..cea28a4 100644
@@ -59,13 +59,13 @@
  *    1.15  Changed for 2.6 Kernel  No longer compiles on 2.4 or lower
  *    1.25  Added Packing support
  */
-#include <asm/bitops.h>
 #include <asm/ccwdev.h>
 #include <asm/ccwgroup.h>
 #include <asm/debug.h>
 #include <asm/idals.h>
 #include <asm/io.h>
 
+#include <linux/bitops.h>
 #include <linux/ctype.h>
 #include <linux/delay.h>
 #include <linux/errno.h>
drivers/scsi/ide-scsi.c +1 -1
index c05b291..948a7fc 100644
@@ -47,9 +47,9 @@
 #include <linux/scatterlist.h>
 #include <linux/delay.h>
 #include <linux/mutex.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 
 #include <scsi/scsi.h>
drivers/serial/crisv10.c +1 -1
index 312bef6..1e9a35a 100644
@@ -442,11 +442,11 @@ static char *serial_version = "$Revision: 1.25 $";
 #include <asm/uaccess.h>
 #include <linux/kernel.h>
 #include <linux/mutex.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
 #include <linux/delay.h>
 
 #include <asm/arch/svinto.h>
drivers/watchdog/at91rm9200_wdt.c +1 -1
index 38bd373..a684b1e 100644
@@ -9,6 +9,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/init.h>
@@ -19,7 +20,6 @@
 #include <linux/platform_device.h>
 #include <linux/types.h>
 #include <linux/watchdog.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 #include <asm/arch/at91_st.h>
 
drivers/watchdog/ks8695_wdt.c +1 -1
index 7150fb9..e3a29c3 100644
@@ -8,6 +8,7 @@
  * published by the Free Software Foundation.
  */
 
+#include <linux/bitops.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
 #include <linux/init.h>
@@ -18,7 +19,6 @@
 #include <linux/platform_device.h>
 #include <linux/types.h>
 #include <linux/watchdog.h>
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/arch/regs-timer.h>
drivers/watchdog/omap_wdt.c +1 -1
index 719b066..635ca45 100644
@@ -39,11 +39,11 @@
 #include <linux/platform_device.h>
 #include <linux/moduleparam.h>
 #include <linux/clk.h>
+#include <linux/bitops.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
 #include <asm/hardware.h>
-#include <asm/bitops.h>
 
 #include <asm/arch/prcm.h>
 
drivers/watchdog/sa1100_wdt.c +1 -1
index 3475f47..34a2b3b 100644
@@ -25,13 +25,13 @@
 #include <linux/miscdevice.h>
 #include <linux/watchdog.h>
 #include <linux/init.h>
+#include <linux/bitops.h>
 
 #ifdef CONFIG_ARCH_PXA
 #include <asm/arch/pxa-regs.h>
 #endif
 
 #include <asm/hardware.h>
-#include <asm/bitops.h>
 #include <asm/uaccess.h>
 
 #define OSCR_FREQ		CLOCK_TICK_RATE
fs/reiser4/jnode.h +1 -1
index 59b29de..97a8438 100644
@@ -21,7 +21,7 @@
 #include <linux/mm.h>
 #include <linux/spinlock.h>
 #include <asm/atomic.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <linux/list.h>
 #include <linux/rcupdate.h>
 
fs/reiser4/plugin/space/bitmap.c +1 -1
index a0ff17a..e2ae346 100644
@@ -171,7 +171,7 @@ static int find_next_zero_bit_in_word(ulong_t word, int start_bit)
 	return i;
 }
 
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 
 #if BITS_PER_LONG == 64
 
include/asm-cris/posix_types.h +1 -1
index 7b9ed22..92000d0 100644
@@ -52,7 +52,7 @@ typedef struct {
 } __kernel_fsid_t;
 
 #ifdef __KERNEL__
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 
 #undef	__FD_SET
 #define __FD_SET(fd,fdsetp) set_bit(fd, (void *)(fdsetp))
include/asm-i386/pgtable.h +1 -4
index ae8d9c2..ee53ccd 100644
@@ -17,10 +17,7 @@
 #include <linux/threads.h>
 #include <asm/paravirt.h>
 
-#ifndef _I386_BITOPS_H
-#include <asm/bitops.h>
-#endif
-
+#include <linux/bitops.h>
 #include <linux/slab.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
include/asm-i386/smp.h +1 -1
index 6e1e327..e10b7af 100644
@@ -11,7 +11,7 @@
 #endif
 
 #if defined(CONFIG_X86_LOCAL_APIC) && !defined(__ASSEMBLY__)
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/mpspec.h>
 #include <asm/apic.h>
 #ifdef CONFIG_X86_IO_APIC
include/asm-ia64/cacheflush.h +1 -1
index 4906916..afcfbda 100644
@@ -7,8 +7,8 @@
  */
 
 #include <linux/page-flags.h>
+#include <linux/bitops.h>
 
-#include <asm/bitops.h>
 #include <asm/page.h>
 
 /*
include/asm-ia64/pgtable.h +1 -1
index 0971ec9..e6204f1 100644
@@ -150,7 +150,7 @@
 # ifndef __ASSEMBLY__
 
 #include <linux/sched.h>	/* for mm_struct */
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/cacheflush.h>
 #include <asm/mmu_context.h>
 #include <asm/processor.h>
include/asm-ia64/smp.h +1 -1
index 6314b29..8f1e858 100644
@@ -14,8 +14,8 @@
 #include <linux/threads.h>
 #include <linux/kernel.h>
 #include <linux/cpumask.h>
+#include <linux/bitops.h>
 
-#include <asm/bitops.h>
 #include <asm/io.h>
 #include <asm/param.h>
 #include <asm/processor.h>
include/asm-ia64/spinlock.h +1 -1
index ff857e3..0229fb9 100644
@@ -11,9 +11,9 @@
 
 #include <linux/compiler.h>
 #include <linux/kernel.h>
+#include <linux/bitops.h>
 
 #include <asm/atomic.h>
-#include <asm/bitops.h>
 #include <asm/intrinsics.h>
 #include <asm/system.h>
 
include/asm-m32r/pgtable.h +1 -1
index 92d7266..8650538 100644
@@ -21,9 +21,9 @@
 #ifndef __ASSEMBLY__
 
 #include <linux/threads.h>
+#include <linux/bitops.h>
 #include <asm/processor.h>
 #include <asm/addrspace.h>
-#include <asm/bitops.h>
 #include <asm/page.h>
 
 struct mm_struct;
include/asm-mips/fpu.h +1 -1
index 483685b..e59d4c0 100644
@@ -12,12 +12,12 @@
 
 #include <linux/sched.h>
 #include <linux/thread_info.h>
+#include <linux/bitops.h>
 
 #include <asm/mipsregs.h>
 #include <asm/cpu.h>
 #include <asm/cpu-features.h>
 #include <asm/hazards.h>
-#include <asm/bitops.h>
 #include <asm/processor.h>
 #include <asm/current.h>
 
include/asm-parisc/pgtable.h +1 -1
index 33ed0e7..3267ed0 100644
@@ -11,9 +11,9 @@
  */
 
 #include <linux/mm.h>		/* for vm_area_struct */
+#include <linux/bitops.h>
 #include <asm/processor.h>
 #include <asm/cache.h>
-#include <asm/bitops.h>
 
 /*
  * kern_addr_valid(ADDR) tests if ADDR is pointing to valid kernel
include/asm-powerpc/iommu.h +1 -1
index 870967e..4a82fdc 100644
@@ -26,9 +26,9 @@
 #include <linux/spinlock.h>
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
+#include <linux/bitops.h>
 #include <asm/machdep.h>
 #include <asm/types.h>
-#include <asm/bitops.h>
 
 #define IOMMU_PAGE_SHIFT      12
 #define IOMMU_PAGE_SIZE       (ASM_CONST(1) << IOMMU_PAGE_SHIFT)
include/asm-powerpc/mmu_context.h +1 -1
index f863ac2..9102b8b 100644
@@ -8,7 +8,7 @@
 
 #ifndef CONFIG_PPC64
 #include <asm/atomic.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 
 /*
  * On 32-bit PowerPC 6xx/7xx/7xxx CPUs, we use a set of 16 VSIDs
include/asm-ppc/mmu_context.h +2 -1
index a6441a0..b2e25d8 100644
@@ -2,8 +2,9 @@
 #ifndef __PPC_MMU_CONTEXT_H
 #define __PPC_MMU_CONTEXT_H
 
+#include <linux/bitops.h>
+
 #include <asm/atomic.h>
-#include <asm/bitops.h>
 #include <asm/mmu.h>
 #include <asm/cputable.h>
 #include <asm-generic/mm_hooks.h>
include/asm-sparc64/smp.h +1 -1
index e8a96a3..60f67fe 100644
@@ -26,7 +26,7 @@
  *	Private routines/data
  */
  
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/atomic.h>
 
 extern cpumask_t cpu_sibling_map[NR_CPUS];
include/asm-x86_64/pgtable.h +1 -1
index 0bea3e7..da31726 100644
@@ -9,7 +9,7 @@
  * the x86-64 page table tree.
  */
 #include <asm/processor.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <linux/threads.h>
 #include <asm/pda.h>
 
include/asm-x86_64/topology.h +1 -1
index 24e9bce..ca33dc8 100644
@@ -5,7 +5,7 @@
 #ifdef CONFIG_NUMA
 
 #include <asm/mpspec.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 
 extern cpumask_t cpu_online_map;
 
include/linux/of.h +1 -1
index 6df80e9..5c39b92 100644
@@ -16,8 +16,8 @@
  * 2 of the License, or (at your option) any later version.
  */
 #include <linux/types.h>
+#include <linux/bitops.h>
 
-#include <asm/bitops.h>
 #include <asm/prom.h>
 
 /* flag descriptions */
lib/hweight.c +1 -1
index 360556a..389424e 100644
@@ -1,6 +1,6 @@
 #include <linux/module.h>
+#include <linux/bitops.h>
 #include <asm/types.h>
-#include <asm/bitops.h>
 
 /**
  * hweightN - returns the hamming weight of a N-bit word
net/core/gen_estimator.c +1 -1
index 590a767..daadbcc 100644
@@ -15,7 +15,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
net/core/pktgen.c +1 -1
index 91bdacb..65f2ac0 100644
@@ -157,7 +157,7 @@
 #endif
 #include <asm/byteorder.h>
 #include <linux/rcupdate.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <asm/io.h>
 #include <asm/dma.h>
 #include <asm/uaccess.h>
net/ipv4/fib_trie.c +1 -1
index 52b2891..13ca0e3 100644
@@ -54,7 +54,7 @@
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
-#include <asm/bitops.h>
+#include <linux/bitops.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/mm.h>
net/netfilter/xt_connbytes.c +1 -1
index dd4d79b..0601aea 100644
@@ -2,13 +2,13 @@
  * GPL (C) 2002 Martin Devera ([email protected]).
  */
 #include <linux/module.h>
+#include <linux/bitops.h>
 #include <linux/skbuff.h>
 #include <linux/netfilter/x_tables.h>
 #include <linux/netfilter/xt_connbytes.h>
 #include <net/netfilter/nf_conntrack.h>
 
 #include <asm/div64.h>
-#include <asm/bitops.h>
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Harald Welte <[email protected]>");
author
#1 lore raw

PATCH 2/2 forbid asm/bitops.h direct inclusion

forbid asm/bitops.h direct inclusion

Because of compile errors that may occur after bit changes if asm/bitops.h is included directly without e.g. linux/kernel.h which includes linux/bitops.h, forbid direct inclusion of asm/bitops.h. Thanks to Adrian Bunk.

---
commit cd28a228ae727b2224da736edc613c58a08c5ed9
tree 483ca1765baaf80996484889ed3078c4af24be03
parent 3c05eef3d0a98065323d7d6d9a78e0985eba4b10
author Jiri Slaby <[email protected]> Sat, 08 Sep 2007 21:02:48 +0200 committer Jiri Slaby <[email protected]> Sat, 08 Sep 2007 21:02:48 +0200

 include/asm-alpha/bitops.h     |    4 ++++
 include/asm-arm/bitops.h       |    4 ++++
 include/asm-avr32/bitops.h     |    4 ++++
 include/asm-blackfin/bitops.h  |    4 ++++
 include/asm-cris/bitops.h      |    4 ++++
 include/asm-frv/bitops.h       |    4 ++++
 include/asm-generic/bitops.h   |    4 ++++
 include/asm-h8300/bitops.h     |    5 +++++
 include/asm-i386/bitops.h      |    4 ++++
 include/asm-ia64/bitops.h      |    4 ++++
 include/asm-m32r/bitops.h      |    4 ++++
 include/asm-m68k/bitops.h      |    4 ++++
 include/asm-m68knommu/bitops.h |    4 ++++
 include/asm-mips/bitops.h      |    4 ++++
 include/asm-parisc/bitops.h    |    4 ++++
 include/asm-powerpc/bitops.h   |    4 ++++
 include/asm-s390/bitops.h      |    4 ++++
 include/asm-sh/bitops.h        |    5 +++++
 include/asm-sh64/bitops.h      |    5 +++++
 include/asm-sparc/bitops.h     |    4 ++++
 include/asm-sparc64/bitops.h   |    4 ++++
 include/asm-um/bitops.h        |    4 ++++
 include/asm-v850/bitops.h      |    3 +++
 include/asm-x86_64/bitops.h    |    4 ++++
 include/asm-xtensa/bitops.h    |    4 ++++
 25 files changed, 102 insertions(+), 0 deletions(-)
include/asm-alpha/bitops.h +4 -0
index ffec8a8..6490e50 100644
@@ -1,6 +1,10 @@
 #ifndef _ALPHA_BITOPS_H
 #define _ALPHA_BITOPS_H
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm/compiler.h>
 
 /*
include/asm-arm/bitops.h +4 -0
index 52fe058..47a6b08 100644
@@ -19,6 +19,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/system.h>
 
include/asm-avr32/bitops.h +4 -0
index f3faddf..1a50b69 100644
@@ -8,6 +8,10 @@
 #ifndef __ASM_AVR32_BITOPS_H
 #define __ASM_AVR32_BITOPS_H
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm/byteorder.h>
 #include <asm/system.h>
 
include/asm-blackfin/bitops.h +4 -0
index 03ecedc..b39a175 100644
@@ -11,6 +11,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm-generic/bitops/ffs.h>
 #include <asm-generic/bitops/__ffs.h>
 #include <asm-generic/bitops/sched.h>
include/asm-cris/bitops.h +4 -0
index 617151b..e2f49c2 100644
@@ -14,6 +14,10 @@
 /* Currently this is unsuitable for consumption outside the kernel.  */
 #ifdef __KERNEL__ 
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm/arch/bitops.h>
 #include <asm/system.h>
 #include <asm/atomic.h>
include/asm-frv/bitops.h +4 -0
index 8dba74b..e29de71 100644
@@ -21,6 +21,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm-generic/bitops/ffz.h>
 
 /*
include/asm-generic/bitops.h +4 -0
index e022a0f..15e6f25 100644
@@ -19,6 +19,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm-generic/bitops/sched.h>
 #include <asm-generic/bitops/ffs.h>
 #include <asm-generic/bitops/hweight.h>
include/asm-h8300/bitops.h +5 -0
index e64ad31..cb18e3b 100644
@@ -10,6 +10,11 @@
 #include <asm/system.h>
 
 #ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 /*
  * Function prototypes to keep gcc -Wall happy
  */
include/asm-i386/bitops.h +4 -0
index c96641f..3268a34 100644
@@ -5,6 +5,10 @@
  * Copyright 1992, Linus Torvalds.
  */
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/alternative.h>
 
include/asm-ia64/bitops.h +4 -0
index 2144f1a..a977aff 100644
@@ -9,6 +9,10 @@
  * O(1) scheduler patch
  */
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <linux/types.h>
 #include <asm/intrinsics.h>
include/asm-m32r/bitops.h +4 -0
index 313a02c..6dc9b81 100644
@@ -11,6 +11,10 @@
  *    Copyright (C) 2004  Hirokazu Takata <takata at linux-m32r.org>
  */
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/assembler.h>
 #include <asm/system.h>
include/asm-m68k/bitops.h +4 -0
index da151f7..2976b5d 100644
@@ -8,6 +8,10 @@
  * for more details.
  */
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 
 /*
include/asm-m68knommu/bitops.h +4 -0
index b8b2770..f8dfb7b 100644
@@ -10,6 +10,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm-generic/bitops/ffs.h>
 #include <asm-generic/bitops/__ffs.h>
 #include <asm-generic/bitops/sched.h>
include/asm-mips/bitops.h +4 -0
index d00738e..3b773eb 100644
@@ -9,6 +9,10 @@
 #ifndef _ASM_BITOPS_H
 #define _ASM_BITOPS_H
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <linux/irqflags.h>
 #include <linux/types.h>
include/asm-parisc/bitops.h +4 -0
index 03ae287..f8eebcb 100644
@@ -1,6 +1,10 @@
 #ifndef _PARISC_BITOPS_H
 #define _PARISC_BITOPS_H
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/types.h>		/* for BITS_PER_LONG/SHIFT_PER_LONG */
 #include <asm/byteorder.h>
include/asm-powerpc/bitops.h +4 -0
index 27f6106..3c14f0d 100644
@@ -38,6 +38,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/asm-compat.h>
 #include <asm/synch.h>
include/asm-s390/bitops.h +4 -0
index d756b34..34d9a63 100644
@@ -15,6 +15,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 
 /*
include/asm-sh/bitops.h +5 -0
index 9d70217..df805f2 100644
@@ -2,6 +2,11 @@
 #define __ASM_SH_BITOPS_H
 
 #ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm/system.h>
 /* For __swab32 */
 #include <asm/byteorder.h>
include/asm-sh64/bitops.h +5 -0
index 444d5ea..600c59e 100644
@@ -13,6 +13,11 @@
  */
 
 #ifdef __KERNEL__
+
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/system.h>
 /* For __swab32 */
include/asm-sparc/bitops.h +4 -0
index 00bd0a6..cb3cefa 100644
@@ -14,6 +14,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 extern unsigned long ___set_bit(unsigned long *addr, unsigned long mask);
 extern unsigned long ___clear_bit(unsigned long *addr, unsigned long mask);
 extern unsigned long ___change_bit(unsigned long *addr, unsigned long mask);
include/asm-sparc64/bitops.h +4 -0
index dd4bfe9..982ce89 100644
@@ -7,6 +7,10 @@
 #ifndef _SPARC64_BITOPS_H
 #define _SPARC64_BITOPS_H
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <linux/compiler.h>
 #include <asm/byteorder.h>
 
include/asm-um/bitops.h +4 -0
index 46d7819..e4d38d4 100644
@@ -1,6 +1,10 @@
 #ifndef __UM_BITOPS_H
 #define __UM_BITOPS_H
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include "asm/arch/bitops.h"
 
 #endif
include/asm-v850/bitops.h +3 -0
index 8eafdb1..f82f5b4 100644
@@ -13,6 +13,9 @@
 #ifndef __V850_BITOPS_H__
 #define __V850_BITOPS_H__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
 
 #include <linux/compiler.h>	/* unlikely  */
 #include <asm/byteorder.h>	/* swab32 */
include/asm-x86_64/bitops.h +4 -0
index 2607dbc..4dbf36d 100644
@@ -5,6 +5,10 @@
  * Copyright 1992, Linus Torvalds.
  */
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm/alternative.h>
 
 #if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 1)
include/asm-xtensa/bitops.h +4 -0
index 78db04c..23261e8 100644
@@ -15,6 +15,10 @@
 
 #ifdef __KERNEL__
 
+#ifndef _LINUX_BITOPS_H
+#error only <linux/bitops.h> can be included directly
+#endif
+
 #include <asm/processor.h>
 #include <asm/byteorder.h>
 #include <asm/system.h>
#4 lore raw
In reply to Jiri Slaby
Quoted 3 lines · Jiri Slaby

remove asm/bitops.h includes

including asm/bitops directly may cause compile errors.

When does it cause compile errors? It would be probably less intrusive to just fix that case.

-Andi

author
#5 lore raw
Quoted 8 lines · Andi Kleen
Quoted 3 lines · Jiri Slaby

remove asm/bitops.h includes

including asm/bitops directly may cause compile errors.

When does it cause compile errors? It would be probably less intrusive to just fix that case.

On ppc defconfig build, IIRC, the result is unpredictable (it can still occur in some specific configurations) if it is not changed all, I think. But if everybody agrees, I can fix only the ppc build.

thanks.

Signature · 2 lines
Jiri Slaby ([email protected])
Faculty of Informatics, Masaryk University
#6 lore raw
In reply to Andi Kleen
Quoted 8 lines · Andi Kleen
Quoted 3 lines · Jiri Slaby

remove asm/bitops.h includes

including asm/bitops directly may cause compile errors.

When does it cause compile errors? It would be probably less intrusive to just fix that case.

In -mm, include/asm-generic/bitops/non-atomic.h requires stuff from include/linux/bitops.h

And it's generally better to have all users consistently use the linux/ headers instead of some using the linux/ headers and some the asm/ headers.

Quoted 1 line

-Andi

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw

Re: [PATCH 2/2] forbid asm/bitops.h direct inclusion

In reply to Jiri Slaby
Quoted 5 lines · Jiri Slaby

forbid asm/bitops.h direct inclusion

Because of compile errors that may occur after bit changes if asm/bitops.h is included directly without e.g. linux/kernel.h which includes linux/bitops.h, forbid direct inclusion of asm/bitops.h. Thanks to Adrian Bunk.

This is the kind of thing that checkpatch.pl is already checking for and I like that idea much more than adding thousands of checks over many of the header files under asm.

Ralf

#3 lore raw

Re: [PATCH 2/2] forbid asm/bitops.h direct inclusion

In reply to Ralf Baechle
Quoted 11 lines · Ralf Baechle
Quoted 5 lines · Jiri Slaby

forbid asm/bitops.h direct inclusion

Because of compile errors that may occur after bit changes if asm/bitops.h is included directly without e.g. linux/kernel.h which includes linux/bitops.h, forbid direct inclusion of asm/bitops.h. Thanks to Adrian Bunk.

This is the kind of thing that checkpatch.pl is already checking for and I like that idea much more than adding thousands of checks over many of the header files under asm.

Checks in the header are only for header files where including only the asm header doesn't work which doesn't seem to be the common case.

Quoted 1 line

Ralf

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed