2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-26 22:24:09 +08:00
linux-next/drivers/input/touchscreen
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
..
88pm860x-ts.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
ad7877.c Input: ad7877 - increase pen up imeout 2010-03-09 22:13:30 -08:00
ad7879.c Input: ad7879 - support auxiliary GPIOs via gpiolib 2010-01-19 00:31:51 -08:00
ads7846.c Input: ads7846 - add wakeup support 2010-03-11 00:02:43 -08:00
atmel_tsadcc.c Input: atmel_tsadcc - use platform parameters 2009-11-20 00:55:21 -08:00
atmel-wm97xx.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
corgi_ts.c Merge branch 'for-rmk' of git://git.pengutronix.de/git/imx/linux-2.6 into devel 2009-03-13 21:44:51 +00:00
da9034-ts.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
dynapro.c Input: add driver for Dynapro serial touchscreen 2009-10-26 11:01:30 -07:00
eeti_ts.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
elo.c Input: elo - switch to using dev_xxx() when printing messages 2010-01-06 23:54:40 -08:00
fujitsu_ts.c get rid of input BIT* duplicate defines 2007-10-19 11:53:42 -07:00
gunze.c Input: remove CVS keywords 2008-05-20 12:17:39 -04:00
h3600_ts_input.c Input: serio - don't use serio->write() directly 2009-08-05 00:43:43 -07:00
hp680_ts_input.c sh: Migrate common board headers to mach-common/. 2008-10-20 13:02:48 +09:00
htcpen.c Input: add HTC Shift Touchscreen Driver 2008-06-02 00:38:35 -04:00
inexio.c Input: Add driver for iNexio serial touchscreen. 2008-06-30 09:37:32 -04:00
jornada720_ts.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
Kconfig Input: ads7846 - add support for AD7843 parts 2010-03-09 22:12:45 -08:00
mainstone-wm97xx.c Input: wm97xx - provide coordinate logs for accelerated I/O 2010-01-28 22:38:30 -08:00
Makefile input: Enable touch on 88pm860x 2010-03-07 22:17:05 +01:00
mc13783_ts.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
mcs5000_ts.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
migor_ts.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
mk712.c Input: drop redundant includes of moduleparam.h 2008-01-21 01:11:07 -05:00
mtouch.c get rid of input BIT* duplicate defines 2007-10-19 11:53:42 -07:00
pcap_ts.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
penmount.c get rid of input BIT* duplicate defines 2007-10-19 11:53:42 -07:00
s3c2410_ts.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
touchit213.c Input: add driver for Tabletkiosk Sahara TouchIT-213 touchscreen 2008-07-07 12:00:30 -04:00
touchright.c get rid of input BIT* duplicate defines 2007-10-19 11:53:42 -07:00
touchwin.c get rid of input BIT* duplicate defines 2007-10-19 11:53:42 -07:00
tsc2007.c Input: make i2c device ids constant 2010-01-09 23:28:33 -08:00
ucb1400_ts.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
usbtouchscreen.c Merge branch 'next' into for-linus 2010-02-28 23:55:20 -08:00
w90p910_ts.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
wacom_w8001.c Input: wacom_w8001 - simplify querying logic 2009-09-03 20:38:37 -07:00
wm97xx-core.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
wm9705.c Merge branch 'next' into for-linus 2008-10-15 23:29:12 -04:00
wm9712.c Merge branch 'next' into for-linus 2008-10-15 23:29:12 -04:00
wm9713.c Merge branch 'next' into for-linus 2008-10-15 23:29:12 -04:00
zylonite-wm97xx.c Input: wm97xx - provide coordinate logs for accelerated I/O 2010-01-28 22:38:30 -08:00