]> git.karo-electronics.de Git - karo-tx-linux.git/log
karo-tx-linux.git
13 years agousb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed
Paul Gortmaker [Fri, 27 May 2011 13:56:31 +0000 (09:56 -0400)]
usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed

With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.

Use the lightweight version of the header that has just THIS_MODULE
and EXPORT_SYMBOL variants.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agousb: Add module.h to drivers/usb consumers who really use it.
Paul Gortmaker [Sun, 3 Jul 2011 20:09:31 +0000 (16:09 -0400)]
usb: Add module.h to drivers/usb consumers who really use it.

The situation up to this point meant that module.h was pretty
much everywhere, regardless of whether you asked for it or not.
We are fixing that, so give the USB folks who want it an actual
include of it.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoscsi: Fix up files implicitly depending on module.h inclusion
Paul Gortmaker [Fri, 27 May 2011 13:47:43 +0000 (09:47 -0400)]
scsi: Fix up files implicitly depending on module.h inclusion

The module.h header was implicitly present everywhere, so files
with no explicit include of the module infrastructure would build
anyway.  We are now fixing the include bird's nest, and so we need
to call out the module.h file that we need explicitly.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoscsi: Fix files needing export.h since they use EXPORT_SYMBOL
Paul Gortmaker [Fri, 27 May 2011 13:37:25 +0000 (09:37 -0400)]
scsi: Fix files needing export.h since they use EXPORT_SYMBOL

They were implicitly getting it from device.h --> module.h but
we want to clean that up and untangle that mess.  So add the
minimal header for the exports.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopci: add module.h to files implicitly relying on its presence.
Paul Gortmaker [Fri, 27 May 2011 13:42:30 +0000 (09:42 -0400)]
pci: add module.h to files implicitly relying on its presence.

These were getting module.h implicitly from device.h but we want
to clean that up, so we fix it here to avoid things like:

pci/slot.c: In function ‘pci_hp_create_module_link’:
pci/slot.c:383: error: ‘module_kset’ undeclared (first use in this function)

Similarly, rpadlpar_core.c is modular, so add module.h to its includes.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopci: Fix files needing export.h since they use EXPORT_SYMBOL
Paul Gortmaker [Fri, 27 May 2011 13:37:25 +0000 (09:37 -0400)]
pci: Fix files needing export.h since they use EXPORT_SYMBOL

They were implicitly getting it from device.h --> module.h but
we want to clean that up and untangle that mess.  So add the
minimal header for the exports.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where needed
Paul Gortmaker [Sun, 17 Jul 2011 19:08:17 +0000 (15:08 -0400)]
sound: Add export.h for THIS_MODULE/EXPORT_SYMBOL where needed

These aren't modules, but they do make use of these macros, so
they will need export.h to get that definition.  Previously,
they got it via the implicit module.h inclusion.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosound: Add module.h to the previously silent sound users
Paul Gortmaker [Fri, 15 Jul 2011 16:38:28 +0000 (12:38 -0400)]
sound: Add module.h to the previously silent sound users

Lots of sound drivers were getting module.h via the implicit presence
of it in <linux/device.h> but we are going to clean that up.  So
fix up those users now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosound: fix drivers needing module.h not moduleparam.h
Paul Gortmaker [Fri, 15 Jul 2011 17:13:37 +0000 (13:13 -0400)]
sound: fix drivers needing module.h not moduleparam.h

The implicit presence of module.h lured several users into
incorrectly thinking that they only needed/used modparam.h
but once we clean up the module.h presence, these will show
up as build failures, so fix 'em now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomd: Add in export.h for files using EXPORT_SYMBOL
Paul Gortmaker [Fri, 27 May 2011 19:50:58 +0000 (15:50 -0400)]
md: Add in export.h for files using EXPORT_SYMBOL

These files were getting the defines for EXPORT_SYMBOL because
device.h was including module.h.  But we are going to put an
end to that.  So add the proper export.h include now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomd: Add module.h to all files using it implicitly
Paul Gortmaker [Sun, 3 Jul 2011 17:58:33 +0000 (13:58 -0400)]
md: Add module.h to all files using it implicitly

A pending cleanup will mean that module.h won't be implicitly
everywhere anymore.  Make sure the modular drivers in md dir
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agohid: Fix up files needing export.h for EXPORT_SYMBOL
Paul Gortmaker [Fri, 27 May 2011 14:25:27 +0000 (10:25 -0400)]
hid: Fix up files needing export.h for EXPORT_SYMBOL

With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agohid: Add module.h to fix up implicit users of it
Paul Gortmaker [Sun, 3 Jul 2011 17:39:48 +0000 (13:39 -0400)]
hid: Add module.h to fix up implicit users of it

A pending cleanup will mean that module.h won't be implicitly
everywhere anymore.  Make sure the modular drivers in clocksource
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoinput: Fix module drivers explicitly needing to include module.h
Paul Gortmaker [Fri, 27 May 2011 13:12:25 +0000 (09:12 -0400)]
input: Fix module drivers explicitly needing to include module.h

These files are modules and so really need the full module.h header.
Call it out so some of the cleanups of implicit and unrequired
includes elsewhere can be cleaned up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agodrivers/input: Add module.h to modular drivers implicitly using it
Paul Gortmaker [Sun, 3 Jul 2011 17:53:48 +0000 (13:53 -0400)]
drivers/input: Add module.h to modular drivers implicitly using it

A pending cleanup will mean that module.h won't be implicitly
everywhere anymore.  Make sure the modular drivers in input dir
are actually calling out for <module.h> explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agodrivers: power_supply_sysfs.c needs stat.h
Paul Gortmaker [Fri, 27 May 2011 14:22:46 +0000 (10:22 -0400)]
drivers: power_supply_sysfs.c needs stat.h

It was actually getting this before by a tangled mess of implict
includes that is going to be cleaned up.  Fix it now, so we don't
get this after the cleanup.

