kernel-fxtec-pro1x/drivers/isdn/hisax
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
..
amd7930_fn.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
amd7930_fn.h fix file specification in comments 2006-10-03 23:01:26 +02:00
arcofi.c headers: remove sched.h from interrupt.h 2009-10-11 11:20:58 -07:00
arcofi.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
asuscom.c isdn: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:34 -07:00
avm_a1.c [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
avm_a1p.c isdn: fix section mismatch warning for ISACVer 2008-02-09 23:29:28 -08:00
avm_pci.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
avma1_cs.c isdn: Cleanup Sections in PCMCIA driver avma1 2010-03-25 11:58:01 -07:00
bkm_a4t.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
bkm_a8.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
bkm_ax.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
callc.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
config.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
diva.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
elsa.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
elsa_cs.c isdn: Cleanup Sections in PCMCIA driver elsa 2010-03-25 11:58:02 -07:00
elsa_ser.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
enternow_pci.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
fsm.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
fsm.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
gazel.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
hfc4s8s_l1.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
hfc4s8s_l1.h Fix misc .c/.h comment typos 2006-11-30 05:24:39 +01:00
hfc_2bds0.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
hfc_2bds0.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hfc_2bs0.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
hfc_2bs0.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hfc_pci.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
hfc_pci.h [PATCH] drivers/isdn/hisax/: possible cleanups 2005-06-25 16:25:07 -07:00
hfc_sx.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
hfc_sx.h [PATCH] drivers/isdn/hisax/: possible cleanups 2005-06-25 16:25:07 -07:00
hfc_usb.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
hfc_usb.h hisax: update hfc_usb driver 2007-08-21 10:14:28 -07:00
hfcscard.c drivers/isdn/hisax: fix sparse warning: Should it be static? 2009-02-27 01:00:42 -08:00
hisax.h PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
hisax_cfg.h [ISDN] HiSax: modularization prep 2008-04-20 18:22:30 -04:00
hisax_debug.h isdn: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:34 -07:00
hisax_fcpcipnp.c pnp: fix the fcpnp_driver declaration to only exist if CONFIG_PNP=y 2008-07-26 12:00:02 -07:00
hisax_fcpcipnp.h [PATCH] Eliminate __attribute__ ((packed)) warnings for gcc-4.1 2006-01-08 20:14:07 -08:00
hisax_if.h long vs. unsigned long - low-hanging fruits in drivers 2007-10-14 12:41:51 -07:00
hisax_isac.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
hisax_isac.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hscx.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
hscx.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
hscx_irq.c isdn: hisax: Fix test in waitforxfw 2009-11-04 08:31:19 -08:00
icc.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
icc.h [PATCH] hisax: fix usage of __init* 2006-07-10 13:24:15 -07:00
ipac.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
ipacx.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
ipacx.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
isac.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
isac.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
isar.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
isar.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
isdnl1.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
isdnl1.h [PATCH] drivers/isdn/hisax/: proper prototypes 2007-02-12 09:48:34 -08:00
isdnl2.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
isdnl2.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
isdnl3.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
isdnl3.h [PATCH] drivers/isdn/hisax/: proper prototypes 2007-02-12 09:48:34 -08:00
isurf.c [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
ix1_micro.c isdn: replace remaining __FUNCTION__ occurrences 2008-04-28 08:58:34 -07:00
jade.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
jade.h [PATCH] drivers/isdn/hisax/: possible cleanups 2005-06-25 16:25:07 -07:00
jade_irq.c [PATCH] Unlinline a bunch of other functions 2006-01-14 18:27:06 -08:00
Kconfig PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
l3_1tr6.c ISDN: ARRAY_SIZE changes 2009-07-25 20:23:05 +02:00
l3_1tr6.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
l3dss1.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
l3dss1.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
l3ni1.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
l3ni1.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
lmgr.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
Makefile ISDN: Make isdnhdlc usable for other ISDN drivers 2009-07-25 20:15:21 +02:00
mic.c [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
netjet.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
netjet.h [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
niccy.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
nj_s.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
nj_u.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
q931.c ISDN: ARRAY_SIZE changes 2009-07-25 20:23:05 +02:00
s0box.c [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
saphir.c [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
sedlbauer.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
sedlbauer_cs.c isdn: Cleanup Sections in PCMCIA driver sedlbauer 2010-03-25 11:58:00 -07:00
sportster.c [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
st5481.h ISDN: Make isdnhdlc usable for other ISDN drivers 2009-07-25 20:15:21 +02:00
st5481_b.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
st5481_d.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
st5481_init.c HiSax: fix error checking for hisax_register()] 2007-05-23 20:14:14 -07:00
st5481_usb.c ISDN: Add support for none reverse bitstreams to isdnhdc 2009-07-25 20:16:01 +02:00
tei.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
teleint.c [ISDN] Hisax: eliminate many unnecessary references to CardType[] 2008-04-20 18:22:31 -04:00
teles0.c drivers/isdn/hisax: fix sparse warning: Should it be static? 2009-02-27 01:00:42 -08:00
teles3.c drivers/isdn/hisax: fix sparse warning: Should it be static? 2009-02-27 01:00:42 -08:00
teles_cs.c isdn: Cleanup Sections in PCMCIA driver teles 2010-03-25 11:58:01 -07:00
telespci.c PCI: push deprecated pci_find_device() function to last user 2010-02-22 16:17:01 -08:00
w6692.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
w6692.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00