linux/drivers/net/wireless/wl12xx
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
..
Kconfig wl1271: depend on INET 2009-11-04 18:44:42 -05:00
Makefile wl1271: Moved common IO functions from wl271_spi.c to wl1271_io.c 2010-02-19 15:52:47 -05:00
wl12xx_80211.h wl1271: fix endianess issues 2009-10-27 16:48:19 -04:00
wl1251.h mac80211: wait for beacon before enabling powersave 2010-01-26 11:53:21 -05:00
wl1251_acx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_acx.h wl1251: implement wl1251_acx_tid_cfg() 2009-12-21 18:55:57 -05:00
wl1251_boot.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_boot.h wl1251: remove wl1251_ops 2009-08-14 09:13:38 -04:00
wl1251_cmd.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_cmd.h wl1251: use mac80211 provided channel parameters in scanning 2010-01-12 13:51:26 -05:00
wl1251_debugfs.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_debugfs.h wl1251: use wl1251 prefix everywhere 2009-07-10 14:57:50 -04:00
wl1251_event.c wl1251: Increase the beacon loss timeout value and handle regain event 2009-11-18 17:09:22 -05:00
wl1251_event.h wl1251: use wl1251 prefix everywhere 2009-07-10 14:57:50 -04:00
wl1251_init.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_init.h wl1251: implement acx_ac_cfg to configure hardware queues 2009-12-21 18:55:55 -05:00
wl1251_io.c wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_io.h wl1251: make wl1251_set_partition bus agnostic 2009-08-14 09:13:37 -04:00
wl1251_main.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_ps.c wl1251: simplify ELP wakeup time calculation 2009-12-21 18:55:52 -05:00
wl1251_ps.h wl1251: Implement delayed entry into ELP mode 2009-11-18 17:09:20 -05:00
wl1251_reg.h wl1251: add NVS in EEPROM support 2009-11-18 17:09:24 -05:00
wl1251_rx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_rx.h wl12xx: fix spelling 2009-07-24 15:05:26 -04:00
wl1251_sdio.c wl1251: remove Luciano as maintainer 2009-08-14 09:13:42 -04:00
wl1251_spi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1251_spi.h wl1251: rename reg.h to wl1251_reg.h 2009-08-14 09:13:41 -04:00
wl1251_tx.c wl1251: update tx_hdr when aliging skb in tx 2009-12-21 18:56:00 -05:00
wl1251_tx.h wl1251: enable WMM 2009-12-21 18:56:02 -05:00
wl1271.h wl1271: add testmode support 2010-02-19 15:52:47 -05:00
wl1271_acx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_acx.h wl1271: Fix beacon filter table configuration 2010-02-19 15:52:46 -05:00
wl1271_boot.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_boot.h wl1271: RefClk configuration 2009-10-27 16:48:04 -04:00
wl1271_cmd.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_cmd.h wl1271: Use NVS INI file configuration 2010-02-19 15:52:43 -05:00
wl1271_conf.h wl1271: Use NVS INI file configuration 2010-02-19 15:52:43 -05:00
wl1271_debugfs.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_debugfs.h wl1271: add wl1271 driver files 2009-08-14 09:12:46 -04:00
wl1271_event.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_event.h wl1271: Fix event acknowledging functionality 2009-12-28 16:31:34 -05:00
wl1271_init.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_init.h wl1271: add most of the normal initialization commands to PLT mode 2010-02-19 15:52:44 -05:00
wl1271_io.c wl1271: Added IO reset and init functions 2010-02-19 15:52:47 -05:00
wl1271_io.h wl1271: Added IO reset and init functions 2010-02-19 15:52:47 -05:00
wl1271_main.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_ps.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_ps.h wl1271: Fix PSM entry 2010-02-19 15:52:42 -05:00
wl1271_reg.h wl1271: remove unused flags 2010-01-14 18:16:54 -05:00
wl1271_rx.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_rx.h wl1271: fix endianess issues 2009-10-27 16:48:19 -04:00
wl1271_spi.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_spi.h wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_testmode.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
wl1271_testmode.h wl1271: add testmode support 2010-02-19 15:52:47 -05:00
wl1271_tx.c wl1271: Renamed IO functions 2010-02-19 15:52:47 -05:00
wl1271_tx.h wl1271: implement WMM 2010-02-19 15:52:43 -05:00