power_supply_sysfs.c: In function ‘power_supply_attr_is_visible’:
power_supply_sysfs.c:184: error: ‘S_IRUSR’ undeclared (first use in this function)
power_supply_sysfs.c:184: error: (Each undeclared identifier is reported only once
power_supply_sysfs.c:184: error: for each function it appears in.)
power_supply_sysfs.c:184: error: ‘S_IRGRP’ undeclared (first use in this function)
power_supply_sysfs.c:184: error: ‘S_IROTH’ undeclared (first use in this function)
power_supply_sysfs.c:196: error: ‘S_IWUSR’ undeclared (first use in this function)
make[3]: *** [drivers/power/power_supply_sysfs.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agodrivers/base: transport_class explicitly requires EXPORT_SYMBOL
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
drivers/base: transport_class explicitly requires EXPORT_SYMBOL

This file was getting <linux/module.h> via an implicit include
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give it the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoof: of_pci.c needs export.h since it uses EXPORT_SYMBOLS
Paul Gortmaker [Fri, 27 May 2011 21:06:52 +0000 (17:06 -0400)]
of: of_pci.c needs export.h since it uses EXPORT_SYMBOLS

It was getting it implicitly before, since module.h was pulled
in via device.h -- but that is something we are going to make
go away soon.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoof_platform.h: delete needless include <linux/module.h>
Paul Gortmaker [Thu, 26 May 2011 19:58:15 +0000 (15:58 -0400)]
of_platform.h: delete needless include <linux/module.h>

There is nothing modular in this file, and no reason to drag
in all the 357 headers that module.h brings with it, since
it just slows down compiles.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoblock: Fix files that are modules and hence need module.h
Paul Gortmaker [Fri, 1 Jul 2011 19:56:05 +0000 (15:56 -0400)]
block: Fix files that are modules and hence need module.h

We want to remove the implicit everywhere presence of module.h
so fix up the people relying on that implicit presence in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoblock: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
block: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros

These files were getting <linux/module.h> via an implicit include
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomtd: Add module.h to drivers users that were implicitly using it.
Paul Gortmaker [Sun, 3 Jul 2011 19:17:31 +0000 (15:17 -0400)]
mtd: Add module.h to drivers users that were implicitly using it.

We are cleaning up the implicit presence of module.h that these
drivers are taking advantage of.  Fix them in advance of the
cleanup operation.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomtd: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed
Paul Gortmaker [Sun, 10 Jul 2011 16:43:28 +0000 (12:43 -0400)]
mtd: Add export.h for EXPORT_SYMBOL/THIS_MODULE where needed

These two common macros will be no longer present everywhere.
Call out the include needs of them explicitly where required.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agocrypto: add module.h to those files that are explicitly using it
Paul Gortmaker [Fri, 27 May 2011 18:41:48 +0000 (14:41 -0400)]
crypto: add module.h to those files that are explicitly using it

Part of the include cleanups means that the implicit
inclusion of module.h via device.h is going away.  So
fix things up in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agodrivers/net: Add export.h to mlx4 files using EXPORT_SYMBOL
Paul Gortmaker [Fri, 27 May 2011 20:14:23 +0000 (16:14 -0400)]
drivers/net: Add export.h to mlx4 files using EXPORT_SYMBOL

These were getting the EXPORT_SYMBOL from an implicit module.h
include via device.h, but we are planning to clean that up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agodrivers/net: Add module.h to drivers who were implicitly using it
Paul Gortmaker [Sun, 3 Jul 2011 19:21:01 +0000 (15:21 -0400)]
drivers/net: Add module.h to drivers who were implicitly using it

The device.h header was including module.h, making it present for
these drivers.  But we want to clean that up.  Call out the include
of module.h in the modular network drivers.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agos390: add missing module.h/export.h includes
Heiko Carstens [Sat, 30 Jul 2011 07:25:15 +0000 (09:25 +0200)]
s390: add missing module.h/export.h includes

Fix several compile errors on s390 caused by splitting module.h.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: add export.h to kernel/proces.c
Paul Gortmaker [Thu, 28 Jul 2011 02:03:47 +0000 (22:03 -0400)]
mips: add export.h to kernel/proces.c

Do this in advance of the module.h cleanup or we will get:

arch/mips/kernel/process.c:444: error: data definition has no type or storage class
arch/mips/kernel/process.c:444: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/mips/kernel/process.c:444: error: parameter names (without types) in function declaration
make[3]: *** [arch/mips/kernel/process.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: fix implicit export.h usage by txx9 platform
Paul Gortmaker [Fri, 29 Jul 2011 00:19:43 +0000 (20:19 -0400)]
mips: fix implicit export.h usage by txx9 platform

To fix this:

arch/mips/txx9/rbtx4939/setup.c:248: error: 'THIS_MODULE' undeclared here (not in a function)
arch/mips/txx9/generic/spi_eeprom.c:82: error: 'THIS_MODULE' undeclared here (not in a function)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: fix implicit usage of export.h on rb532 platform
Paul Gortmaker [Fri, 29 Jul 2011 00:14:42 +0000 (20:14 -0400)]
mips: fix implicit usage of export.h on rb532 platform

It needs export.h to avoid this:

arch/mips/rb532/gpio.c:163: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/mips/rb532/setup.c:16: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: fix up the implicit export.h users in powertv platform
Paul Gortmaker [Thu, 28 Jul 2011 23:55:41 +0000 (19:55 -0400)]
mips: fix up the implicit export.h users in powertv platform

To avoid this:

arch/mips/powertv/pci/fixup-powertv.c:36: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/mips/powertv/powertv-usb.c:359: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: fix implicit export.h usage cases in cavium platform
Paul Gortmaker [Thu, 28 Jul 2011 23:27:05 +0000 (19:27 -0400)]
mips: fix implicit export.h usage cases in cavium platform

Fixes the following failures:

arch/mips/cavium-octeon/csrc-octeon.c:138: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/mips/cavium-octeon/dma-octeon.c:218: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/mips/cavium-octeon/flash_setup.c:62: error: 'THIS_MODULE' undeclared (first use in this function)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: bcm47xx/setup.c needs export.h
Paul Gortmaker [Thu, 28 Jul 2011 23:11:53 +0000 (19:11 -0400)]
mips: bcm47xx/setup.c needs export.h

Or else we'll get this:

arch/mips/bcm47xx/setup.c:39: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: bcm47xx/gpio.c needs export.h
Paul Gortmaker [Thu, 28 Jul 2011 23:08:28 +0000 (19:08 -0400)]
mips: bcm47xx/gpio.c needs export.h

Or else we'll get this:

arch/mips/bcm47xx/gpio.c:36: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: pci.c needs export.h
Paul Gortmaker [Thu, 28 Jul 2011 22:46:31 +0000 (18:46 -0400)]
mips: pci.c needs export.h

Or else we get this:

arch/mips/pci/pci.c:330: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: remove needless include of module.h from core kernel files.
Paul Gortmaker [Sat, 23 Jul 2011 20:55:17 +0000 (16:55 -0400)]
mips: remove needless include of module.h from core kernel files.

None of these files are using modular infrastructure, and build
tests reveal that none of these files are really relying on any
implicit inclusions via. module.h either.  So delete them.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: migrate core kernel file from module.h --> export.h
Paul Gortmaker [Sat, 23 Jul 2011 20:30:40 +0000 (16:30 -0400)]
mips: migrate core kernel file from module.h --> export.h

These files are not modules, but were including module.h only for
EXPORT_SYMBOL and/or THIS_MODULE.  Now that we have the lightweight
export.h, use it in these kinds of cases.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: fix missng asm/smp-ops.h in pmc-sierra/msp71xx/msp_setup.c
Paul Gortmaker [Thu, 28 Jul 2011 23:50:17 +0000 (19:50 -0400)]
mips: fix missng asm/smp-ops.h in pmc-sierra/msp71xx/msp_setup.c

To avoid getting this:

arch/mips/pmc-sierra/msp71xx/msp_setup.c: In function 'prom_init':
arch/mips/pmc-sierra/msp71xx/msp_setup.c:231: error: implicit declaration of function 'register_vsmp_smp_ops'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: vr41xx/ implicitly uses smp.h in giu.c and rtc.c
Paul Gortmaker [Thu, 28 Jul 2011 23:14:16 +0000 (19:14 -0400)]
mips: vr41xx/ implicitly uses smp.h in giu.c and rtc.c

As evidenced by this:

arch/mips/vr41xx/common/giu.c:84: error: implicit declaration of function 'smp_processor_id'

arch/mips/vr41xx/common/rtc.c:85: error: implicit declaration of function 'smp_processor_id'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: fix implicit smp.h usage in loongson/common/platform.c
Paul Gortmaker [Thu, 28 Jul 2011 23:39:02 +0000 (19:39 -0400)]
mips: fix implicit smp.h usage in loongson/common/platform.c

With the module.h cleanup, we'll get:

arch/mips/loongson/common/platform.c:21: error: implicit declaration of function 'smp_processor_id'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomips: fix implicit use of asm/elf.h in kernel/cpu-probe.c
Paul Gortmaker [Sat, 23 Jul 2011 20:26:41 +0000 (16:26 -0400)]
mips: fix implicit use of asm/elf.h in kernel/cpu-probe.c

We are relying on asm/elf.h being present implicitly.  Once we clean
up the root cause of that, we'll see this, so fix it in advance.

arch/mips/kernel/cpu-probe.c: In function 'set_elf_platform':
arch/mips/kernel/cpu-probe.c:298: error: '__elf_platform' undeclared (first use in this function)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosparc: another implicit module user
Paul Gortmaker [Sun, 31 Jul 2011 06:05:00 +0000 (02:05 -0400)]
sparc: another implicit module user

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosparc: mm/extable.c needs module.h for within_module_init()
Paul Gortmaker [Sun, 31 Jul 2011 05:50:31 +0000 (01:50 -0400)]
sparc: mm/extable.c needs module.h for within_module_init()

And also for search_exception_tables, which arguably could be
living somewhere more appropriate than module.h

arch/sparc/mm/extable.c: In function 'trim_init_extable':
arch/sparc/mm/extable.c:74: error: dereferencing pointer to incomplete type
arch/sparc/mm/extable.c:75: error: dereferencing pointer to incomplete type
arch/sparc/mm/extable.c:77: error: implicit declaration of function 'within_module_init'
arch/sparc/mm/extable.c:77: error: dereferencing pointer to incomplete type
arch/sparc/mm/extable.c:78: error: dereferencing pointer to incomplete type
arch/sparc/mm/extable.c:80: error: dereferencing pointer to incomplete type
arch/sparc/mm/extable.c: In function 'search_extables_range':
arch/sparc/mm/extable.c:93: error: implicit declaration of function 'search_exception_tables'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosparc: remove several unnecessary module.h include instances
Paul Gortmaker [Fri, 22 Jul 2011 12:02:24 +0000 (08:02 -0400)]
sparc: remove several unnecessary module.h include instances

Building an allyesconfig doesn't reveal a hidden need
for any of these.  Since module.h brings in the whole kitchen
sink, it just needlessly adds 30k+ lines to the cpp burden.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosparc: move symbol exporters to use export.h not module.h
Paul Gortmaker [Fri, 22 Jul 2011 17:18:16 +0000 (13:18 -0400)]
sparc: move symbol exporters to use export.h not module.h

Many of the core sparc kernel files are not modules, but just
including module.h for exporting symbols.  Now these files can
use the lighter footprint export.h for this role.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosparc: fix up more implicit export.h users in core files
Paul Gortmaker [Sun, 31 Jul 2011 06:01:17 +0000 (02:01 -0400)]
sparc: fix up more implicit export.h users in core files

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agosparc: add export.h to various arch/sparc/[kernel|mm] files
Paul Gortmaker [Mon, 18 Jul 2011 19:57:46 +0000 (15:57 -0400)]
sparc: add export.h to various arch/sparc/[kernel|mm] files

These files are only exporting symbols, so they don't need
the full module.h header file.  Previously they were getting
that implicitly via overuse of module.h within other .h files.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoarm: add export.h to arch/arm/mm/init.c
Paul Gortmaker [Mon, 18 Jul 2011 16:55:13 +0000 (12:55 -0400)]
arm: add export.h to arch/arm/mm/init.c

This file exports symbols and hence will need this header file
in advance of the module.h usage cleanup.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoarm: convert core files from module.h to export.h
Paul Gortmaker [Fri, 22 Jul 2011 14:58:34 +0000 (10:58 -0400)]
arm: convert core files from module.h to export.h

Many of the core ARM kernel files are not modules, but just
including module.h for exporting symbols.  Now these files can
use the lighter footprint export.h for this role.

There are probably lots more, but ARM files of mach-* and plat-*
don't get coverage via a simple yesconfig build.  They will have
to be cleaned up and tested via using their respective configs.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoarm: remove several unnecessary module.h include instances
Paul Gortmaker [Fri, 22 Jul 2011 14:29:08 +0000 (10:29 -0400)]
arm: remove several unnecessary module.h include instances

Building these files does not reveal a hidden need for
any of these.  Since module.h brings in the whole kitchen
sink, it just needlessly adds 30k+ lines to the cpp burden.

There are probably lots more, but ARM files of mach-* and plat-*
don't get coverage via a simple yesconfig build.  They will have
to be cleaned up and tested via using their respective configs.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoarm: fix implicit usage of string.h in kernel/leds.c
Paul Gortmaker [Fri, 22 Jul 2011 14:56:23 +0000 (10:56 -0400)]
arm: fix implicit usage of string.h in kernel/leds.c

The use of these string ops was implicitly hidden by the use
of module.h, but that is going away shortly.  When it does, this
will break as follows:

arch/arm/kernel/leds.c: In function 'leds_store':
arch/arm/kernel/leds.c:40: error: implicit declaration of function 'strcspn'
arch/arm/kernel/leds.c:40: warning: incompatible implicit declaration of built-in function 'strcspn'
arch/arm/kernel/leds.c:45: error: implicit declaration of function 'strncmp'
arch/arm/kernel/leds.c:55: error: implicit declaration of function 'strlen'
arch/arm/kernel/leds.c:55: warning: incompatible implicit declaration of built-in function 'strlen'
make[2]: *** [arch/arm/kernel/leds.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoarm: add elf.h to arch/arm/kernel/ptrace.c
Paul Gortmaker [Mon, 18 Jul 2011 16:03:53 +0000 (12:03 -0400)]
arm: add elf.h to arch/arm/kernel/ptrace.c

It was implicitly getting it via an implicit presence of module.h
but when we clean that up, we'll get a bunch of lines like this:

arch/arm/kernel/ptrace.c:764: error: 'NT_PRSTATUS' undeclared here (not in a function)
arch/arm/kernel/ptrace.c:765: error: 'ELF_NGREG' undeclared here (not in a function)
arch/arm/kernel/ptrace.c:776: error: 'NT_PRFPREG' undeclared here (not in a function)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: remove non-required uses of include <linux/module.h>
Paul Gortmaker [Fri, 22 Jul 2011 18:24:04 +0000 (14:24 -0400)]
powerpc: remove non-required uses of include <linux/module.h>

None of the files touched here are modules, and they are not
exporting any symbols either -- so there is no need to be including
the module.h.  Builds of all the files remains successful.

Even kernel/module.c does not need to include it, since it includes
linux/moduleloader.h instead.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: various straight conversions from module.h --> export.h
Paul Gortmaker [Fri, 22 Jul 2011 22:24:23 +0000 (18:24 -0400)]
powerpc: various straight conversions from module.h --> export.h

All these files were including module.h just for the basic
EXPORT_SYMBOL infrastructure.  We can shift them off to the
export.h header which is a way smaller footprint and thus
realize some compile time gains.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: convert hvconsole.c to export.h ; fix implicit use of errno.h
Paul Gortmaker [Fri, 22 Jul 2011 22:15:07 +0000 (18:15 -0400)]
powerpc: convert hvconsole.c to export.h ; fix implicit use of errno.h

This file is only exporting symbols and so should use export.h
and not module.h header.  But in doing the conversion, we will
uncover that it was implicitly using errno.h via module.h:

  CC      arch/powerpc/platforms/pseries/hvconsole.o
arch/powerpc/platforms/pseries/hvconsole.c: In function 'hvc_put_chars':
arch/powerpc/platforms/pseries/hvconsole.c:77: error: 'EIO' undeclared (first use in this function)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: fix two implicit header uses in pseries/plpar_wrappers.h
Paul Gortmaker [Fri, 22 Jul 2011 22:04:33 +0000 (18:04 -0400)]
powerpc: fix two implicit header uses in pseries/plpar_wrappers.h

Removing the implicit presence of module.h from almost everywhere
will reveal this implicit usage of paca.h and string.h headers as
follows:

arch/powerpc/platforms/pseries/plpar_wrappers.h:22: error: implicit declaration of function 'get_lppaca'
arch/powerpc/platforms/pseries/plpar_wrappers.h:208: error: implicit declaration of function 'memcpy'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: fix implicit use of mutex.h by include/asm/spu.h
Paul Gortmaker [Fri, 22 Jul 2011 18:00:05 +0000 (14:00 -0400)]
powerpc: fix implicit use of mutex.h by include/asm/spu.h

We've been getting the header implicitly via module.h in the past
but when we clean that up, we'll get this failure:

  CC      arch/powerpc/platforms/cell/beat_spu_priv1.o
In file included from arch/powerpc/platforms/cell/beat_spu_priv1.c:22:
arch/powerpc/include/asm/spu.h:190: error: field 'list_mutex' has incomplete type
make[2]: *** [arch/powerpc/platforms/cell/beat_spu_priv1.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: fix implicit use of cache.h in kernel/firmware.c
Paul Gortmaker [Fri, 22 Jul 2011 19:07:20 +0000 (15:07 -0400)]
powerpc: fix implicit use of cache.h in kernel/firmware.c

This file only needs export.h to get EXPORT_SYMBOL, but in doing
so, it uncovers an implicit use of linux/cache.h as follows:

 CC      arch/powerpc/kernel/firmware.o
arch/powerpc/kernel/firmware.c:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__read_mostly'
arch/powerpc/kernel/firmware.c:21: error: expected '=', ',', ';', 'asm' or '__attribute__' before '__used'
make[2]: *** [arch/powerpc/kernel/firmware.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: fix implicit notifier use in converting to export.h
Paul Gortmaker [Fri, 22 Jul 2011 19:15:09 +0000 (15:15 -0400)]
powerpc: fix implicit notifier use in converting to export.h

We can convert this file to using export.h since it only wants
to export symbols, but when we do we'll see also that it was
implicitly getting notifier.h from module.h via this failure:

  CC      arch/powerpc/platforms/cell/spu_notify.o
arch/powerpc/platforms/cell/spu_notify.c:28: warning: type defaults to 'int' in declaration of 'BLOCKING_NOTIFIER_HEAD'
arch/powerpc/platforms/cell/spu_notify.c:28: warning: parameter names (without types) in function declaration
arch/powerpc/platforms/cell/spu_notify.c: In function 'spu_switch_notify':
arch/powerpc/platforms/cell/spu_notify.c:32: error: implicit declaration of function 'blocking_notifier_call_chain'
arch/powerpc/platforms/cell/spu_notify.c:32: error: 'spu_switch_notifier' undeclared (first use in this function)

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: cell/beat_wrapper.h is implicitly using memcpy functions
Paul Gortmaker [Fri, 22 Jul 2011 17:52:47 +0000 (13:52 -0400)]
powerpc: cell/beat_wrapper.h is implicitly using memcpy functions

This has been relying on the fact that the parent file would have
module.h (and thus nearly everything) present.  But once we fix that,
we'll get stuck with this failure:

In file included from arch/powerpc/platforms/cell/beat_spu_priv1.c:26:
arch/powerpc/platforms/cell/beat_wrapper.h: In function 'beat_eeprom_write':
arch/powerpc/platforms/cell/beat_wrapper.h:160: error: implicit declaration of function 'memcpy'

and many more instances of the same.  Fix it in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: Fix up implicit sched.h users
Paul Gortmaker [Fri, 27 May 2011 18:25:11 +0000 (14:25 -0400)]
powerpc: Fix up implicit sched.h users

They are getting it through device.h --> module.h path, but we want
to clean that up.  This is what will happen if we don't.

  pseries/iommu.c: In function 'tce_build_pSeriesLP':
  pseries/iommu.c:136: error: implicit declaration of function 'show_stack'

  pseries/eeh.c: In function 'eeh_token_to_phys':
  pseries/eeh.c:359: error: 'init_mm' undeclared (first use in this function)

  pseries/eeh_event.c: In function 'eeh_event_handler':
  pseries/eeh_event.c:63: error: implicit declaration of function 'daemonize'
  pseries/eeh_event.c:64: error: implicit declaration of function 'set_current_state'
  pseries/eeh_event.c:64: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
  pseries/eeh_event.c:64: error: (Each undeclared identifier is reported only once
  pseries/eeh_event.c:64: error: for each function it appears in.)
  pseries/eeh_event.c: In function 'eeh_thread_launcher':
  pseries/eeh_event.c:109: error: 'CLONE_KERNEL' undeclared (first use in this function)

  hotplug-cpu.c: In function 'pseries_mach_cpu_die':
  hotplug-cpu.c:115: error: implicit declaration of function 'idle_task_exit'

  kernel/swsusp_64.c: In function 'do_after_copyback':
  kernel/swsusp_64.c:17: error: implicit declaration of function 'touch_softlockup_watchdog'

  cell/spufs/context.c: In function 'alloc_spu_context':
  cell/spufs/context.c:60: error: implicit declaration of function 'get_task_mm'
  cell/spufs/context.c:60: warning: assignment makes pointer from integer without a cast
  cell/spufs/context.c: In function 'spu_forget':
  cell/spufs/context.c:127: error: implicit declaration of function 'mmput'

  pasemi/dma_lib.c: In function 'pasemi_dma_stop_chan':
  pasemi/dma_lib.c:332: error: implicit declaration of function 'cond_resched'

  sysdev/fsl_lbc.c: In function 'fsl_lbc_ctrl_irq':
  sysdev/fsl_lbc.c:247: error: 'TASK_NORMAL' undeclared (first use in this function)

Add in sched.h so these get the definitions they are looking for.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: Fix up implicit stat.h users
Paul Gortmaker [Fri, 27 May 2011 17:27:45 +0000 (13:27 -0400)]
powerpc: Fix up implicit stat.h users

They get it via module.h (via device.h) but we want to clean that up.
When we do, we'll get things like:

ibmebus.c:314: error: 'S_IWUSR' undeclared here (not in a function)
vio.c:972: error: 'S_IWUSR' undeclared here (not in a function)

so add in the stat header it is using explicitly in advance.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: Fix up modules that should be including module.h
Paul Gortmaker [Fri, 27 May 2011 17:23:32 +0000 (13:23 -0400)]
powerpc: Fix up modules that should be including module.h

So that we can clean up the header files and not be relying
on implicit includes from device.h ---> module.h

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc32: include export.h for EXPORT_SYMBOL
Stephen Rothwell [Fri, 29 Jul 2011 06:19:31 +0000 (16:19 +1000)]
powerpc32: include export.h for EXPORT_SYMBOL

Fix failures in powerpc32 associated with the previously allowed
implicit module.h presence:

arch/powerpc/mm/mmu_context_hash32.c:76:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
arch/powerpc/mm/tlb_hash32.c:48:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/powerpc/kernel/pci_32.c:51:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
arch/powerpc/kernel/iomap.c:36:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc/44x: include export.h for EXPORT_SYMBOL
Stephen Rothwell [Fri, 29 Jul 2011 06:42:37 +0000 (16:42 +1000)]
powerpc/44x: include export.h for EXPORT_SYMBOL

To avoid errors like this:

arch/powerpc/platforms/44x/canyonlands.c:126:1: error: data definition has no type or storage class
arch/powerpc/platforms/44x/canyonlands.c:126:1: error: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/powerpc/platforms/44x/canyonlands.c:126:1: error: parameter names (without types) in function declaration
arch/powerpc/kvm/44x.c: In function 'kvmppc_44x_init':
arch/powerpc/kvm/44x.c:168:59: error: 'THIS_MODULE' undeclared (first use in this function)

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: add export.h to files making use of EXPORT_SYMBOL
Paul Gortmaker [Fri, 27 May 2011 14:46:24 +0000 (10:46 -0400)]
powerpc: add export.h to files making use of EXPORT_SYMBOL

With module.h being implicitly everywhere via device.h, the absence
of explicitly including something for EXPORT_SYMBOL went unnoticed.
Since we are heading to fix things up and clean module.h from the
device.h file, we need to explicitly include these files now.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agopowerpc: io-workarounds.c was implicitly getting init_mm
Paul Gortmaker [Fri, 27 May 2011 17:39:01 +0000 (13:39 -0400)]
powerpc: io-workarounds.c was implicitly getting init_mm

It was coming in via device.h --> module.h etc. but we want to
clean that up.  So explicitly include the header where init_mm
is being declared.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: fix up files really needing to include module.h
Paul Gortmaker [Fri, 27 May 2011 16:33:10 +0000 (12:33 -0400)]
x86: fix up files really needing to include module.h

These files aren't just exporting symbols -- they are also defining
a MODULE_LICENSE etc. so give them the full module.h file.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: efi_32.c is implicitly getting asm/desc.h via module.h
Paul Gortmaker [Fri, 27 May 2011 18:46:07 +0000 (14:46 -0400)]
x86: efi_32.c is implicitly getting asm/desc.h via module.h

We want to clean up the chain of includes stumbling through
module.h, and when we do that, we'll see:

  CC      arch/x86/platform/efi/efi_32.o
  efi/efi_32.c: In function ‘efi_call_phys_prelog’:
  efi/efi_32.c:80: error: implicit declaration of function ‘get_cpu_gdt_table’
  efi/efi_32.c:82: error: implicit declaration of function ‘load_gdt’
  make[4]: *** [arch/x86/platform/efi/efi_32.o] Error 1

Include asm/desc.h so that there are no implicit include assumptions.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: devicetree.h needs export.h
Randy Dunlap [Sat, 30 Jul 2011 01:04:22 +0000 (18:04 -0700)]
x86: devicetree.h needs export.h

devicetree.c needs to include linux/export.h to fix build errors.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: kernel/e820.c needs export.h
Paul Gortmaker [Thu, 28 Jul 2011 18:41:59 +0000 (14:41 -0400)]
x86: kernel/e820.c needs export.h

After the module.h cleanup, we'll see:

arch/x86/kernel/e820.c:69: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL_GPL’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: kernel/pci-dma.c needs export.h
Paul Gortmaker [Thu, 28 Jul 2011 18:39:06 +0000 (14:39 -0400)]
x86: kernel/pci-dma.c needs export.h

After the module.h cleanup, we'll get:

arch/x86/kernel/pci-dma.c:20: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: kernel/rtc.c needs export.h since it exports symbols
Paul Gortmaker [Thu, 28 Jul 2011 18:20:26 +0000 (14:20 -0400)]
x86: kernel/rtc.c needs export.h since it exports symbols

As evidence, we see the following:

arch/x86/kernel/rtc.c:29: warning: type defaults to ‘int’ in declaration of ‘EXPORT_SYMBOL’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: Fix files explicitly requiring export.h for EXPORT_SYMBOL
Paul Gortmaker [Thu, 26 May 2011 16:22:53 +0000 (12:22 -0400)]
x86: Fix files explicitly requiring export.h for EXPORT_SYMBOL

These files were implicitly getting EXPORT_SYMBOL via device.h
which was including module.h, but that unfortunate issue will
be short lived.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agox86: fix implicit include of <linux/topology.h> in vsyscall_64
Paul Gortmaker [Thu, 26 May 2011 16:33:18 +0000 (12:33 -0400)]
x86: fix implicit include of <linux/topology.h> in vsyscall_64

In removing the presence of <linux/module.h> from some of the
more common <linux/something.h> files, this implict include
of <linux/topology.h> was uncovered.

  CC      arch/x86/kernel/vsyscall_64.o
  arch/x86/kernel/vsyscall_64.c: In function ‘vsyscall_set_cpu’:
  arch/x86/kernel/vsyscall_64.c:259: error: implicit declaration of function ‘cpu_to_node’

Explicitly call it out so the cleanup can take place.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoacpi: sysfs.c needs module.h and not just moduleparam.h
Paul Gortmaker [Fri, 1 Jul 2011 16:02:02 +0000 (12:02 -0400)]
acpi: sysfs.c needs module.h and not just moduleparam.h

If it doesn't get it then this line:

MODULE_PARM_DESC(aml_debug_output,
                 "To enable/disable the ACPI Debug Object output.");
will trigger:

drivers/acpi/sysfs.c:229: error: expected ‘)’ before string constant
make[3]: *** [drivers/acpi/sysfs.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoacpi: revector aclinux.h from module.h to export.h
Paul Gortmaker [Thu, 26 May 2011 19:49:02 +0000 (15:49 -0400)]
acpi: revector aclinux.h from module.h to export.h

This file was only including linux/module.h for the
EXPORT_SYMBOL infrastructure, and nothing else.  Revector it
onto the isolated export header for faster compile times.

Doing the above shows that the ACPI hwsleep module was not
actually including <linux/module.h>, so add that in so that
it will continue to build successfully.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoacpi: add module.h to files implicitly using/relying on it.
Paul Gortmaker [Fri, 1 Jul 2011 18:30:49 +0000 (14:30 -0400)]
acpi: add module.h to files implicitly using/relying on it.

These files are using standard module API things like MODULE_AUTHOR
etc. and so should not be relying on an implicit presence of the
module.h header.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agofs: add module.h to files that were implicitly using it
Paul Gortmaker [Fri, 1 Jul 2011 18:23:34 +0000 (14:23 -0400)]
fs: add module.h to files that were implicitly using it

Some files were using the complete module.h infrastructure without
actually including the header at all.  Fix them up in advance so
once the implicit presence is removed, we won't get failures like this:

  CC [M]  fs/nfsd/nfssvc.o
fs/nfsd/nfssvc.c: In function 'nfsd_create_serv':
fs/nfsd/nfssvc.c:335: error: 'THIS_MODULE' undeclared (first use in this function)
fs/nfsd/nfssvc.c:335: error: (Each undeclared identifier is reported only once
fs/nfsd/nfssvc.c:335: error: for each function it appears in.)
fs/nfsd/nfssvc.c: In function 'nfsd':
fs/nfsd/nfssvc.c:555: error: implicit declaration of function 'module_put_and_exit'
make[3]: *** [fs/nfsd/nfssvc.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agofs: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
fs: add export.h to files using EXPORT_SYMBOL/THIS_MODULE macros

These files were getting <linux/module.h> via an implicit include
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agonet: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules
Paul Gortmaker [Fri, 15 Jul 2011 15:47:34 +0000 (11:47 -0400)]
net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules

These files are non modular, but need to export symbols using
the macros now living in export.h -- call out the include so
that things won't break when we remove the implicit presence
of module.h from everywhere.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agonet: rfkill/input.c explicitly needs to include module.h
Paul Gortmaker [Fri, 27 May 2011 13:12:25 +0000 (09:12 -0400)]
net: rfkill/input.c explicitly needs to include module.h

With calls to module_param_named() and similar, this file really
needs the full module.h header.  Call it out so some of the
cleanups of implicit and unrequired includes elsewhere can be
cleaned up.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
kernel: Fix files explicitly needing EXPORT_SYMBOL infrastructure

These files were getting <linux/module.h> via a twisted and tormented
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: params/rcutiny needs module.h not moduleparam.h
Paul Gortmaker [Fri, 27 May 2011 01:07:10 +0000 (21:07 -0400)]
kernel: params/rcutiny needs module.h not moduleparam.h

Through various other twisted include paths, these files were
getting the full module.h file, and hence living the illusion
that it really only needed moduleparam.h -- but the reality
is that once you remove module.h, you will get screenfulls of
things like:

kernel/params.c:583: warning: ‘struct module_kobject’ declared inside parameter list

The file really requires module.h so simply make it so.  As the
file module.h grabs moduleparam.h on the fly, all will be well.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: ksysfs.c is implicitly using stat.h
Paul Gortmaker [Thu, 28 Jul 2011 18:22:29 +0000 (14:22 -0400)]
kernel: ksysfs.c is implicitly using stat.h

With the module.h usage cleanup, we'll get this:

kernel/ksysfs.c:161: error: ‘S_IRUGO’ undeclared here (not in a function)
make[2]: *** [kernel/ksysfs.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: sys.c implicitly relies on kmod.h for usermodehelper
Paul Gortmaker [Fri, 27 May 2011 00:59:13 +0000 (20:59 -0400)]
kernel: sys.c implicitly relies on kmod.h for usermodehelper

In preparation to clean up the pervasive module.h usage which
in turn brings in every header possible, testing reveals that
this file gets the usermodehelper functions via that path.

Explicitly include kmod.h so that we don't things like:

kernel/sys.c:317: error: implicit declaration of function ‘usermodehelper_disable’
kernel/sys.c:1816: error: implicit declaration of function ‘call_usermodehelper_setup’
kernel/sys.c:1822: error: implicit declaration of function ‘call_usermodehelper_setfns’
kernel/sys.c:1824: error: implicit declaration of function ‘call_usermodehelper_exec’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: fix two implicit header assumptions in irq_work.c
Paul Gortmaker [Mon, 18 Jul 2011 17:03:04 +0000 (13:03 -0400)]
kernel: fix two implicit header assumptions in irq_work.c

Up until now, this file was getting percpu.h because nearly every
file was implicitly getting module.h (and all its sub-includes).
But we want to clean that up, so call out percpu.h explicitly.
Otherwise we'll get things like this on an ARM build:

kernel/irq_work.c:48: error: expected declaration specifiers or '...' before 'irq_work_list'
kernel/irq_work.c:48: warning: type defaults to 'int' in declaration of 'DEFINE_PER_CPU'

The same thing was happening for builds on ARM for asm/processor.h

kernel/irq_work.c: In function 'irq_work_sync':
kernel/irq_work.c:166: error: implicit declaration of function 'cpu_relax'

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: fix implicit use of kmod.h in power/suspend.c
Paul Gortmaker [Thu, 26 May 2011 16:48:41 +0000 (12:48 -0400)]
kernel: fix implicit use of kmod.h in power/suspend.c

File power/suspend.c was implicitly relying on <linux/kmod.h>
coming in via module.h, as without it we get:

kernel/power/suspend.c: In function ‘suspend_prepare’:
kernel/power/suspend.c:100: error: implicit declaration of function ‘usermodehelper_disable’
kernel/power/suspend.c:109: error: implicit declaration of function ‘usermodehelper_enable’

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: Add <linux/module.h> to files using it implicitly
Paul Gortmaker [Thu, 26 May 2011 21:53:52 +0000 (17:53 -0400)]
kernel: Add <linux/module.h> to files using it implicitly

These files are doing things like module_put and try_module_get
so they need to call out the module.h for explicit inclusion,
rather than getting it via <linux/device.h> which we ideally want
to remove the module.h inclusion from.

If we don't fix them in advance, we will get things like:

kernel/watchdog.c: In function ‘watchdog_timer_fn’:
kernel/watchdog.c:301: error: implicit declaration of function ‘print_modules’
make[2]: *** [kernel/watchdog.o] Error 1

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agokernel: Map most files to use export.h instead of module.h
Paul Gortmaker [Mon, 23 May 2011 18:51:41 +0000 (14:51 -0400)]
kernel: Map most files to use export.h instead of module.h

The changed files were only including linux/module.h for the
EXPORT_SYMBOL infrastructure, and nothing else.  Revector them
onto the isolated export header for faster compile times.

Nothing to see here but a whole lot of instances of:

  -#include <linux/module.h>
  +#include <linux/export.h>

This commit is only changing the kernel dir; next targets
will probably be mm, fs, the arch dirs, etc.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomm: Add export.h for EXPORT_SYMBOL to active symbol exporters
Paul Gortmaker [Thu, 26 May 2011 20:00:52 +0000 (16:00 -0400)]
mm: Add export.h for EXPORT_SYMBOL to active symbol exporters

These files were getting <linux/module.h> via an implicit include
path, but we want to crush those out of existence since they cost
time during compiles of processing thousands of lines of headers
for no reason.  Give them the lightweight header that just contains
the EXPORT_SYMBOL infrastructure.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomm: delete various needless include <linux/module.h>
Paul Gortmaker [Thu, 26 May 2011 19:58:15 +0000 (15:58 -0400)]
mm: delete various needless include <linux/module.h>

There is nothing modular in these files, and no reason to drag
in all the 357 headers that module.h brings with it, since
it just slows down compiles.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agovermagic: delete senseless include of <linux/module.h>
Paul Gortmaker [Thu, 26 May 2011 18:19:59 +0000 (14:19 -0400)]
vermagic: delete senseless include of <linux/module.h>

This file consists of nothing other than things like:

  #ifdef CONFIG_FOO
  #define ....

There is no reason for it to require module.h

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agorange: fix bogus misuse of module.h to get printk()
Paul Gortmaker [Wed, 25 May 2011 13:52:21 +0000 (09:52 -0400)]
range: fix bogus misuse of module.h to get printk()

This file isn't doing anything with modules and so it should
not be including <linux/module.h> just to get basic stuff
like printk() and min/max.  Revector it to <linux/kernel.h>.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agomodule.h: split out the EXPORT_SYMBOL into export.h
Paul Gortmaker [Mon, 23 May 2011 18:11:39 +0000 (14:11 -0400)]
module.h: split out the EXPORT_SYMBOL into export.h

A lot of files pull in module.h when all they are really
looking for is the basic EXPORT_SYMBOL functionality. The
recent data from Ingo[1] shows that this is one of several
instances that has a significant impact on compile times,
and it should be targeted for factoring out (as done here).

Note that several commonly used header files in include/*
directly include <linux/module.h> themselves (some 34 of them!)
The most commonly used ones of these will have to be made
independent of module.h before the full benefit of this change
can be realized.

We also transition THIS_MODULE from module.h to export.h,
since there are lots of files with subsystem structs that
in turn will have a struct module *owner and only be doing:

.owner = THIS_MODULE;

and absolutely nothing else modular. So, we also want to have
the THIS_MODULE definition present in the lightweight header.

[1] https://lkml.org/lkml/2011/5/23/76

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
Linus Torvalds [Sat, 30 Jul 2011 20:51:11 +0000 (10:51 -1000)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial:
  sungem: fix compile failure caused by trivial #include consolidation

13 years agoMerge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groec...
Linus Torvalds [Sat, 30 Jul 2011 18:57:57 +0000 (08:57 -1000)]
Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/staging: (24 commits)
  hwmon: (lm90) Refactor reading of config2 register
  hwmon: (lm90) Make SA56004 detection more robust
  hwmon: (lm90) Simplify handling of extended local temp register
  hwmon: (pmbus) Add client driver for LM25066, LM5064, and LM5066
  hwmon: (max34440) Add support for peak attributes
  hwmon: (max8688) Add support for peak attributes
  hwmon: (max16064) Add support for peak attributes
  hwmon: (adm1275) Add support for peak attributes
  hwmon: (pmbus) Add support for peak attributes
  hwmon: Add new attributes to sysfs ABI
  hwmon: (pmbus) Strengthen check for status register existence
  hwmon: (pmbus) Add support for virtual pages
  hwmon: (pmbus) Support reading and writing of word registers in device specific code
  hwmon: (pmbus) Increase attribute name size
  hwmon: (pmbus) Add ADP4000, NCP4200 and NCP4208 to list of supported devices
  hwmon: (pmbus) Add support for VID output voltage mode
  hwmon: (pmbus) Move PMBus drivers to drivers/hwmon/pmbus
  hwmon: (coretemp) Add core/pkg threshold support to Coretemp
  hwmon: (lm95241) Add support for LM95231
  hwmon: LM95245 driver
  ...

13 years agoshm: optimize locking and ipc_namespace getting
Vasiliy Kulikov [Thu, 28 Jul 2011 23:56:40 +0000 (03:56 +0400)]
shm: optimize locking and ipc_namespace getting

shm_lock() does a lookup of shm segment in shm_ids(ns).ipcs_idr, which
is redundant as we already know shmid_kernel address.  An actual lock is
also not required for reads until we really want to destroy the segment.

exit_shm() and shm_destroy_orphaned() may avoid the loop by checking
whether there is at least one segment in current ipc_namespace.

The check of nsproxy and ipc_ns against NULL is redundant as exit_shm()
is called from do_exit() before the call to exit_notify(), so the
dereferencing current->nsproxy->ipc_ns is guaranteed to be safe.

Reported-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoshm: handle separate PID namespaces case
Vasiliy Kulikov [Thu, 28 Jul 2011 23:55:31 +0000 (03:55 +0400)]
shm: handle separate PID namespaces case

shm_try_destroy_orphaned() and shm_try_destroy_current() didn't handle
the case of separate PID namespaces, but a single IPC namespace.  If
there are tasks with the same PID values using the same shmem object,
the wrong destroy decision could be reached.

On shm segment creation store the pointer to the creator task in
shmid_kernel->shm_creator field and zero it on task exit.  Then
use the ->shm_creator insread of shm_cprid in both functions.  As
shmid_kernel object is already locked at this stage, no additional
locking is needed.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Sat, 30 Jul 2011 18:36:02 +0000 (08:36 -1000)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (71 commits)
  [SCSI] fcoe: cleanup cpu selection for incoming requests
  [SCSI] fcoe: add fip retry to avoid missing critical keep alive
  [SCSI] libfc: fix warn on in lport retry
  [SCSI] libfc: Remove the reference to FCP packet from scsi_cmnd in case of error
  [SCSI] libfc: cleanup sending SRR request
  [SCSI] libfc: two minor changes in comments
  [SCSI] libfc, fcoe: ignore rx frame with wrong xid info
  [SCSI] libfc: release exchg cache
  [SCSI] libfc: use FC_MAX_ERROR_CNT
  [SCSI] fcoe: remove unused ptype field in fcoe_rcv_info
  [SCSI] bnx2fc: Update copyright and bump version to 1.0.4
  [SCSI] bnx2fc: Tx BDs cache in write tasks
  [SCSI] bnx2fc: Do not arm CQ when there are no CQEs
  [SCSI] bnx2fc: hold tgt lock when calling cmd_release
  [SCSI] bnx2fc: Enable support for sequence level error recovery
  [SCSI] bnx2fc: HSI changes for tape
  [SCSI] bnx2fc: Handle REC_TOV error code from firmware
  [SCSI] bnx2fc: REC/SRR link service request and response handling
  [SCSI] bnx2fc: Support 'sequence cleanup' task
  [SCSI] dh_rdac: Associate HBA and storage in rdac_controller to support partitions in storage
  ...