android_kernel_xiaomi_sm8350/drivers/media/dvb/frontends
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
..
af9013_priv.h
af9013.c
af9013.h V4L/DVB: af901x: inform NXP TDA18218 tuner as know but not supported 2010-02-26 15:10:58 -03:00
atbm8830_priv.h V4L/DVB (13374): AltoBeam ATBM8830 GB20600-2006(DMB-TH) demodulator 2009-12-05 18:41:34 -02:00
atbm8830.c V4L/DVB (13838): atbm8830: use AGC setting from config 2010-02-26 15:10:25 -03:00
atbm8830.h V4L/DVB (13374): AltoBeam ATBM8830 GB20600-2006(DMB-TH) demodulator 2009-12-05 18:41:34 -02:00
au8522_decoder.c V4L/DVB (13688): au8522: modify the attributes of local filter coefficients 2009-12-16 09:27:58 -02:00
au8522_dig.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
au8522_priv.h V4L/DVB (13187): au8522: add support for saturation and hue controls 2009-12-05 18:40:48 -02:00
au8522.h
bcm3510_priv.h
bcm3510.c
bcm3510.h
bsbe1.h
bsru6.h
cx22700.c
cx22700.h
cx22702.c
cx22702.h
cx24110.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
cx24110.h
cx24113.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
cx24113.h
cx24116.c
cx24116.h
cx24123.c
cx24123.h
dib0070.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
dib0070.h V4L/DVB (13583): DiB8090: Add the DiB0090 tuner driver and STK8096GP-board 2009-12-16 00:18:16 -02:00
dib0090.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
dib0090.h V4L/DVB (13684): Fix some cut-and-paste noise in dib0090.h 2009-12-16 09:27:54 -02:00
dib3000.h
dib3000mb_priv.h
dib3000mb.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
dib3000mc.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
dib3000mc.h
dib7000m.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
dib7000m.h
dib7000p.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
dib7000p.h V4L/DVB (13212): fix gcc-4.3.3 compilation error at dib7000p_pid_filter(): missing parameter name 2009-12-05 18:40:55 -02:00
dib8000.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
dib8000.h V4L/DVB (13834): dib8000: fix compilation if !DVB_DIB8000 2010-01-17 11:31:35 -02:00
dibx000_common.c V4L/DVB: dvb: fix sparse warnings 2010-02-26 15:11:02 -03:00
dibx000_common.h V4L/DVB (13584): DiBXXX0: fix most of the Codingstyle violations from the previous patch 2009-12-16 00:18:16 -02:00
drx397xD_fw.h
drx397xD.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
drx397xD.h
ds3000.c V4L/DVB (13493): TeVii S470 and TBS 6920 fixes 2009-12-05 18:42:08 -02:00
ds3000.h V4L/DVB (13493): TeVii S470 and TBS 6920 fixes 2009-12-05 18:42:08 -02:00
dvb_dummy_fe.c
dvb_dummy_fe.h
dvb-pll.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
dvb-pll.h
ec100_priv.h V4L/DVB (13363): ec100: add new driver for E3C EC100 DVB-T demodulator 2009-12-05 18:41:32 -02:00
ec100.c V4L/DVB (13363): ec100: add new driver for E3C EC100 DVB-T demodulator 2009-12-05 18:41:32 -02:00
ec100.h V4L/DVB (13363): ec100: add new driver for E3C EC100 DVB-T demodulator 2009-12-05 18:41:32 -02:00
eds1547.h
isl6405.c
isl6405.h
isl6421.c
isl6421.h
isl6423.c
isl6423.h
itd1000_priv.h
itd1000.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
itd1000.h
Kconfig V4L/DVB (13808): [Mantis/Hopper] Build update for Mantis/Hopper based cards 2010-01-17 11:55:45 -02:00
l64781.c V4L/DVB: dvb: l64781.ko broken with gcc 4.5 2010-02-19 03:19:01 -02:00
l64781.h
lgdt330x_priv.h
lgdt330x.c tree-wide: fix assorted typos all over the place 2009-12-04 15:39:55 +01:00
lgdt330x.h
lgdt3304.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
lgdt3304.h
lgdt3305.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
lgdt3305.h V4L/DVB (13820): lgdt3305: make one-bit bitfields unsigned 2010-01-17 11:31:34 -02:00
lgs8gl5.c
lgs8gl5.h
lgs8gxx_priv.h
lgs8gxx.c V4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible 2009-12-16 09:27:50 -02:00
lgs8gxx.h
lnbh24.h
lnbp21.c V4L/DVB: 22-kHz set_tone fix for NetUP Dual DVB-S2-CI card. 22kHz logic controlled by demod 2010-02-26 15:10:41 -03:00
lnbp21.h
Makefile V4L/DVB (13808): [Mantis/Hopper] Build update for Mantis/Hopper based cards 2010-01-17 11:55:45 -02:00
mb86a16_priv.h V4L/DVB (13811): [MB86A16] Update Copyright header 2010-01-17 11:55:45 -02:00
mb86a16.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
mb86a16.h V4L/DVB (13811): [MB86A16] Update Copyright header 2010-01-17 11:55:45 -02:00
mt312_priv.h
mt312.c
mt312.h
mt352_priv.h
mt352.c
mt352.h
nxt200x.c
nxt200x.h
nxt6000_priv.h
nxt6000.c
nxt6000.h
or51132.c
or51132.h
or51211.c
or51211.h
s5h1409.c V4L/DVB (13332): s5h1409: remove a set register that would cause lock to be lost. 2009-12-05 18:41:23 -02:00
s5h1409.h V4L/DVB (13329): s5h1409: provide HVR-1600 specific optimizations 2009-12-05 18:41:22 -02:00
s5h1411.c
s5h1411.h
s5h1420_priv.h
s5h1420.c
s5h1420.h
s921_core.c
s921_core.h
s921_module.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
s921_module.h
si21xx.c V4L/DVB (13969): frontends/si21xx.c: Remove #define TRUE/FALSE, use bool 2010-02-26 15:10:35 -03:00
si21xx.h
sp887x.c
sp887x.h
sp8870.c
sp8870.h
stb0899_algo.c
stb0899_cfg.h
stb0899_drv.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
stb0899_drv.h
stb0899_priv.h
stb0899_reg.h
stb6000.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
stb6000.h
stb6100_cfg.h
stb6100_proc.h V4L/DVB (13407): Add Prof 7301 PCI DVB-S2 card 2009-12-05 18:41:43 -02:00
stb6100.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
stb6100.h
stv090x_priv.h V4L/DVB (13976): [STV090x] Added mutex protection around tuner I2C access. 2010-02-26 15:10:36 -03:00
stv090x_reg.h V4L/DVB (13352): stv090x: fixes errors and typos in register definitions 2009-12-05 18:41:28 -02:00
stv090x.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
stv090x.h V4L/DVB (13988): [STV090x] Configuration parameters adc1_range, adc2_range, tuner_bbgain 2010-02-26 15:10:38 -03:00
stv0288.c
stv0288.h
stv0297.c
stv0297.h
stv0299.c
stv0299.h
stv0900_core.c V4L/DVB: drivers/media: Correct NULL test 2010-02-26 15:10:57 -03:00
stv0900_init.h V4L/DVB (13338): stv0900: big rework to support cut 3.0. 2009-12-05 18:41:25 -02:00
stv0900_priv.h V4L/DVB (13818): Add Prof 7500 DVB-S2 USB card 2010-02-26 15:10:24 -03:00
stv0900_reg.h V4L/DVB (13818): Add Prof 7500 DVB-S2 USB card 2010-02-26 15:10:24 -03:00
stv0900_sw.c V4L/DVB: STV0900 Cut 3.0 AGC2 fix for NetUP Dual DVB-S2-CI card 2010-02-26 15:10:56 -03:00
stv0900.h V4L/DVB (13818): Add Prof 7500 DVB-S2 USB card 2010-02-26 15:10:24 -03:00
stv6110.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
stv6110.h V4L/DVB (13334): stv6110: add configurable gain 2009-12-05 18:41:23 -02:00
stv6110x_priv.h V4L/DVB (13981): [STV6110x] Add a local register map for each instance of the driver. 2010-02-26 15:10:36 -03:00
stv6110x_reg.h
stv6110x.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
stv6110x.h V4L/DVB (13983): [STV6110x] add clk_div member to stv6110x_config structure 2010-02-26 15:10:37 -03:00
tda665x.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
tda665x.h V4L/DVB (13809): Fix Checkpatch violations 2010-01-17 11:55:44 -02:00
tda826x.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
tda826x.h
tda1002x.h
tda1004x.c
tda1004x.h
tda8083.c
tda8083.h
tda8261_cfg.h
tda8261.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
tda8261.h
tda10021.c V4L/DVB (13791): [TDA10021] Do not claim TDA10023 2010-01-17 11:55:42 -02:00
tda10023.c
tda10048.c
tda10048.h
tda10086.c
tda10086.h
tdhd1.h
tua6100.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
tua6100.h
ves1x93.c
ves1x93.h
ves1820.c
ves1820.h
z0194a.h
zl10036.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
zl10036.h
zl10039.c V4L/DVB (13965): zl10039, jump to error on error 2010-02-26 15:10:35 -03:00
zl10039.h
zl10353_priv.h
zl10353.c
zl10353.h