Paul Gortmaker [Sun, 31 Jul 2011 20:06:06 +0000 (16:06 -0400)]
linux/dmaengine: implicitly is using asm/page.h
Fix it so we don't see this:
include/linux/dmaengine.h:684: warning: 'struct page' declared inside parameter list
include/linux/dmaengine.h:684: warning: its scope is only this definition or declaration, which is probably not what you want
include/linux/dmaengine.h:687: warning: 'struct page' declared inside parameter list
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 31 Jul 2011 14:52:44 +0000 (10:52 -0400)]
arm: fix implicit memset usage in omap2 usb-tusb6010.c
To fix this:
arch/arm/mach-omap2/usb-tusb6010.c: In function 'tusb_set_async_mode':
arch/arm/mach-omap2/usb-tusb6010.c:58: error: implicit declaration of function 'memset'
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 31 Jul 2011 14:42:00 +0000 (10:42 -0400)]
arm: fix implicit use of PAGE_SHIFT in collie.c
Otherwise we get this:
CC arch/arm/mach-sa1100/collie.o
arch/arm/mach-sa1100/collie.c:361: error: 'PAGE_SHIFT' undeclared here (not in a function)
make[3]: *** [arch/arm/mach-sa1100/collie.o] Error 1
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 31 Jul 2011 08:35:36 +0000 (04:35 -0400)]
powerpc: mpc7448_hpc2.c needs module.h for search_exception_tables()
Or else we'll get this:
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c: In function 'mpc7448_machine_check_exception':
arch/powerpc/platforms/embedded6xx/mpc7448_hpc2.c:207: error: implicit declaration of function 'search_exception_tables'
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
arch/mips/pci/pci-rc32434.c: In function 'rc32434_pci_init':
arch/mips/pci/pci-rc32434.c:218: error: 'rcrc32434_res_pci_io1' undeclared (first use in this function)
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> CC: Joe Perches <joe@perches.com>
Paul Gortmaker [Sun, 31 Jul 2011 06:38:31 +0000 (02:38 -0400)]
staging: ft1000_proc needs asm/io.h for inw/outw on sparc
Seen during an allmodconfig build for sparc:
CC [M] drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.o
In file included from drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:26:
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h: In function 'ft1000_read_reg':
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h:80: error: implicit declaration of function 'inw'
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h: In function 'ft1000_write_reg':
drivers/staging/ft1000/ft1000-pcmcia/ft1000.h:86: error: implicit declaration of function 'outw'
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 26 May 2011 17:46:22 +0000 (13:46 -0400)]
include: replace linux/module.h with "struct module" wherever possible
The <linux/module.h> pretty much brings in the kitchen sink along
with it, so it should be avoided wherever reasonably possible in
terms of being included from other commonly used <linux/something.h>
files, as it results in a measureable increase on compile times.
The worst culprit was probably device.h since it is used everywhere.
This file also had an implicit dependency/usage of mutex.h which was
masked by module.h, and is also fixed here at the same time.
There are over a dozen other headers that simply declare the
struct instead of pulling in the whole file, so follow their lead
and simply make it a few more.
Most of the implicit dependencies on module.h being present by
these headers pulling it in have been now weeded out, so we can
finally make this change with hopefully minimal breakage.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Fri, 27 May 2011 13:02:11 +0000 (09:02 -0400)]
include: convert various register fcns to macros to avoid include chaining
The original implementations reference THIS_MODULE in an inline.
We could include <linux/export.h>, but it is better to avoid chaining.
Fortunately someone else already thought of this, and made a similar
inline into a #define in <linux/device.h> for device_schedule_callback(),
[see commit 523ded71de0] so follow that precedent here.
Also bubble up any __must_check that were used on the prev. wrapper inline
functions up one to the real __register functions, to preserve any prev.
sanity checks that were used in those instances.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 26 May 2011 17:38:59 +0000 (13:38 -0400)]
net: sch_generic remove redundant use of <linux/module.h>
This file has modular references, but they are limited to
those which are covered by the simple "struct module;"
declaration used in dozens of other places. In fact that
declaration is already there (just outside of the context
of this commit) so simply remove the include line.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 17 Jul 2011 21:05:31 +0000 (17:05 -0400)]
uwb.h: fix implicit use of asm/page.h for PAGE_SIZE
Once we clean up the implicit presence of module.h (and all its
sub-includes), we'll see an implicit dependency on page.h for
the PAGE_SIZE define. So fix it in advance.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Stephen Rothwell [Fri, 29 Jul 2011 06:55:11 +0000 (16:55 +1000)]
linux/dmaengine.h needs bitmap.h
Presumably caused by some include file no longer being implicitly
included.
In file included from drivers/dma/iovlock.c:28:0:
include/linux/dmaengine.h: In function '__dma_cap_zero':
include/linux/dmaengine.h:736:2: error: implicit declaration of function 'bitmap_zero'
In file included from include/linux/nodemask.h:95:0,
from include/linux/mmzone.h:16,
from include/linux/gfp.h:4,
from include/linux/mm.h:8,
from include/linux/pagemap.h:7,
from drivers/dma/iovlock.c:29:
include/linux/bitmap.h: At top level:
include/linux/bitmap.h:159:20: warning: conflicting types for 'bitmap_zero'
include/linux/bitmap.h:159:20: error: static declaration of 'bitmap_zero' follows non-static declaration
include/linux/dmaengine.h:736:2: note: previous implicit declaration of 'bitmap_zero' was here
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 17 Jul 2011 21:11:26 +0000 (17:11 -0400)]
linux/stop_machine.h: fix implicit use of smp.h for smp_processor_id
This will show up on MIPS when we fix all the implicit header presences
that are because of module.h being everywhere.
In file included from kernel/trace/ftrace.c:16:
include/linux/stop_machine.h: In function 'stop_one_cpu':
include/linux/stop_machine.h:50: error: implicit declaration of function 'smp_processor_id'
include/linux/stop_machine.h: In function 'stop_cpus':
include/linux/stop_machine.h:80: error: implicit declaration of function 'raw_smp_processor_id'
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
The <linux/crypto.h> (which is in turn in common headers
like tcp.h) wants to use module_name() in an inline fcn.
But having all of <linux/module.h> along for the ride is
overkill and slows down compiles by a measureable amount,
since it in turn includes lots of headers.
Since the inline is never used anywhere in the kernel[1],
we can just remove it, and then also remove the module.h
include as well.
In all the many crypto modules, there were some relying on
crypto.h including module.h -- for them we now explicitly
call out module.h for inclusion.
[1] git grep shows some staging drivers also define the same
static inline, but they also never ever use it.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 26 May 2011 17:36:45 +0000 (13:36 -0400)]
net: inet_timewait_sock doesnt need <linux/module.h>
There is nothing module specific in this header, and removing
it doesn't seem to uncover any implicit dependencies either.
Must be simply a vestige of an ancient legacy.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Thu, 26 May 2011 15:41:46 +0000 (11:41 -0400)]
sysdev.h: dont include <linux/module.h> for no reason
The <linux/module.h> pretty much brings in the kitchen sink along
with it, so it should be avoided wherever reasonably possible in
terms of being included from other commonly used <linux/something.h>
files, as it results in a measureable increase on compile times.
There doesn't appear to be any module specifics in this file.
The obvious people who were relying on the presence of
the vast amount of stuff module.h sucked in have been fixed.
If other files are implicitly relying on it, then lets see who
they are and fix them too.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 3 Jul 2011 17:37:56 +0000 (13:37 -0400)]
drivers/edac: Add module.h to mce_amd_inj.c
This file really needs the full module.h header file present, but
was just getting it implicitly before. Fix it up in advance so we
avoid build failures once the cleanup commit is present.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Randy Dunlap [Sat, 30 Jul 2011 01:09:12 +0000 (18:09 -0700)]
drivers/sfi: sfi_acpi.c needs sysfs.h
sfi_acpi.c needs to include linux/sysfs.h for data types.
drivers/sfi/sfi_core.h:66: error: field 'attr' has incomplete type
drivers/sfi/sfi_acpi.c:179: warning: 'struct kobject' declared inside parameter list
drivers/sfi/sfi_acpi.c:179: warning: its scope is only this definition or declaration, which is probably not what you want
drivers/sfi/sfi_acpi.c:182: warning: type defaults to 'int' in declaration of '__mptr'
drivers/sfi/sfi_acpi.c:182: warning: initialization from incompatible pointer type
Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 3 Jul 2011 17:37:11 +0000 (13:37 -0400)]
drivers/dca: Add module.h to dca-core.c
This file really needs the full module.h header file present, but
was just getting it implicitly before. Call it out in advance so
that we don't get future build failures on this.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Fri, 15 Jul 2011 20:48:24 +0000 (16:48 -0400)]
rapidio: Fix up those implicitly relying on getting stat.h
Upon the trial removal of the implicit presence of module.h,
lots of files showed up that were getting the sub-includes
by default without calling them out. Here is more of them.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Stephen Rothwell [Fri, 29 Jul 2011 06:05:38 +0000 (16:05 +1000)]
drivers/of: include export.h for EXPORT_SYMBOL_GPL in of_pci_irq.c
This is an interaction with commit 98d9f30c820d ("pci/of: Match PCI
devices to OF nodes dynamically") which split off part of
drivers/of/of_pci.c, causing:
drivers/of/of_pci_irq.c:92:1: warning: data definition has no type or storage class
drivers/of/of_pci_irq.c:92:1: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL_GPL'
drivers/of/of_pci_irq.c:92:1: warning: parameter names (without types) in function declaration
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Paul Gortmaker [Sun, 10 Jul 2011 16:20:27 +0000 (12:20 -0400)]
drm: Add export.h for EXPORT_SYMBOL to ttm/ttm_tt.c
This exports symbols, but wasn't calling out the module.h header
before. Add in export.h so that it still builds once we halt the
spread of module.h to every file.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>