All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig
@ 2012-11-19  5:27 Josh Triplett
  2012-11-19  5:27 ` [PATCH 01/58] pty: Mark pty_resize static Josh Triplett
                   ` (58 more replies)
  0 siblings, 59 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Michal Marek, linux-kbuild, linux-kernel; +Cc: Josh Triplett

[In addition to the patch mails sent as replies to this email, I've made this
series available for pulling as a signed tag from:

  git://git.kernel.org/pub/scm/linux/kernel/git/josh/linux tags/Wmissing-prototypes-allnoconfig

for you to fetch changes up to 4cb5b6cf8a272557cbd1c88a56cf40355a7a69f1:

  sched: Move stubs for CONFIG_RT_GROUP_SCHED=n to sched.h (2012-11-08 09:38:06 -0800)

I started this series from v3.7-rc3, but I've confirmed that it merges into
v3.7-rc6 and still builds.]

GCC (with -Wmissing-prototypes) and Sparse (with -Wdecl, on by default)
warn about non-static function definitions without previous prototypes.
The two most common fixes for this warning represent useful code
improvements:

- Marking internal file-local functions static, which allows
  cross-function optimizations and dead code detection.

- Including the header files that prototype non-internal functions,
  which ensures that the prototype matches the definition, and gets
  defined under all the same circumstances (such as preprocessor
  symbols).

To observe these warnings, apply the following Makefile patch (not
included in this series to avoid introducing a large number of new,
unfixed warnings):

--- a/Makefile
+++ b/Makefile
@@ -369,7 +369,8 @@ LINUXINCLUDE    := \
 
 KBUILD_CPPFLAGS := -D__KERNEL__
 
-KBUILD_CFLAGS   := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
+KBUILD_CFLAGS   := -Wall -Wundef -Wmissing-prototypes -Wstrict-prototypes \
+		   -Wno-trigraphs \
 		   -fno-strict-aliasing -fno-common \
 		   -Werror-implicit-function-declaration \
 		   -Wno-format-security \

This patch series eliminates all such warnings from a "make allnoconfig"
kernel.  I started with allnoconfig to create the smallest possible
warning-free baseline; allnoconfig also triggered various edge cases for
stub functions or different preprocessor conditionals around definitions
and header prototypes, which would not appear in a defconfig or
allyesconfig build.

In addition to the above two types of fixes (marking internal functions
static and including headers for non-internal functions), these patches
also:

- Fix some ifdef logic to avoid defining unused and un-prototyped
  functions
- Drop some completely unused functions
- Drop __weak from one function (hw_breakpoint_weight) and make it
  static instead, because no architecture actually overrides that
  function anymore.
- In a few cases, add a dummy prototype immediately before a function to
  suppress the warning; those cases typically involved a function called
  from only one other file and referenced via an explict extern
  prototype, which shouldn't necessarily go in a header file or
  encourage more widespread use.  For instance, this occurred with
  functions called from init/main.c.

I've CCed appropriate maintainers for each individual patch, but I
really hope this series can just go in as a single pull rather than
filtering in through several dozen different trees.

Josh Triplett (58):
  pty: Mark pty_resize static
  drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch
  sched: Mark scale_rt_power static
  x86: apic: Mark enable_IR static
  x86: Only define default_init_apic_ldr for 32-bit
  trace: Mark tracing_dentry_percpu static
  lib/iommu-helper.c: Include <linux/iommu-helper.h> for function prototypes
  tty: Mark tty_del_file and __tty_hangup static
  fs/locks.c: Mark generic_add_lease and generic_delete_lease static
  swiotlb: Prototype swiotlb_late_init_with_default_size in swiotlb.h
  tty: Mark sysfs_attr_ns static
  linux/irq_work.h: Add prototype for arch_irq_work_raise
  RCU: Make rcu_is_cpu_rrupt_from_idle helper functions static
  x86: Mark EVT_TO_HPET_DEV static
  kernel/time/timekeeping.c: Include tick-internal.h for do_timer prototype
  drivers/base/core.c: Mark to_root_device static
  arch/x86/kernel/cpu/perf_event_intel_uncore.c: Mark internal functions static
  mm: bootmem: Declare internal ___alloc_bootmem_node function static
  block: Mark __blkdev_issue_zeroout static
  kernel/events/hw_breakpoint.c: Make hw_breakpoint_weight static
  kernel/events/core.c: Mark internal function static
  arch/x86/kernel/cpu/common.c: Mark cpu_detect_tlb static
  mm: Avoid defining set_iounmap_nonlazy on non-x86
  mm: include/linux/huge_mm.h: Declare is_vma_temporary_stack unconditionally
  mm: include/linux/huge_mm.h: Declare handle_pte_fault unconditionally
  mm/internal.h: Declare vma_address unconditionally
  x86: apic: Make apic_flat_64.c include asm/apic_flat_64.h for flat_init_apic_ldr prototype
  x86: io_apic: Don't define acpi_get_override_irq if CONFIG_ACPI=n
  mm: Make copy_pte_range static
  block: Eliminate unused function kblockd_schedule_delayed_work
  perf: cgroup: Drop unused perf_cgroup_switch stub
  kernel/resource.c: Include linux/mm.h for page_is_ram prototype
  kernel/resource.c: Make internal function reallocate_resource static
  kbuild: kernel/bounds.c: Add prototype for dummy function foo
  x86: arch/x86/kernel/asm-offsets.c: Add prototype for dummy function common
  kernel/fork.c: Add prototype for __weak stub of arch_release_thread_info
  kernel/fork.c: Add prototype for fork_init
  block: Mark internal function blk_drain_queue static
  kernel/events/core.c: Add prototype for __weak stub of arch_perf_update_userpage
  panic: Add prototype for __weak stub of panic_smp_self_stop
  init/calibrate.c: Add prototype for __weak stub of calibrate_delay_is_known
  kernel/events/hw_breakpoint.c: Add prototype for __weak stub of arch_unregister_hw_breakpoint
  mm: Mark fallback version of __early_pfn_to_nid static
  mm: Only define is_pageblock_removable_nolock when needed
  x86: Fix prototype for renamed function smp_threshold_interrupt
  x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ
  x86: arch/x86/kernel/process.c: Include asm/switch_to.h for __switch_to_xtra prototype
  x86: arch/x86/kernel/time.c: Include asm/setup.h for setup_default_timer_irq prototype
  x86: init: Mark internal functions iommu_init_noop and iommu_shutdown_noop static
  x86: arch/x86/kernel/irq_work.c: Add prototype for smp_irq_work_interrupt
  x86: perf: Add prototype for arch_perf_update_userpage
  x86: vdso: Add prototypes for __vdso_* functions
  linux/syscalls.h: Add prototypes for sys_rt_sigaction and sys_rt_sigsuspend
  linux/syscalls.h: Include asm/syscalls.h for additional prototypes
  sched: Add prototype for sched_set_stop_task
  sched: Only define init_cfs_bandwidth stub when CONFIG_FAIR_GROUP_SCHED=y
  sched: Move stubs for CONFIG_FAIR_GROUP_SCHED=n to sched.h
  sched: Move stubs for CONFIG_RT_GROUP_SCHED=n to sched.h

 arch/ia64/hp/common/sba_iommu.c               |    3 +--
 arch/x86/include/asm/traps.h                  |    2 +-
 arch/x86/kernel/apic/apic.c                   |    4 +++-
 arch/x86/kernel/apic/apic_flat_64.c           |    1 +
 arch/x86/kernel/apic/io_apic.c                |    2 ++
 arch/x86/kernel/asm-offsets.c                 |    2 ++
 arch/x86/kernel/cpu/common.c                  |    2 +-
 arch/x86/kernel/cpu/perf_event.c              |    2 ++
 arch/x86/kernel/cpu/perf_event_intel_uncore.c |    8 ++++----
 arch/x86/kernel/hpet.c                        |    2 +-
 arch/x86/kernel/irq_work.c                    |    2 ++
 arch/x86/kernel/irqinit.c                     |    1 +
 arch/x86/kernel/process.c                     |    1 +
 arch/x86/kernel/time.c                        |    1 +
 arch/x86/kernel/x86_init.c                    |    4 ++--
 arch/x86/pci/sta2x11-fixup.c                  |    2 +-
 arch/x86/vdso/vclock_gettime.c                |    3 +++
 arch/x86/vdso/vgetcpu.c                       |    2 ++
 block/blk-core.c                              |    9 +--------
 block/blk-lib.c                               |    2 +-
 drivers/base/core.c                           |    2 +-
 drivers/tty/pty.c                             |    2 +-
 drivers/tty/tty_io.c                          |    4 ++--
 drivers/tty/vt/vt_ioctl.c                     |    1 +
 fs/locks.c                                    |    4 ++--
 fs/sysfs/file.c                               |    4 ++--
 include/linux/huge_mm.h                       |   15 ++++++---------
 include/linux/irq_work.h                      |    2 ++
 include/linux/swiotlb.h                       |    1 +
 include/linux/syscalls.h                      |    4 ++++
 init/calibrate.c                              |    1 +
 kernel/bounds.c                               |    2 ++
 kernel/events/core.c                          |   13 +++++--------
 kernel/events/hw_breakpoint.c                 |    3 ++-
 kernel/fork.c                                 |    4 ++++
 kernel/panic.c                                |    1 +
 kernel/rcutiny.c                              |    2 +-
 kernel/rcutree.c                              |    2 +-
 kernel/resource.c                             |    3 ++-
 kernel/sched/core.c                           |    2 ++
 kernel/sched/fair.c                           |   16 ++--------------
 kernel/sched/rt.c                             |    7 -------
 kernel/sched/sched.h                          |   24 ++++++++++++++++++++++++
 kernel/time/timekeeping.c                     |    1 +
 kernel/trace/trace.c                          |    2 +-
 lib/iommu-helper.c                            |    1 +
 mm/bootmem.c                                  |    8 +++++---
 mm/internal.h                                 |    2 --
 mm/memory.c                                   |    7 ++++---
 mm/nobootmem.c                                |    8 +++++---
 mm/page_alloc.c                               |    4 +++-
 mm/vmalloc.c                                  |    3 +++
 52 files changed, 125 insertions(+), 85 deletions(-)

-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 01/58] pty: Mark pty_resize static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
                   ` (57 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Greg Kroah-Hartman, linux-kernel; +Cc: Josh Triplett

Nothing outside of drivers/tty/pty.c references pty_resize.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 drivers/tty/pty.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index a82b399..2fd1ae7 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -245,7 +245,7 @@ static void pty_set_termios(struct tty_struct *tty,
  *	peform a terminal resize correctly
  */
 
-int pty_resize(struct tty_struct *tty,  struct winsize *ws)
+static int pty_resize(struct tty_struct *tty,  struct winsize *ws)
 {
 	struct pid *pgrp, *rpgrp;
 	unsigned long flags;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
  2012-11-19  5:27 ` [PATCH 01/58] pty: Mark pty_resize static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 03/58] sched: Mark scale_rt_power static Josh Triplett
                   ` (56 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Greg Kroah-Hartman, Alan Cox, Andrew Morton,
	Rabin Vincent, Samuel Thibault, linux-kernel
  Cc: Josh Triplett

C files should include the header files that prototype their functions.
This keeps the types in sync, and eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 drivers/tty/vt/vt_ioctl.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index b841f56..98ff173 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -25,6 +25,7 @@
 #include <linux/console.h>
 #include <linux/consolemap.h>
 #include <linux/signal.h>
+#include <linux/suspend.h>
 #include <linux/timex.h>
 
 #include <asm/io.h>
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 03/58] sched: Mark scale_rt_power static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
  2012-11-19  5:27 ` [PATCH 01/58] pty: Mark pty_resize static Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 04/58] x86: apic: Mark enable_IR static Josh Triplett
                   ` (55 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Ingo Molnar, Peter Zijlstra, linux-kernel; +Cc: Josh Triplett

Nothing outside of kernel/sched/fair.c references scale_rt_power, so
mark it static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/sched/fair.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 6b800a1..7e29e80 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -3508,7 +3508,7 @@ unsigned long __weak arch_scale_smt_power(struct sched_domain *sd, int cpu)
 	return default_scale_smt_power(sd, cpu);
 }
 
-unsigned long scale_rt_power(int cpu)
+static unsigned long scale_rt_power(int cpu)
 {
 	struct rq *rq = cpu_rq(cpu);
 	u64 total, available, age_stamp, avg;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 04/58] x86: apic: Mark enable_IR static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (2 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 03/58] sched: Mark scale_rt_power static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 05/58] x86: Only define default_init_apic_ldr for 32-bit Josh Triplett
                   ` (54 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Suresh Siddha, Joerg Roedel, Alexander Gordeev, Yinghai Lu,
	linux-kernel
  Cc: Josh Triplett

Nothing outside of arch/x86/kernel/apic/apic.c references enable_IR.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/apic/apic.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index b17416e..5a92aeb 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1517,7 +1517,7 @@ void enable_x2apic(void)
 }
 #endif /* CONFIG_X86_X2APIC */
 
-int __init enable_IR(void)
+static int __init enable_IR(void)
 {
 #ifdef CONFIG_IRQ_REMAP
 	if (!irq_remapping_supported()) {
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 05/58] x86: Only define default_init_apic_ldr for 32-bit
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (3 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 04/58] x86: apic: Mark enable_IR static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 06/58] trace: Mark tracing_dentry_percpu static Josh Triplett
                   ` (53 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Suresh Siddha, Joerg Roedel, Alexander Gordeev, Yinghai Lu,
	linux-kernel
  Cc: Josh Triplett

default_init_apic_ldr only exists for use in the 32-bit-only
arch/x86/kernel/apic/probe_32.c, and asm/apic.h prototypes it in an
ifdef CONFIG_X86_32 block, but arch/x86/kernel/apic/apic.c defines the
function unconditionally.  Wrap the definition in an ifdef CONFIG_X86_32
block.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/apic/apic.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
index 5a92aeb..bce0492 100644
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -2113,6 +2113,7 @@ int hard_smp_processor_id(void)
 	return read_apic_id();
 }
 
+#ifdef CONFIG_X86_32
 void default_init_apic_ldr(void)
 {
 	unsigned long val;
@@ -2122,6 +2123,7 @@ void default_init_apic_ldr(void)
 	val |= SET_APIC_LOGICAL_ID(1UL << smp_processor_id());
 	apic_write(APIC_LDR, val);
 }
+#endif
 
 int default_cpu_mask_to_apicid_and(const struct cpumask *cpumask,
 				   const struct cpumask *andmask,
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 06/58] trace: Mark tracing_dentry_percpu static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (4 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 05/58] x86: Only define default_init_apic_ldr for 32-bit Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2013-02-03 19:15   ` [tip:perf/core] tracing: Mark tracing_dentry_percpu() static tip-bot for Josh Triplett
  2012-11-19  5:27 ` [PATCH 07/58] lib/iommu-helper.c: Include <linux/iommu-helper.h> for function prototypes Josh Triplett
                   ` (52 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Steven Rostedt, Frederic Weisbecker, Ingo Molnar,
	linux-kernel
  Cc: Josh Triplett

Nothing outside of kernel/trace/trace.c references tracing_dentry_percpu.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/trace/trace.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 31e4f55..032f9ee 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4461,7 +4461,7 @@ struct dentry *tracing_init_dentry(void)
 
 static struct dentry *d_percpu;
 
-struct dentry *tracing_dentry_percpu(void)
+static struct dentry *tracing_dentry_percpu(void)
 {
 	static int once;
 	struct dentry *d_tracer;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 07/58] lib/iommu-helper.c: Include <linux/iommu-helper.h> for function prototypes
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (5 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 06/58] trace: Mark tracing_dentry_percpu static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 08/58] tty: Mark tty_del_file and __tty_hangup static Josh Triplett
                   ` (51 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Paul Gortmaker, Josh Triplett, linux-kernel

C files should include the header files that prototype their functions.
This keeps the types in sync, and eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

lib/iommu-helper.c:9:5: warning: no previous prototype for ‘iommu_is_span_boundary’ [-Wmissing-prototypes]
lib/iommu-helper.c:19:15: warning: no previous prototype for ‘iommu_area_alloc’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 lib/iommu-helper.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/iommu-helper.c b/lib/iommu-helper.c
index c27e269..41d35fb 100644
--- a/lib/iommu-helper.c
+++ b/lib/iommu-helper.c
@@ -5,6 +5,7 @@
 #include <linux/export.h>
 #include <linux/bitmap.h>
 #include <linux/bug.h>
+#include <linux/iommu-helper.h>
 
 int iommu_is_span_boundary(unsigned int index, unsigned int nr,
 			   unsigned long shift,
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 08/58] tty: Mark tty_del_file and __tty_hangup static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (6 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 07/58] lib/iommu-helper.c: Include <linux/iommu-helper.h> for function prototypes Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 09/58] fs/locks.c: Mark generic_add_lease and generic_delete_lease static Josh Triplett
                   ` (50 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Greg Kroah-Hartman, linux-kernel; +Cc: Josh Triplett

Nothing outside of drivers/tty/tty_io.c references these functions, so
mark them static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 drivers/tty/tty_io.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 2ea176b..023d1fd 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -237,7 +237,7 @@ void tty_free_file(struct file *file)
 }
 
 /* Delete file from its tty */
-void tty_del_file(struct file *file)
+static void tty_del_file(struct file *file)
 {
 	struct tty_file_private *priv = file->private_data;
 
@@ -555,7 +555,7 @@ EXPORT_SYMBOL_GPL(tty_wakeup);
  *		  tasklist_lock to walk task list for hangup event
  *		    ->siglock to protect ->signal/->sighand
  */
-void __tty_hangup(struct tty_struct *tty)
+static void __tty_hangup(struct tty_struct *tty)
 {
 	struct file *cons_filp = NULL;
 	struct file *filp, *f = NULL;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 09/58] fs/locks.c: Mark generic_add_lease and generic_delete_lease static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (7 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 08/58] tty: Mark tty_del_file and __tty_hangup static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 10/58] swiotlb: Prototype swiotlb_late_init_with_default_size in swiotlb.h Josh Triplett
                   ` (49 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Matthew Wilcox, Alexander Viro, linux-fsdevel,
	linux-kernel
  Cc: Josh Triplett

Nothing outside of fs/locks.c references these functions, so mark them
static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 fs/locks.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index a94e331..01051de 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1338,7 +1338,7 @@ int fcntl_getlease(struct file *filp)
 	return type;
 }
 
-int generic_add_lease(struct file *filp, long arg, struct file_lock **flp)
+static int generic_add_lease(struct file *filp, long arg, struct file_lock **flp)
 {
 	struct file_lock *fl, **before, **my_before = NULL, *lease;
 	struct dentry *dentry = filp->f_path.dentry;
@@ -1403,7 +1403,7 @@ out:
 	return error;
 }
 
-int generic_delete_lease(struct file *filp, struct file_lock **flp)
+static int generic_delete_lease(struct file *filp, struct file_lock **flp)
 {
 	struct file_lock *fl, **before;
 	struct dentry *dentry = filp->f_path.dentry;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 10/58] swiotlb: Prototype swiotlb_late_init_with_default_size in swiotlb.h
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (8 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 09/58] fs/locks.c: Mark generic_add_lease and generic_delete_lease static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 11/58] tty: Mark sysfs_attr_ns static Josh Triplett
                   ` (48 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Tony Luck, Fenghua Yu, Thomas Gleixner,
	Ingo Molnar, H. Peter Anvin, x86, Konrad Rzeszutek Wilk,
	Josh Triplett, David Howells, Kyungmin Park, Marek Szyprowski,
	Alessandro Rubini, Giancarlo Asnaghi, linux-ia64, linux-kernel

Several source files reference swiotlb_late_init_with_default_size with
an extern prototype; declare it in linux/swiotlb.h instead.

This also ensures that lib/swiotlb.c has a matching prototype for
swiotlb_late_init_with_default_size, keeping the types in sync, and
eliminating warnings from GCC (-Wmissing-prototypes) and Sparse
(-Wdecl).

lib/swiotlb.c:207:1: warning: no previous prototype for ‘swiotlb_late_init_with_default_size’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/ia64/hp/common/sba_iommu.c |    3 +--
 arch/x86/pci/sta2x11-fixup.c    |    2 +-
 include/linux/swiotlb.h         |    1 +
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index bcda5b2..d37d4af 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -38,6 +38,7 @@
 #include <linux/iommu-helper.h>
 #include <linux/dma-mapping.h>
 #include <linux/prefetch.h>
+#include <linux/swiotlb.h>
 
 #include <asm/delay.h>		/* ia64_get_itc() */
 #include <asm/io.h>
@@ -46,8 +47,6 @@
 
 #include <asm/acpi-ext.h>
 
-extern int swiotlb_late_init_with_default_size (size_t size);
-
 #define PFX "IOC: "
 
 /*
diff --git a/arch/x86/pci/sta2x11-fixup.c b/arch/x86/pci/sta2x11-fixup.c
index 9d8a509..27dde02 100644
--- a/arch/x86/pci/sta2x11-fixup.c
+++ b/arch/x86/pci/sta2x11-fixup.c
@@ -26,9 +26,9 @@
 #include <linux/pci_ids.h>
 #include <linux/export.h>
 #include <linux/list.h>
+#include <linux/swiotlb.h>
 
 #define STA2X11_SWIOTLB_SIZE (4*1024*1024)
-extern int swiotlb_late_init_with_default_size(size_t default_size);
 
 /*
  * We build a list of bus numbers that are under the ConneXt. The
diff --git a/include/linux/swiotlb.h b/include/linux/swiotlb.h
index 8d08b3e..7e3b8c5 100644
--- a/include/linux/swiotlb.h
+++ b/include/linux/swiotlb.h
@@ -23,6 +23,7 @@ extern int swiotlb_force;
 #define IO_TLB_SHIFT 11
 
 extern void swiotlb_init(int verbose);
+extern int swiotlb_late_init_with_default_size(size_t default_size);
 extern void swiotlb_init_with_tbl(char *tlb, unsigned long nslabs, int verbose);
 extern unsigned long swiotlb_nr_tbl(void);
 extern int swiotlb_late_init_with_tbl(char *tlb, unsigned long nslabs);
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 11/58] tty: Mark sysfs_attr_ns static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (9 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 10/58] swiotlb: Prototype swiotlb_late_init_with_default_size in swiotlb.h Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-21 23:18   ` Greg Kroah-Hartman
  2012-11-19  5:27 ` [PATCH 12/58] linux/irq_work.h: Add prototype for arch_irq_work_raise Josh Triplett
                   ` (47 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Greg Kroah-Hartman, linux-kernel; +Cc: Josh Triplett

Nothing outside of fs/sysfs/file.c references this function, so mark it static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 fs/sysfs/file.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c
index 00012e3..602f56d 100644
--- a/fs/sysfs/file.c
+++ b/fs/sysfs/file.c
@@ -485,8 +485,8 @@ const struct file_operations sysfs_file_operations = {
 	.poll		= sysfs_poll,
 };
 
-int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr,
-		  const void **pns)
+static int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr,
+			 const void **pns)
 {
 	struct sysfs_dirent *dir_sd = kobj->sd;
 	const struct sysfs_ops *ops;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 12/58] linux/irq_work.h: Add prototype for arch_irq_work_raise
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (10 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 11/58] tty: Mark sysfs_attr_ns static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 13/58] RCU: Make rcu_is_cpu_rrupt_from_idle helper functions static Josh Triplett
                   ` (46 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Josh Triplett, linux-kernel

Several architectures define arch_irq_work_raise, and kernel/irq_work.c
defines a __weak version for architectures that do not.  However,
nothing ever prototypes this function, leading to warnings from GCC and
Sparse like this:

kernel/irq_work.c:52:28: warning: no previous prototype for ‘arch_irq_work_raise’ [-Wmissing-prototypes]

Add a prototype for this function in linux/irq_work.h.  In addition to
eliminating the warnings, this also ensures that the types for all
versions of the function will stay in sync.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/irq_work.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h
index 6a9e8f5..c23821e 100644
--- a/include/linux/irq_work.h
+++ b/include/linux/irq_work.h
@@ -20,4 +20,6 @@ bool irq_work_queue(struct irq_work *work);
 void irq_work_run(void);
 void irq_work_sync(struct irq_work *work);
 
+void arch_irq_work_raise(void);
+
 #endif /* _LINUX_IRQ_WORK_H */
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 13/58] RCU: Make rcu_is_cpu_rrupt_from_idle helper functions static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (11 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 12/58] linux/irq_work.h: Add prototype for arch_irq_work_raise Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-20 17:57   ` Paul E. McKenney
  2012-11-19  5:27 ` [PATCH 14/58] x86: Mark EVT_TO_HPET_DEV static Josh Triplett
                   ` (45 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Dipankar Sarma, Paul E. McKenney, linux-kernel
  Cc: Josh Triplett

Both rcutiny and rcutree define a helper funtion
rcu_is_cpu_rrupt_from_idle, each used exactly once, later in the same
file.  Declare these helper functions static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/rcutiny.c |    2 +-
 kernel/rcutree.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
index e4c6a59..0e506c3 100644
--- a/kernel/rcutiny.c
+++ b/kernel/rcutiny.c
@@ -193,7 +193,7 @@ EXPORT_SYMBOL(rcu_is_cpu_idle);
  * interrupts don't count, we must be running at the first interrupt
  * level.
  */
-int rcu_is_cpu_rrupt_from_idle(void)
+static int rcu_is_cpu_rrupt_from_idle(void)
 {
 	return rcu_dynticks_nesting <= 0;
 }
diff --git a/kernel/rcutree.c b/kernel/rcutree.c
index 74df86b..70d9b6e 100644
--- a/kernel/rcutree.c
+++ b/kernel/rcutree.c
@@ -783,7 +783,7 @@ EXPORT_SYMBOL_GPL(rcu_lockdep_current_cpu_online);
  * interrupt from idle, return true.  The caller must have at least
  * disabled preemption.
  */
-int rcu_is_cpu_rrupt_from_idle(void)
+static int rcu_is_cpu_rrupt_from_idle(void)
 {
 	return __get_cpu_var(rcu_dynticks).dynticks_nesting <= 1;
 }
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 14/58] x86: Mark EVT_TO_HPET_DEV static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (12 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 13/58] RCU: Make rcu_is_cpu_rrupt_from_idle helper functions static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 15/58] kernel/time/timekeeping.c: Include tick-internal.h for do_timer prototype Josh Triplett
                   ` (44 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Venkatesh Pallipadi (Venki),
	Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, linux-kernel
  Cc: Josh Triplett

Nothing outside of arch/x86/kernel/hpet.c references this function, so
mark it static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/hpet.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/hpet.c b/arch/x86/kernel/hpet.c
index 1460a5d..2dd92ae 100644
--- a/arch/x86/kernel/hpet.c
+++ b/arch/x86/kernel/hpet.c
@@ -52,7 +52,7 @@ struct hpet_dev {
 	char				name[10];
 };
 
-inline struct hpet_dev *EVT_TO_HPET_DEV(struct clock_event_device *evtdev)
+static inline struct hpet_dev *EVT_TO_HPET_DEV(struct clock_event_device *evtdev)
 {
 	return container_of(evtdev, struct hpet_dev, evt);
 }
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 15/58] kernel/time/timekeeping.c: Include tick-internal.h for do_timer prototype
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (13 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 14/58] x86: Mark EVT_TO_HPET_DEV static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 16/58] drivers/base/core.c: Mark to_root_device static Josh Triplett
                   ` (43 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, John Stultz, Thomas Gleixner, linux-kernel; +Cc: Josh Triplett

C files should include the header files that prototype their functions.
This keeps the types in sync, and eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/time/timekeeping.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c
index e424970..4d0a195 100644
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -22,6 +22,7 @@
 #include <linux/tick.h>
 #include <linux/stop_machine.h>
 
+#include "tick-internal.h"
 
 static struct timekeeper timekeeper;
 
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 16/58] drivers/base/core.c: Mark to_root_device static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (14 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 15/58] kernel/time/timekeeping.c: Include tick-internal.h for do_timer prototype Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 17/58] arch/x86/kernel/cpu/perf_event_intel_uncore.c: Mark internal functions static Josh Triplett
                   ` (42 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Greg Kroah-Hartman, linux-kernel; +Cc: Josh Triplett

Nothing outside of drivers/base/core.c references this function.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 drivers/base/core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/base/core.c b/drivers/base/core.c
index abea76c..720441d 100644
--- a/drivers/base/core.c
+++ b/drivers/base/core.c
@@ -1399,7 +1399,7 @@ struct root_device {
 	struct module *owner;
 };
 
-inline struct root_device *to_root_device(struct device *d)
+static inline struct root_device *to_root_device(struct device *d)
 {
 	return container_of(d, struct root_device, dev);
 }
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 17/58] arch/x86/kernel/cpu/perf_event_intel_uncore.c: Mark internal functions static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (15 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 16/58] drivers/base/core.c: Mark to_root_device static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27   ` Josh Triplett
                   ` (41 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	linux-kernel
  Cc: Josh Triplett

Nothing outside of arch/x86/kernel/cpu/perf_event_intel_uncore.c
references the functions nhmex_mbox_alter_er, nhmex_rbox_alter_er,
uncore_alloc_box, or uncore_pmu_event_init; mark these funtions static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/cpu/perf_event_intel_uncore.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/x86/kernel/cpu/perf_event_intel_uncore.c b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
index 3cf3d97..ff3ba51 100644
--- a/arch/x86/kernel/cpu/perf_event_intel_uncore.c
+++ b/arch/x86/kernel/cpu/perf_event_intel_uncore.c
@@ -1239,7 +1239,7 @@ static void nhmex_mbox_put_shared_reg(struct intel_uncore_box *box, int idx)
 	atomic_sub(1 << (idx * 8), &er->ref);
 }
 
-u64 nhmex_mbox_alter_er(struct perf_event *event, int new_idx, bool modify)
+static u64 nhmex_mbox_alter_er(struct perf_event *event, int new_idx, bool modify)
 {
 	struct hw_perf_event *hwc = &event->hw;
 	struct hw_perf_event_extra *reg1 = &hwc->extra_reg;
@@ -1554,7 +1554,7 @@ static struct intel_uncore_type nhmex_uncore_mbox = {
 	.format_group		= &nhmex_uncore_mbox_format_group,
 };
 
-void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event)
+static void nhmex_rbox_alter_er(struct intel_uncore_box *box, struct perf_event *event)
 {
 	struct hw_perf_event *hwc = &event->hw;
 	struct hw_perf_event_extra *reg1 = &hwc->extra_reg;
@@ -1934,7 +1934,7 @@ static void uncore_pmu_init_hrtimer(struct intel_uncore_box *box)
 	box->hrtimer.function = uncore_pmu_hrtimer;
 }
 
-struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, int cpu)
+static struct intel_uncore_box *uncore_alloc_box(struct intel_uncore_type *type, int cpu)
 {
 	struct intel_uncore_box *box;
 	int i, size;
@@ -2285,7 +2285,7 @@ out:
 	return ret;
 }
 
-int uncore_pmu_event_init(struct perf_event *event)
+static int uncore_pmu_event_init(struct perf_event *event)
 {
 	struct intel_uncore_pmu *pmu;
 	struct intel_uncore_box *box;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
@ 2012-11-19  5:27   ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
                     ` (57 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Johannes Weiner, David S. Miller,
	Tejun Heo, Gavin Shan, Yinghai Lu, linux-mm, linux-kernel
  Cc: Josh Triplett

Both mm/bootmem.c and mm/nobootmem.c define an internal function
___alloc_bootmem_node.  Nothing outside of those source files references
that function, so declare it static in both cases.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/bootmem.c   |    8 +++++---
 mm/nobootmem.c |    8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/mm/bootmem.c b/mm/bootmem.c
index 434be4a..93eb8bd 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -747,9 +747,11 @@ void * __init __alloc_bootmem_node_nopanic(pg_data_t *pgdat, unsigned long size,
 	return ___alloc_bootmem_node_nopanic(pgdat, size, align, goal, 0);
 }
 
-void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
-				    unsigned long align, unsigned long goal,
-				    unsigned long limit)
+static void * __init ___alloc_bootmem_node(pg_data_t *pgdat,
+					   unsigned long size,
+					   unsigned long align,
+					   unsigned long goal,
+					   unsigned long limit)
 {
 	void *ptr;
 
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index 714d5d6..c4e22a1 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -319,9 +319,11 @@ void * __init __alloc_bootmem_node_nopanic(pg_data_t *pgdat, unsigned long size,
 	return ___alloc_bootmem_node_nopanic(pgdat, size, align, goal, 0);
 }
 
-void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
-				    unsigned long align, unsigned long goal,
-				    unsigned long limit)
+static void * __init ___alloc_bootmem_node(pg_data_t *pgdat,
+					   unsigned long size,
+					   unsigned long align,
+					   unsigned long goal,
+					   unsigned long limit)
 {
 	void *ptr;
 
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static
@ 2012-11-19  5:27   ` Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Johannes Weiner, David S. Miller,
	Tejun Heo, Gavin Shan, Yinghai Lu, linux-mm, linux-kernel
  Cc: Josh Triplett

Both mm/bootmem.c and mm/nobootmem.c define an internal function
___alloc_bootmem_node.  Nothing outside of those source files references
that function, so declare it static in both cases.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/bootmem.c   |    8 +++++---
 mm/nobootmem.c |    8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/mm/bootmem.c b/mm/bootmem.c
index 434be4a..93eb8bd 100644
--- a/mm/bootmem.c
+++ b/mm/bootmem.c
@@ -747,9 +747,11 @@ void * __init __alloc_bootmem_node_nopanic(pg_data_t *pgdat, unsigned long size,
 	return ___alloc_bootmem_node_nopanic(pgdat, size, align, goal, 0);
 }
 
-void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
-				    unsigned long align, unsigned long goal,
-				    unsigned long limit)
+static void * __init ___alloc_bootmem_node(pg_data_t *pgdat,
+					   unsigned long size,
+					   unsigned long align,
+					   unsigned long goal,
+					   unsigned long limit)
 {
 	void *ptr;
 
diff --git a/mm/nobootmem.c b/mm/nobootmem.c
index 714d5d6..c4e22a1 100644
--- a/mm/nobootmem.c
+++ b/mm/nobootmem.c
@@ -319,9 +319,11 @@ void * __init __alloc_bootmem_node_nopanic(pg_data_t *pgdat, unsigned long size,
 	return ___alloc_bootmem_node_nopanic(pgdat, size, align, goal, 0);
 }
 
-void * __init ___alloc_bootmem_node(pg_data_t *pgdat, unsigned long size,
-				    unsigned long align, unsigned long goal,
-				    unsigned long limit)
+static void * __init ___alloc_bootmem_node(pg_data_t *pgdat,
+					   unsigned long size,
+					   unsigned long align,
+					   unsigned long goal,
+					   unsigned long limit)
 {
 	void *ptr;
 
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 19/58] block: Mark __blkdev_issue_zeroout static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (17 preceding siblings ...)
  2012-11-19  5:27   ` Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 20/58] kernel/events/hw_breakpoint.c: Make hw_breakpoint_weight static Josh Triplett
                   ` (39 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Jens Axboe, linux-kernel; +Cc: Josh Triplett

Nothing outside of block/blk-lib.c references __blkdev_issue_zeroout, so
mark it static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 block/blk-lib.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-lib.c b/block/blk-lib.c
index 9373b58..b19377f 100644
--- a/block/blk-lib.c
+++ b/block/blk-lib.c
@@ -214,7 +214,7 @@ EXPORT_SYMBOL(blkdev_issue_write_same);
  *  Generate and issue number of bios with zerofiled pages.
  */
 
-int __blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
+static int __blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
 			sector_t nr_sects, gfp_t gfp_mask)
 {
 	int ret;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 20/58] kernel/events/hw_breakpoint.c: Make hw_breakpoint_weight static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (18 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 19/58] block: Mark __blkdev_issue_zeroout static Josh Triplett
@ 2012-11-19  5:27 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 21/58] kernel/events/core.c: Mark internal function static Josh Triplett
                   ` (38 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:27 UTC (permalink / raw)
  To: Linus Torvalds, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, linux-kernel
  Cc: Josh Triplett

Commit f93a20541134fa767e8dc4eb32e956d30b9f6b92, in April 2010, added
the ability for hardware breakpoints to have variable "weight" in
allocations, and added a __weak function hw_breakpoint_weight that
architectures could override to set the weight of a breakpoint.  No
architecture has ever done so.

For now, change the function from __weak to static.  If this
functionality continues to go unused, the abstraction should probably go
away entirely.

This also eliminates a warning:

kernel/events/hw_breakpoint.c:80:27: warning: no previous prototype for ‘hw_breakpoint_weight’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/events/hw_breakpoint.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index 9a7b487..4a3867a 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -77,7 +77,7 @@ struct bp_busy_slots {
 /* Serialize accesses to the above constraints */
 static DEFINE_MUTEX(nr_bp_mutex);
 
-__weak int hw_breakpoint_weight(struct perf_event *bp)
+static int hw_breakpoint_weight(struct perf_event *bp)
 {
 	return 1;
 }
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 21/58] kernel/events/core.c: Mark internal function static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (19 preceding siblings ...)
  2012-11-19  5:27 ` [PATCH 20/58] kernel/events/hw_breakpoint.c: Make hw_breakpoint_weight static Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 22/58] arch/x86/kernel/cpu/common.c: Mark cpu_detect_tlb static Josh Triplett
                   ` (37 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, linux-kernel
  Cc: Josh Triplett

Nothing outside of kernel/events/core.c references perf_cgroup_switch,
perf_init_event, or perf_event_init_context; mark these functions
static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/events/core.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index dbccf83..01ba4db 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -351,7 +351,7 @@ perf_cgroup_set_timestamp(struct task_struct *task,
  * mode SWOUT : schedule out everything
  * mode SWIN : schedule in based on cgroup for next
  */
-void perf_cgroup_switch(struct task_struct *task, int mode)
+static void perf_cgroup_switch(struct task_struct *task, int mode)
 {
 	struct perf_cpu_context *cpuctx;
 	struct pmu *pmu;
@@ -6064,7 +6064,7 @@ void perf_pmu_unregister(struct pmu *pmu)
 	free_pmu_context(pmu);
 }
 
-struct pmu *perf_init_event(struct perf_event *event)
+static struct pmu *perf_init_event(struct perf_event *event)
 {
 	struct pmu *pmu = NULL;
 	int idx;
@@ -7139,7 +7139,7 @@ inherit_task_group(struct perf_event *event, struct task_struct *parent,
 /*
  * Initialize the perf_event context in task_struct
  */
-int perf_event_init_context(struct task_struct *child, int ctxn)
+static int perf_event_init_context(struct task_struct *child, int ctxn)
 {
 	struct perf_event_context *child_ctx, *parent_ctx;
 	struct perf_event_context *cloned_ctx;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 22/58] arch/x86/kernel/cpu/common.c: Mark cpu_detect_tlb static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (20 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 21/58] kernel/events/core.c: Mark internal function static Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-20  1:40   ` Alex Shi
  2012-11-19  5:28   ` Josh Triplett
                   ` (36 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Borislav Petkov, Alex Shi, Steven Rostedt, linux-kernel
  Cc: Josh Triplett

Nothing outside of arch/x86/kernel/cpu/common.c references
cpu_detect_tlb, so mark it static.

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/cpu/common.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
index 7505f7b..eb12c08 100644
--- a/arch/x86/kernel/cpu/common.c
+++ b/arch/x86/kernel/cpu/common.c
@@ -482,7 +482,7 @@ u16 __read_mostly tlb_lld_4m[NR_INFO];
  */
 s8  __read_mostly tlb_flushall_shift = -1;
 
-void __cpuinit cpu_detect_tlb(struct cpuinfo_x86 *c)
+static void __cpuinit cpu_detect_tlb(struct cpuinfo_x86 *c)
 {
 	if (this_cpu->c_detect_tlb)
 		this_cpu->c_detect_tlb(c);
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
@ 2012-11-19  5:28   ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
                     ` (57 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, David Rientjes, Minchan Kim,
	Kautuk Consul, Cong Wang, linux-mm, linux-kernel
  Cc: Josh Triplett

Commit 3ee48b6af49cf534ca2f481ecc484b156a41451d added the
set_iounmap_nonlazy function for use on x86, but actually defined it on
all architectures.  Only x86 prototypes this function (in asm/io.h), and
only x86 uses it (in arch/x86/kernel/crash_dump_64.c), so avoid defining
it on non-x86.

Meanwhile, include the appropriate header with the prototype, to
eliminate a warning from gcc (-Wmissing-prototypes) and from Sparse
(-Wdecl).

mm/vmalloc.c:563:6: warning: no previous prototype for ‘set_iounmap_nonlazy’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/vmalloc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 78e0830..fc32a0a 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -27,6 +27,7 @@
 #include <linux/pfn.h>
 #include <linux/kmemleak.h>
 #include <linux/atomic.h>
+#include <linux/io.h>
 #include <asm/uaccess.h>
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
@@ -556,6 +557,7 @@ static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);
 /* for per-CPU blocks */
 static void purge_fragmented_blocks_allcpus(void);
 
+#ifdef CONFIG_X86
 /*
  * called before a call to iounmap() if the caller wants vm_area_struct's
  * immediately freed.
@@ -564,6 +566,7 @@ void set_iounmap_nonlazy(void)
 {
 	atomic_set(&vmap_lazy_nr, lazy_max_pages()+1);
 }
+#endif
 
 /*
  * Purges all lazily-freed vmap areas.
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86
@ 2012-11-19  5:28   ` Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, David Rientjes, Minchan Kim,
	Kautuk Consul, Cong Wang, linux-mm, linux-kernel
  Cc: Josh Triplett

Commit 3ee48b6af49cf534ca2f481ecc484b156a41451d added the
set_iounmap_nonlazy function for use on x86, but actually defined it on
all architectures.  Only x86 prototypes this function (in asm/io.h), and
only x86 uses it (in arch/x86/kernel/crash_dump_64.c), so avoid defining
it on non-x86.

Meanwhile, include the appropriate header with the prototype, to
eliminate a warning from gcc (-Wmissing-prototypes) and from Sparse
(-Wdecl).

mm/vmalloc.c:563:6: warning: no previous prototype for ‘set_iounmap_nonlazy’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/vmalloc.c |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 78e0830..fc32a0a 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -27,6 +27,7 @@
 #include <linux/pfn.h>
 #include <linux/kmemleak.h>
 #include <linux/atomic.h>
+#include <linux/io.h>
 #include <asm/uaccess.h>
 #include <asm/tlbflush.h>
 #include <asm/shmparam.h>
@@ -556,6 +557,7 @@ static atomic_t vmap_lazy_nr = ATOMIC_INIT(0);
 /* for per-CPU blocks */
 static void purge_fragmented_blocks_allcpus(void);
 
+#ifdef CONFIG_X86
 /*
  * called before a call to iounmap() if the caller wants vm_area_struct's
  * immediately freed.
@@ -564,6 +566,7 @@ void set_iounmap_nonlazy(void)
 {
 	atomic_set(&vmap_lazy_nr, lazy_max_pages()+1);
 }
+#endif
 
 /*
  * Purges all lazily-freed vmap areas.
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 24/58] mm: include/linux/huge_mm.h: Declare is_vma_temporary_stack unconditionally
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (22 preceding siblings ...)
  2012-11-19  5:28   ` Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19 21:36   ` David Rientjes
  2012-11-19  5:28 ` [PATCH 25/58] mm: include/linux/huge_mm.h: Declare handle_pte_fault unconditionally Josh Triplett
                   ` (34 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Josh Triplett, Andrea Arcangeli,
	David Rientjes, Naoya Horiguchi, linux-kernel

include/linux/huge_mm.h declares is_vma_temporary_stack inside an ifdef
CONFIG_TRANSPARENT_HUGEPAGE; however, mm/rmap.c defines the function
unconditionally.  Move the function outside of the ifdef.

This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

mm/rmap.c:1440:6: warning: no previous prototype for ‘is_vma_temporary_stack’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/huge_mm.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index b31cb7d..3f39803 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -53,13 +53,13 @@ extern pmd_t *page_check_address_pmd(struct page *page,
 #define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
 #define HPAGE_PMD_NR (1<<HPAGE_PMD_ORDER)
 
+extern bool is_vma_temporary_stack(struct vm_area_struct *vma);
+
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 #define HPAGE_PMD_SHIFT HPAGE_SHIFT
 #define HPAGE_PMD_MASK HPAGE_MASK
 #define HPAGE_PMD_SIZE HPAGE_SIZE
 
-extern bool is_vma_temporary_stack(struct vm_area_struct *vma);
-
 #define transparent_hugepage_enabled(__vma)				\
 	((transparent_hugepage_flags &					\
 	  (1<<TRANSPARENT_HUGEPAGE_FLAG) ||				\
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 25/58] mm: include/linux/huge_mm.h: Declare handle_pte_fault unconditionally
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (23 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 24/58] mm: include/linux/huge_mm.h: Declare is_vma_temporary_stack unconditionally Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19 21:39   ` David Rientjes
  2012-11-19  5:28   ` Josh Triplett
                   ` (33 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Josh Triplett, Andrea Arcangeli,
	David Rientjes, Naoya Horiguchi, linux-kernel

include/linux/huge_mm.h declares handle_pte_fault inside an ifdef
CONFIG_TRANSPARENT_HUGEPAGE; however, mm/memory.c defines the function
unconditionally.  Move the function outside of the ifdef.

This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

mm/memory.c:3449:5: warning: no previous prototype for ‘handle_pte_fault’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/huge_mm.h |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 3f39803..8ed2187 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -55,6 +55,10 @@ extern pmd_t *page_check_address_pmd(struct page *page,
 
 extern bool is_vma_temporary_stack(struct vm_area_struct *vma);
 
+extern int handle_pte_fault(struct mm_struct *mm,
+			    struct vm_area_struct *vma, unsigned long address,
+			    pte_t *pte, pmd_t *pmd, unsigned int flags);
+
 #ifdef CONFIG_TRANSPARENT_HUGEPAGE
 #define HPAGE_PMD_SHIFT HPAGE_SHIFT
 #define HPAGE_PMD_MASK HPAGE_MASK
@@ -87,9 +91,6 @@ extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
 			  pmd_t *dst_pmd, pmd_t *src_pmd,
 			  struct vm_area_struct *vma,
 			  unsigned long addr, unsigned long end);
-extern int handle_pte_fault(struct mm_struct *mm,
-			    struct vm_area_struct *vma, unsigned long address,
-			    pte_t *pte, pmd_t *pmd, unsigned int flags);
 extern int split_huge_page(struct page *page);
 extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd);
 #define split_huge_page_pmd(__mm, __pmd)				\
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
@ 2012-11-19  5:28   ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
                     ` (57 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
	Rik van Riel, Hugh Dickins, linux-mm, linux-kernel
  Cc: Josh Triplett

mm/internal.h declares vma_address inside an ifdef
CONFIG_TRANSPARENT_HUGEPAGE; however, mm/rmap.c defines the function
unconditionally.  Move the function outside of the ifdef.

This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

mm/rmap.c:527:1: warning: no previous prototype for ‘vma_address’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/internal.h |    2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/internal.h b/mm/internal.h
index a4fa284..6cd14dc 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -221,10 +221,8 @@ static inline void mlock_migrate_page(struct page *newpage, struct page *page)
 	}
 }
 
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 extern unsigned long vma_address(struct page *page,
 				 struct vm_area_struct *vma);
-#endif
 #else /* !CONFIG_MMU */
 static inline int mlocked_vma_newpage(struct vm_area_struct *v, struct page *p)
 {
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally
@ 2012-11-19  5:28   ` Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
	Rik van Riel, Hugh Dickins, linux-mm, linux-kernel
  Cc: Josh Triplett

mm/internal.h declares vma_address inside an ifdef
CONFIG_TRANSPARENT_HUGEPAGE; however, mm/rmap.c defines the function
unconditionally.  Move the function outside of the ifdef.

This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

mm/rmap.c:527:1: warning: no previous prototype for ‘vma_address’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/internal.h |    2 --
 1 file changed, 2 deletions(-)

diff --git a/mm/internal.h b/mm/internal.h
index a4fa284..6cd14dc 100644
--- a/mm/internal.h
+++ b/mm/internal.h
@@ -221,10 +221,8 @@ static inline void mlock_migrate_page(struct page *newpage, struct page *page)
 	}
 }
 
-#ifdef CONFIG_TRANSPARENT_HUGEPAGE
 extern unsigned long vma_address(struct page *page,
 				 struct vm_area_struct *vma);
-#endif
 #else /* !CONFIG_MMU */
 static inline int mlocked_vma_newpage(struct vm_area_struct *v, struct page *p)
 {
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 27/58] x86: apic: Make apic_flat_64.c include asm/apic_flat_64.h for flat_init_apic_ldr prototype
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (25 preceding siblings ...)
  2012-11-19  5:28   ` Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 28/58] x86: io_apic: Don't define acpi_get_override_irq if CONFIG_ACPI=n Josh Triplett
                   ` (31 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Alexander Gordeev, Suresh Siddha, Daniel J Blueman,
	Yinghai Lu, linux-kernel
  Cc: Josh Triplett

C files should include the header files that prototype their functions.
This keeps the types in sync, and eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/apic/apic_flat_64.c:46:6: warning: no previous prototype for ‘flat_init_apic_ldr’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/apic/apic_flat_64.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/apic/apic_flat_64.c b/arch/x86/kernel/apic/apic_flat_64.c
index 00c77cf..3cdd11a 100644
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <asm/smp.h>
 #include <asm/apic.h>
+#include <asm/apic_flat_64.h>
 #include <asm/ipi.h>
 
 #ifdef CONFIG_ACPI
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 28/58] x86: io_apic: Don't define acpi_get_override_irq if CONFIG_ACPI=n
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (26 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 27/58] x86: apic: Make apic_flat_64.c include asm/apic_flat_64.h for flat_init_apic_ldr prototype Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28   ` Josh Triplett
                   ` (30 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Suresh Siddha, Joerg Roedel, Yinghai Lu, Alexander Gordeev,
	linux-kernel
  Cc: Josh Triplett

arch/x86/kernel/apic/io_apic.c defines acpi_get_override_irq
unconditionally, but linux/acpi.h only prototypes it if CONFIG_ACPI=y,
and nothing calls it unless CONFIG_ACPI=y.  Make the definition itself
conditional on CONFIG_ACPI.  This saves space when CONFIG_ACPI=n, and
eliminates warnings from GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/apic/io_apic.c:3638:5: warning: no previous prototype for ‘acpi_get_override_irq’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/apic/io_apic.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 1817fa9..6d01108 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -3635,6 +3635,7 @@ static int __init io_apic_get_version(int ioapic)
 	return reg_01.bits.version;
 }
 
+#ifdef CONFIG_ACPI
 int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
 {
 	int ioapic, pin, idx;
@@ -3658,6 +3659,7 @@ int acpi_get_override_irq(u32 gsi, int *trigger, int *polarity)
 	*polarity = irq_polarity(idx);
 	return 0;
 }
+#endif
 
 /*
  * This function currently is only a helper for the i386 smp boot process where
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 29/58] mm: Make copy_pte_range static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
@ 2012-11-19  5:28   ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
                     ` (57 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Josh Triplett, Andrea Arcangeli,
	David Rientjes, Naoya Horiguchi, Al Viro, Konstantin Khlebnikov,
	linux-kernel, linux-mm

Nothing outside of mm/memory.c references copy_pte_range.
linux/huge_mm.h prototypes it, but nothing uses that prototype.  Commit
71e3aac0724ffe8918992d76acfe3aad7d8724a5 in January 2011 explicitly made
copy_pte_range non-static, but no commit ever introduced a caller for
copy_pte_range outside of mm/memory.c.  Make the function static.

This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

mm/memory.c:917:5: warning: no previous prototype for ‘copy_pte_range’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/huge_mm.h |    4 ----
 mm/memory.c             |    7 ++++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 8ed2187..e10d4fe 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -87,10 +87,6 @@ extern int handle_pte_fault(struct mm_struct *mm,
 #endif /* CONFIG_DEBUG_VM */
 
 extern unsigned long transparent_hugepage_flags;
-extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
-			  pmd_t *dst_pmd, pmd_t *src_pmd,
-			  struct vm_area_struct *vma,
-			  unsigned long addr, unsigned long end);
 extern int split_huge_page(struct page *page);
 extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd);
 #define split_huge_page_pmd(__mm, __pmd)				\
diff --git a/mm/memory.c b/mm/memory.c
index fb135ba..fa106b3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -914,9 +914,10 @@ out_set_pte:
 	return 0;
 }
 
-int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
-		   pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma,
-		   unsigned long addr, unsigned long end)
+static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
+			  pmd_t *dst_pmd, pmd_t *src_pmd,
+			  struct vm_area_struct *vma,
+			  unsigned long addr, unsigned long end)
 {
 	pte_t *orig_src_pte, *orig_dst_pte;
 	pte_t *src_pte, *dst_pte;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 29/58] mm: Make copy_pte_range static
@ 2012-11-19  5:28   ` Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Josh Triplett, Andrea Arcangeli,
	David Rientjes, Naoya Horiguchi, Al Viro, Konstantin Khlebnikov,
	linux-kernel, linux-mm

Nothing outside of mm/memory.c references copy_pte_range.
linux/huge_mm.h prototypes it, but nothing uses that prototype.  Commit
71e3aac0724ffe8918992d76acfe3aad7d8724a5 in January 2011 explicitly made
copy_pte_range non-static, but no commit ever introduced a caller for
copy_pte_range outside of mm/memory.c.  Make the function static.

This eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

mm/memory.c:917:5: warning: no previous prototype for ‘copy_pte_range’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/huge_mm.h |    4 ----
 mm/memory.c             |    7 ++++---
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
index 8ed2187..e10d4fe 100644
--- a/include/linux/huge_mm.h
+++ b/include/linux/huge_mm.h
@@ -87,10 +87,6 @@ extern int handle_pte_fault(struct mm_struct *mm,
 #endif /* CONFIG_DEBUG_VM */
 
 extern unsigned long transparent_hugepage_flags;
-extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
-			  pmd_t *dst_pmd, pmd_t *src_pmd,
-			  struct vm_area_struct *vma,
-			  unsigned long addr, unsigned long end);
 extern int split_huge_page(struct page *page);
 extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd);
 #define split_huge_page_pmd(__mm, __pmd)				\
diff --git a/mm/memory.c b/mm/memory.c
index fb135ba..fa106b3 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -914,9 +914,10 @@ out_set_pte:
 	return 0;
 }
 
-int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
-		   pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma,
-		   unsigned long addr, unsigned long end)
+static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
+			  pmd_t *dst_pmd, pmd_t *src_pmd,
+			  struct vm_area_struct *vma,
+			  unsigned long addr, unsigned long end)
 {
 	pte_t *orig_src_pte, *orig_dst_pte;
 	pte_t *src_pte, *dst_pte;
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 30/58] block: Eliminate unused function kblockd_schedule_delayed_work
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (28 preceding siblings ...)
  2012-11-19  5:28   ` Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 31/58] perf: cgroup: Drop unused perf_cgroup_switch stub Josh Triplett
                   ` (28 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Jens Axboe, linux-kernel; +Cc: Josh Triplett

Commit e43473b7f223ec866f7db273697e76c337c390f9 in September 2010
("blkio: Core implementation of throttle policy") re-added the
previously removed function kblockd_schedule_delayed_work, and added a
single call from throtl_schedule_delayed_work in block/blk-throttle.c.

Commit 450adcbe518ab3a3953d8475309525d22de77cba in March 2011
("blk-throttle: Do not use kblockd workqueue for throtl work")
eliminated that one and only call from throtl_schedule_delayed_work in
favor of a separate workqueue.

No other callers have come into existence since then.

Eliminate kblockd_schedule_delayed_work once again.

This also eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

block/blk-core.c:2820:5: warning: no previous prototype for ‘kblockd_schedule_delayed_work’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 block/blk-core.c |    7 -------
 1 file changed, 7 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index a33870b..f338553 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2817,13 +2817,6 @@ int kblockd_schedule_work(struct request_queue *q, struct work_struct *work)
 }
 EXPORT_SYMBOL(kblockd_schedule_work);
 
-int kblockd_schedule_delayed_work(struct request_queue *q,
-			struct delayed_work *dwork, unsigned long delay)
-{
-	return queue_delayed_work(kblockd_workqueue, dwork, delay);
-}
-EXPORT_SYMBOL(kblockd_schedule_delayed_work);
-
 #define PLUG_MAGIC	0x91827364
 
 /**
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 31/58] perf: cgroup: Drop unused perf_cgroup_switch stub
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (29 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 30/58] block: Eliminate unused function kblockd_schedule_delayed_work Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 32/58] kernel/resource.c: Include linux/mm.h for page_is_ram prototype Josh Triplett
                   ` (27 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, linux-kernel
  Cc: Josh Triplett

kernel/events/core.c defines a no-op stub of perf_cgroup_switch when
CONFIG_CGROUP_PERF=n.  However, nothing actually calls
perf_cgroup_switch outside of an #ifdef CONFIG_CGROUP_PERF.  So, drop
the stub.

This also eliminates a warning from gcc (-Wmissing-prototypes) and from
Sparse (-Wdecl).

kernel/events/core.c:604:1: warning: no previous prototype for ‘perf_cgroup_switch’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/events/core.c |    5 -----
 1 file changed, 5 deletions(-)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 01ba4db..543638a 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -600,11 +600,6 @@ perf_cgroup_set_timestamp(struct task_struct *task,
 {
 }
 
-void
-perf_cgroup_switch(struct task_struct *task, struct task_struct *next)
-{
-}
-
 static inline void
 perf_cgroup_set_shadow_time(struct perf_event *event, u64 now)
 {
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 32/58] kernel/resource.c: Include linux/mm.h for page_is_ram prototype
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (30 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 31/58] perf: cgroup: Drop unused perf_cgroup_switch stub Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 33/58] kernel/resource.c: Make internal function reallocate_resource static Josh Triplett
                   ` (26 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Josh Triplett, Ram Pai,
	T Makphaibulchoke, Wei Yang, linux-kernel

C files should include the header files that prototype their functions.
This keeps the types in sync, and eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/resource.c:365:27: warning: no previous prototype for ‘page_is_ram’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/resource.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/resource.c b/kernel/resource.c
index 73f35d4..f593f18 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -21,6 +21,7 @@
 #include <linux/seq_file.h>
 #include <linux/device.h>
 #include <linux/pfn.h>
+#include <linux/mm.h>
 #include <asm/io.h>
 
 
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 33/58] kernel/resource.c: Make internal function reallocate_resource static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (31 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 32/58] kernel/resource.c: Include linux/mm.h for page_is_ram prototype Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  7:08   ` Ram Pai
  2012-11-19  5:28 ` [PATCH 34/58] kbuild: kernel/bounds.c: Add prototype for dummy function foo Josh Triplett
                   ` (25 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Josh Triplett, Ram Pai,
	T Makphaibulchoke, Wei Yang, linux-kernel

Nothing outside of kernel/resource.c references reallocate_resource, so
mark it static.  This eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/resource.c:476:5: warning: no previous prototype for ‘reallocate_resource’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/resource.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/resource.c b/kernel/resource.c
index f593f18..0cc07d4 100644
--- a/kernel/resource.c
+++ b/kernel/resource.c
@@ -473,7 +473,7 @@ static int find_resource(struct resource *root, struct resource *new,
  * @newsize: new size of the resource descriptor
  * @constraint: the size and alignment constraints to be met.
  */
-int reallocate_resource(struct resource *root, struct resource *old,
+static int reallocate_resource(struct resource *root, struct resource *old,
 			resource_size_t newsize,
 			struct resource_constraint  *constraint)
 {
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 34/58] kbuild: kernel/bounds.c: Add prototype for dummy function foo
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (32 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 33/58] kernel/resource.c: Make internal function reallocate_resource static Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 35/58] x86: arch/x86/kernel/asm-offsets.c: Add prototype for dummy function common Josh Triplett
                   ` (24 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Josh Triplett, linux-kernel

kernel/bounds.c defines an intentionally unused function foo, just to
slurp out the generated assembly and obtain the values for some
constants.  Add a prototype of this function, to satisfy GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/bounds.c:14:6: warning: no previous prototype for ‘foo’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/bounds.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/bounds.c b/kernel/bounds.c
index 0c9b862..cfb4805 100644
--- a/kernel/bounds.c
+++ b/kernel/bounds.c
@@ -11,6 +11,8 @@
 #include <linux/kbuild.h>
 #include <linux/page_cgroup.h>
 
+void foo(void);
+
 void foo(void)
 {
 	/* The enum constants to put into include/generated/bounds.h */
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 35/58] x86: arch/x86/kernel/asm-offsets.c: Add prototype for dummy function common
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (33 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 34/58] kbuild: kernel/bounds.c: Add prototype for dummy function foo Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 36/58] kernel/fork.c: Add prototype for __weak stub of arch_release_thread_info Josh Triplett
                   ` (23 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Josh Triplett, Matt Fleming, Al Viro, linux-kernel

arch/x86/kernel/asm-offsets.c defines an intentionally unused function
common, just to slurp out the generated assembly and obtain the values
for some constants.  Add a prototype of this function, to satisfy GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/asm-offsets.c:30:6: warning: no previous prototype for ‘common’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/asm-offsets.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/asm-offsets.c b/arch/x86/kernel/asm-offsets.c
index 2861082..bae77e4 100644
--- a/arch/x86/kernel/asm-offsets.c
+++ b/arch/x86/kernel/asm-offsets.c
@@ -27,6 +27,8 @@
 # include "asm-offsets_64.c"
 #endif
 
+void common(void);
+
 void common(void) {
 	BLANK();
 	OFFSET(TI_flags, thread_info, flags);
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 36/58] kernel/fork.c: Add prototype for __weak stub of arch_release_thread_info
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (34 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 35/58] x86: arch/x86/kernel/asm-offsets.c: Add prototype for dummy function common Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 37/58] kernel/fork.c: Add prototype for fork_init Josh Triplett
                   ` (22 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Oleg Nesterov, Tejun Heo,
	Srikar Dronamraju, Ingo Molnar, linux-kernel
  Cc: Josh Triplett

kernel/fork.c defines an empty stub of arch_release_thread_info with
__weak, for use on architectures without an alternate implementation.
Define a prototype of that function, to satisfy gcc
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/fork.c:137:28: warning: no previous prototype for ‘arch_release_thread_info’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/fork.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 8b20ab7..8532f1a 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -132,6 +132,8 @@ static inline void free_task_struct(struct task_struct *tsk)
 }
 #endif
 
+void arch_release_thread_info(struct thread_info *ti);
+
 void __weak arch_release_thread_info(struct thread_info *ti)
 {
 }
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 37/58] kernel/fork.c: Add prototype for fork_init
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (35 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 36/58] kernel/fork.c: Add prototype for __weak stub of arch_release_thread_info Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 38/58] block: Mark internal function blk_drain_queue static Josh Triplett
                   ` (21 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Oleg Nesterov, Tejun Heo,
	Srikar Dronamraju, Ingo Molnar, linux-kernel
  Cc: Josh Triplett

kernel/fork.c defines an __init function fork_init, called from
init/main.c.  No header file prototypes fork_init, because init/main.c
tends to directly define prototypes for init functions it calls, rather
than including appropriate headers.  So, add a prototype of fork_init to
kernel/fork.c right above the definition, to satisfy gcc
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/fork.c:251:116: warning: no previous prototype for ‘fork_init’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/fork.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/fork.c b/kernel/fork.c
index 8532f1a..5971176 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -250,6 +250,8 @@ EXPORT_SYMBOL_GPL(__put_task_struct);
 
 void __init __weak arch_task_cache_init(void) { }
 
+void fork_init(unsigned long mempages);
+
 void __init fork_init(unsigned long mempages)
 {
 #ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 38/58] block: Mark internal function blk_drain_queue static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (36 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 37/58] kernel/fork.c: Add prototype for fork_init Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 39/58] kernel/events/core.c: Add prototype for __weak stub of arch_perf_update_userpage Josh Triplett
                   ` (20 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Jens Axboe, linux-kernel; +Cc: Josh Triplett

Nothing outside of block/blk-core.c references blk_drain_queue, so mark
it static.  This eliminates warnings from GCC (-Wmissing-prototypes) and
Sparse (-Wdecl).

block/blk-core.c:360:6: warning: no previous prototype for ‘blk_drain_queue’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 block/blk-core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index f338553..c96a6e5 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -357,7 +357,7 @@ EXPORT_SYMBOL(blk_put_queue);
  * If not, only ELVPRIV requests are drained.  The caller is responsible
  * for ensuring that no new requests which need to be drained are queued.
  */
-void blk_drain_queue(struct request_queue *q, bool drain_all)
+static void blk_drain_queue(struct request_queue *q, bool drain_all)
 {
 	int i;
 
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 39/58] kernel/events/core.c: Add prototype for __weak stub of arch_perf_update_userpage
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (37 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 38/58] block: Mark internal function blk_drain_queue static Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 40/58] panic: Add prototype for __weak stub of panic_smp_self_stop Josh Triplett
                   ` (19 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, linux-kernel
  Cc: Josh Triplett

kernel/events/core.c defines an empty stub of arch_perf_update_userpage
with __weak, for use on architectures without an alternate
implementation.  Define a prototype of that function, to satisfy gcc
(-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/cpu/perf_event.c:1692:6: warning: no previous prototype for ‘arch_perf_update_userpage’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/events/core.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/events/core.c b/kernel/events/core.c
index 543638a..69ab633 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -3353,6 +3353,8 @@ static void calc_timer_values(struct perf_event *event,
 	*running = ctx_time - event->tstamp_running;
 }
 
+void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now);
+
 void __weak arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now)
 {
 }
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 40/58] panic: Add prototype for __weak stub of panic_smp_self_stop
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (38 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 39/58] kernel/events/core.c: Add prototype for __weak stub of arch_perf_update_userpage Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 41/58] init/calibrate.c: Add prototype for __weak stub of calibrate_delay_is_known Josh Triplett
                   ` (18 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Ingo Molnar, Vikram Mulukutla,
	Ben Hutchings, Andi Kleen, linux-kernel
  Cc: Josh Triplett

kernel/panic.c defines an empty stub of panic_smp_self_stop with __weak,
for use on architectures without an alternate implementation.  Define a
prototype of that function, to satisfy gcc (-Wmissing-prototypes) and
Sparse (-Wdecl).

kernel/panic.c:55:28: warning: no previous prototype for ‘panic_smp_self_stop’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/panic.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/panic.c b/kernel/panic.c
index e1b2822..38a4ed4 100644
--- a/kernel/panic.c
+++ b/kernel/panic.c
@@ -52,6 +52,7 @@ EXPORT_SYMBOL(panic_blink);
 /*
  * Stop ourself in panic -- architecture code may override this
  */
+void panic_smp_self_stop(void);
 void __weak panic_smp_self_stop(void)
 {
 	while (1)
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 41/58] init/calibrate.c: Add prototype for __weak stub of calibrate_delay_is_known
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (39 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 40/58] panic: Add prototype for __weak stub of panic_smp_self_stop Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 42/58] kernel/events/hw_breakpoint.c: Add prototype for __weak stub of arch_unregister_hw_breakpoint Josh Triplett
                   ` (17 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Jack Steiner, Josh Triplett,
	Ingo Molnar, Diwakar Tundlam, linux-kernel

init/calibrate.c defines an empty stub of calibrate_delay_is_known with
__attribute__((weak)), for use on architectures without an alternate
implementation.  Define a prototype of that function, to satisfy gcc
(-Wmissing-prototypes) and Sparse (-Wdecl).

init/calibrate.c:257:150: warning: no previous prototype for ‘calibrate_delay_is_known’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 init/calibrate.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/init/calibrate.c b/init/calibrate.c
index fda0a7b..7177627 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -254,6 +254,7 @@ static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 };
  * Architectures should override this function if a faster calibration
  * method is available.
  */
+unsigned long calibrate_delay_is_known(void);
 unsigned long __attribute__((weak)) __cpuinit calibrate_delay_is_known(void)
 {
 	return 0;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 42/58] kernel/events/hw_breakpoint.c: Add prototype for __weak stub of arch_unregister_hw_breakpoint
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (40 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 41/58] init/calibrate.c: Add prototype for __weak stub of calibrate_delay_is_known Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28   ` Josh Triplett
                   ` (16 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, linux-kernel
  Cc: Josh Triplett

kernel/events/hw_breakpoint.c defines an empty stub of
arch_unregister_hw_breakpoint with __weak, for use on architectures
without an alternate implementation.  Define a prototype of that
function, to satisfy gcc (-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/events/hw_breakpoint.c:247:28: warning: no previous prototype for ‘arch_unregister_hw_breakpoint’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/events/hw_breakpoint.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/kernel/events/hw_breakpoint.c b/kernel/events/hw_breakpoint.c
index 4a3867a..a792001 100644
--- a/kernel/events/hw_breakpoint.c
+++ b/kernel/events/hw_breakpoint.c
@@ -244,6 +244,7 @@ toggle_bp_slot(struct perf_event *bp, bool enable, enum bp_type_idx type,
 /*
  * Function to perform processor-specific cleanup during unregistration
  */
+void arch_unregister_hw_breakpoint(struct perf_event *bp);
 __weak void arch_unregister_hw_breakpoint(struct perf_event *bp)
 {
 	/*
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
@ 2012-11-19  5:28   ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
                     ` (57 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
	KAMEZAWA Hiroyuki, Michal Hocko, linux-mm, linux-kernel
  Cc: Josh Triplett

mm/page_alloc.c defines a fallback version of __early_pfn_to_nid for
architectures without CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID.  Nothing
outside of mm/page_alloc.c calls that function, so mark it static.  This
eliminates warnings from GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

mm/page_alloc.c:4075:118: warning: no previous prototype for ‘__early_pfn_to_nid’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5b74de6..d857953 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4072,7 +4072,7 @@ int __meminit init_currently_empty_zone(struct zone *zone,
  * was used and there are no special requirements, this is a convenient
  * alternative
  */
-int __meminit __early_pfn_to_nid(unsigned long pfn)
+static int __meminit __early_pfn_to_nid(unsigned long pfn)
 {
 	unsigned long start_pfn, end_pfn;
 	int i, nid;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static
@ 2012-11-19  5:28   ` Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
	KAMEZAWA Hiroyuki, Michal Hocko, linux-mm, linux-kernel
  Cc: Josh Triplett

mm/page_alloc.c defines a fallback version of __early_pfn_to_nid for
architectures without CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID.  Nothing
outside of mm/page_alloc.c calls that function, so mark it static.  This
eliminates warnings from GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

mm/page_alloc.c:4075:118: warning: no previous prototype for ‘__early_pfn_to_nid’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/page_alloc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 5b74de6..d857953 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -4072,7 +4072,7 @@ int __meminit init_currently_empty_zone(struct zone *zone,
  * was used and there are no special requirements, this is a convenient
  * alternative
  */
-int __meminit __early_pfn_to_nid(unsigned long pfn)
+static int __meminit __early_pfn_to_nid(unsigned long pfn)
 {
 	unsigned long start_pfn, end_pfn;
 	int i, nid;
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
@ 2012-11-19  5:28   ` Josh Triplett
  2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
                     ` (57 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
	KAMEZAWA Hiroyuki, Michal Hocko, linux-mm, linux-kernel
  Cc: Josh Triplett

mm/page_alloc.c defines is_pageblock_removable_nolock unconditionally,
but include/linux/memory_hotplug.h only prototypes it when
CONFIG_MEMORY_HOTPLUG=y and CONFIG_MEMORY_HOTREMOVE=y.  Add the
corresponding conditions around the definition, too.

This also eliminates warnings from GCC (-Wmissing-prototypes) and Sparse
(-Wdecl).

mm/page_alloc.c:5634:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/page_alloc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d857953..706bd5f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5631,6 +5631,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count)
 	return false;
 }
 
+#if defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE)
 bool is_pageblock_removable_nolock(struct page *page)
 {
 	struct zone *zone;
@@ -5654,6 +5655,7 @@ bool is_pageblock_removable_nolock(struct page *page)
 
 	return !has_unmovable_pages(zone, page, 0);
 }
+#endif /* defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE) */
 
 #ifdef CONFIG_CMA
 
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed
@ 2012-11-19  5:28   ` Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Andrew Morton, Mel Gorman, Minchan Kim,
	KAMEZAWA Hiroyuki, Michal Hocko, linux-mm, linux-kernel
  Cc: Josh Triplett

mm/page_alloc.c defines is_pageblock_removable_nolock unconditionally,
but include/linux/memory_hotplug.h only prototypes it when
CONFIG_MEMORY_HOTPLUG=y and CONFIG_MEMORY_HOTREMOVE=y.  Add the
corresponding conditions around the definition, too.

This also eliminates warnings from GCC (-Wmissing-prototypes) and Sparse
(-Wdecl).

mm/page_alloc.c:5634:6: warning: no previous prototype for ‘is_pageblock_removable_nolock’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 mm/page_alloc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d857953..706bd5f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5631,6 +5631,7 @@ bool has_unmovable_pages(struct zone *zone, struct page *page, int count)
 	return false;
 }
 
+#if defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE)
 bool is_pageblock_removable_nolock(struct page *page)
 {
 	struct zone *zone;
@@ -5654,6 +5655,7 @@ bool is_pageblock_removable_nolock(struct page *page)
 
 	return !has_unmovable_pages(zone, page, 0);
 }
+#endif /* defined(CONFIG_MEMORY_HOTPLUG) && defined(CONFIG_MEMORY_HOTREMOVE) */
 
 #ifdef CONFIG_CMA
 
-- 
1.7.10.4

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 45/58] x86: Fix prototype for renamed function smp_threshold_interrupt
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (43 preceding siblings ...)
  2012-11-19  5:28   ` Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19 18:27   ` Kees Cook
  2012-11-19  5:28 ` [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ Josh Triplett
                   ` (13 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Kees Cook, Josh Triplett, linux-kernel

Commit 7856f6cce4a8cda8c1f94b99605c07d16b8d8dec renamed
mce_threshold_interrupt to smp_threshold_interrupt, but did not update
the prototype in arch/x86/include/asm/traps.h to match.  Update the
prototype to the new name.

This also eliminates warnings from GCC (-Wmissing-prototypes) and Sparse
(-Wdecl).

arch/x86/kernel/traps.c:597:29: warning: no previous prototype for ‘smp_threshold_interrupt’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/include/asm/traps.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/include/asm/traps.h b/arch/x86/include/asm/traps.h
index 88eae2a..914309a 100644
--- a/arch/x86/include/asm/traps.h
+++ b/arch/x86/include/asm/traps.h
@@ -86,7 +86,7 @@ void math_error(struct pt_regs *, int, int);
 void math_emulate(struct math_emu_info *);
 #ifndef CONFIG_X86_32
 asmlinkage void smp_thermal_interrupt(void);
-asmlinkage void mce_threshold_interrupt(void);
+asmlinkage void smp_threshold_interrupt(void);
 #endif
 
 /* Interrupts/Exceptions */
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (44 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 45/58] x86: Fix prototype for renamed function smp_threshold_interrupt Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 47/58] x86: arch/x86/kernel/process.c: Include asm/switch_to.h for __switch_to_xtra prototype Josh Triplett
                   ` (12 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Andrew Morton, Josh Triplett, David Howells, Kees Cook,
	linux-kernel

arch/x86/kernel/irqinit.c defines an __init function init_IRQ, called
from init/main.c.  No header file prototypes init_IRQ, because
init/main.c tends to directly define prototypes for init functions it
calls, rather than including appropriate headers.  So, add a prototype
of init_IRQ to arch/x86/kernel/irqinit.c right above the definition, to
satisfy gcc (-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/irqinit.c:118:116: warning: no previous prototype for ‘init_IRQ’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/irqinit.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/irqinit.c b/arch/x86/kernel/irqinit.c
index 6e03b0d..abc1f55 100644
--- a/arch/x86/kernel/irqinit.c
+++ b/arch/x86/kernel/irqinit.c
@@ -115,6 +115,7 @@ void __init init_ISA_irqs(void)
 		irq_set_chip_and_handler_name(i, chip, handle_level_irq, name);
 }
 
+void init_IRQ(void);
 void __init init_IRQ(void)
 {
 	int i;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 47/58] x86: arch/x86/kernel/process.c: Include asm/switch_to.h for __switch_to_xtra prototype
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (45 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 48/58] x86: arch/x86/kernel/time.c: Include asm/setup.h for setup_default_timer_irq prototype Josh Triplett
                   ` (11 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Suresh Siddha, Al Viro, linux-kernel
  Cc: Josh Triplett

C files should include the header files that prototype their functions.
This keeps the types in sync, and eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/process.c:221:6: warning: no previous prototype for ‘__switch_to_xtra’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/process.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index b644e1c..7c292ee 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -28,6 +28,7 @@
 #include <asm/fpu-internal.h>
 #include <asm/debugreg.h>
 #include <asm/nmi.h>
+#include <asm/switch_to.h>
 
 /*
  * per-CPU TSS segments. Threads are completely 'soft' on Linux,
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 48/58] x86: arch/x86/kernel/time.c: Include asm/setup.h for setup_default_timer_irq prototype
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (46 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 47/58] x86: arch/x86/kernel/process.c: Include asm/switch_to.h for __switch_to_xtra prototype Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 49/58] x86: init: Mark internal functions iommu_init_noop and iommu_shutdown_noop static Josh Triplett
                   ` (10 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Paul Gortmaker, Josh Triplett, Jan Beulich, linux-kernel

C files should include the header files that prototype their functions.
This keeps the types in sync, and eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/time.c:69:116: warning: no previous prototype for ‘setup_default_timer_irq’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/time.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/time.c b/arch/x86/kernel/time.c
index 24d3c91..c7cb1b3 100644
--- a/arch/x86/kernel/time.c
+++ b/arch/x86/kernel/time.c
@@ -21,6 +21,7 @@
 #include <asm/timer.h>
 #include <asm/hpet.h>
 #include <asm/time.h>
+#include <asm/setup.h>
 
 #ifdef CONFIG_X86_64
 DEFINE_VVAR(volatile unsigned long, jiffies) = INITIAL_JIFFIES;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 49/58] x86: init: Mark internal functions iommu_init_noop and iommu_shutdown_noop static
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (47 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 48/58] x86: arch/x86/kernel/time.c: Include asm/setup.h for setup_default_timer_irq prototype Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 50/58] x86: arch/x86/kernel/irq_work.c: Add prototype for smp_irq_work_interrupt Josh Triplett
                   ` (9 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, konrad.wilk, Attilio Rao, Avi Kivity, linux-kernel
  Cc: Josh Triplett

Nothing outside of arch/x86/kernel/x86_init.c references iommu_init_noop
or iommu_shutdown_noop, so mark them static.  This eliminates warnings
from GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/x86_init.c:29:115: warning: no previous prototype for ‘iommu_init_noop’ [-Wmissing-prototypes]
arch/x86/kernel/x86_init.c:30:6: warning: no previous prototype for ‘iommu_shutdown_noop’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/x86_init.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c
index 7a3d075..28b2100 100644
--- a/arch/x86/kernel/x86_init.c
+++ b/arch/x86/kernel/x86_init.c
@@ -26,8 +26,8 @@
 
 void __cpuinit x86_init_noop(void) { }
 void __init x86_init_uint_noop(unsigned int unused) { }
-int __init iommu_init_noop(void) { return 0; }
-void iommu_shutdown_noop(void) { }
+static int __init iommu_init_noop(void) { return 0; }
+static void iommu_shutdown_noop(void) { }
 
 /*
  * The platform setup functions are preset with the default functions
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 50/58] x86: arch/x86/kernel/irq_work.c: Add prototype for smp_irq_work_interrupt
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (48 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 49/58] x86: init: Mark internal functions iommu_init_noop and iommu_shutdown_noop static Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 51/58] x86: perf: Add prototype for arch_perf_update_userpage Josh Triplett
                   ` (8 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Josh Triplett, linux-kernel

arch/x86/kernel/irq_work.c defines a function smp_irq_work_interrupt,
only called from assembly.  Add a prototype right before its definition,
to satisfy GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/irq_work.c:12:6: warning: no previous prototype for ‘smp_irq_work_interrupt’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/irq_work.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/irq_work.c b/arch/x86/kernel/irq_work.c
index ca8f703..7c25e97 100644
--- a/arch/x86/kernel/irq_work.c
+++ b/arch/x86/kernel/irq_work.c
@@ -9,6 +9,8 @@
 #include <linux/hardirq.h>
 #include <asm/apic.h>
 
+void smp_irq_work_interrupt(struct pt_regs *regs);
+
 void smp_irq_work_interrupt(struct pt_regs *regs)
 {
 	irq_enter();
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 51/58] x86: perf: Add prototype for arch_perf_update_userpage
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (49 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 50/58] x86: arch/x86/kernel/irq_work.c: Add prototype for smp_irq_work_interrupt Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions Josh Triplett
                   ` (7 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Peter Zijlstra, Paul Mackerras, Ingo Molnar,
	Arnaldo Carvalho de Melo, Thomas Gleixner, H. Peter Anvin, x86,
	linux-kernel
  Cc: Josh Triplett

arch/x86/kernel/cpu/perf_event.c defines a function
arch_perf_update_userpage, overriding a __weak stub for that function
defined in kernel/events/core.c.  Nothing currently prototypes that
function.  Add a prototype right before the definition, to satisfy gcc
(-Wmissing-prototypes) and Sparse (-Wdecl).

arch/x86/kernel/cpu/perf_event.c:1692:6: warning: no previous prototype for ‘arch_perf_update_userpage’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/kernel/cpu/perf_event.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
index 4a3374e..2d070cb 100644
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1689,6 +1689,8 @@ static struct pmu pmu = {
 	.flush_branch_stack	= x86_pmu_flush_branch_stack,
 };
 
+void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now);
+
 void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now)
 {
 	userpg->cap_usr_time = 0;
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (50 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 51/58] x86: perf: Add prototype for arch_perf_update_userpage Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19 20:04   ` Andy Lutomirski
  2012-11-19  5:28 ` [PATCH 53/58] linux/syscalls.h: Add prototypes for sys_rt_sigaction and sys_rt_sigsuspend Josh Triplett
                   ` (6 subsequent siblings)
  58 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, John Stultz, Andy Lutomirski, Josh Triplett, linux-kernel

arch/x86/vdso/vclock_gettime.c and arch/x86/vdso/vgetcpu.c define
several functions prefixed by __vdso_*, used in the alias definitions
for the actual vdso symbols calls.  Add prototypes of these functions
right before their definitions, to satisfy gcc (-Wmissing-prototypes)
and Sparse (-Wdecl).

arch/x86/vdso/vclock_gettime.c:161:45: warning: no previous prototype for ‘__vdso_clock_gettime’ [-Wmissing-prototypes]
arch/x86/vdso/vclock_gettime.c:185:45: warning: no previous prototype for ‘__vdso_gettimeofday’ [-Wmissing-prototypes]
arch/x86/vdso/vclock_gettime.c:213:48: warning: no previous prototype for ‘__vdso_time’ [-Wmissing-prototypes]
arch/x86/vdso/vgetcpu.c:16:1: warning: no previous prototype for ‘__vdso_getcpu’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 arch/x86/vdso/vclock_gettime.c |    3 +++
 arch/x86/vdso/vgetcpu.c        |    2 ++
 2 files changed, 5 insertions(+)

diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
index 4df6c37..bc8b276 100644
--- a/arch/x86/vdso/vclock_gettime.c
+++ b/arch/x86/vdso/vclock_gettime.c
@@ -158,6 +158,7 @@ notrace static int do_monotonic_coarse(struct timespec *ts)
 	return 0;
 }
 
+int __vdso_clock_gettime(clockid_t clock, struct timespec *ts);
 notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
 {
 	int ret = VCLOCK_NONE;
@@ -182,6 +183,7 @@ notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
 int clock_gettime(clockid_t, struct timespec *)
 	__attribute__((weak, alias("__vdso_clock_gettime")));
 
+int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz);
 notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
 {
 	long ret = VCLOCK_NONE;
@@ -210,6 +212,7 @@ int gettimeofday(struct timeval *, struct timezone *)
  * This will break when the xtime seconds get inaccurate, but that is
  * unlikely
  */
+time_t __vdso_time(time_t *t);
 notrace time_t __vdso_time(time_t *t)
 {
 	/* This is atomic on x86_64 so we don't need any locks. */
diff --git a/arch/x86/vdso/vgetcpu.c b/arch/x86/vdso/vgetcpu.c
index 5463ad5..b55350f 100644
--- a/arch/x86/vdso/vgetcpu.c
+++ b/arch/x86/vdso/vgetcpu.c
@@ -12,6 +12,8 @@
 #include <asm/vsyscall.h>
 #include <asm/vgtod.h>
 
+long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused);
+
 notrace long
 __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
 {
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 53/58] linux/syscalls.h: Add prototypes for sys_rt_sigaction and sys_rt_sigsuspend
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (51 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 54/58] linux/syscalls.h: Include asm/syscalls.h for additional prototypes Josh Triplett
                   ` (5 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Al Viro, Josh Triplett, Paul Gortmaker,
	Andrew Morton, Eric Dumazet, linux-kernel

include/linux/syscalls.h contains prototypes for most syscall functions;
however, it lacked the prototypes for sys_rt_sigaction and
sys_rt_sigsuspend.  Add them.  This eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/signal.c:3183:2: warning: no previous prototype for ‘sys_rt_sigaction’ [-Wmissing-prototypes]
kernel/signal.c:3280:7: warning: no previous prototype for ‘sys_rt_sigsuspend’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/syscalls.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 727f0cd..4ec00c1 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -371,9 +371,12 @@ asmlinkage long sys_init_module(void __user *umod, unsigned long len,
 asmlinkage long sys_delete_module(const char __user *name_user,
 				unsigned int flags);
 
+asmlinkage long sys_rt_sigaction(int sig, const struct sigaction __user *act,
+				struct sigaction __user *oact, size_t sigsetsize);
 asmlinkage long sys_rt_sigprocmask(int how, sigset_t __user *set,
 				sigset_t __user *oset, size_t sigsetsize);
 asmlinkage long sys_rt_sigpending(sigset_t __user *set, size_t sigsetsize);
+asmlinkage long sys_rt_sigsuspend(sigset_t __user *unewset, size_t sigsetsize);
 asmlinkage long sys_rt_sigtimedwait(const sigset_t __user *uthese,
 				siginfo_t __user *uinfo,
 				const struct timespec __user *uts,
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 54/58] linux/syscalls.h: Include asm/syscalls.h for additional prototypes
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (52 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 53/58] linux/syscalls.h: Add prototypes for sys_rt_sigaction and sys_rt_sigsuspend Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 55/58] sched: Add prototype for sched_set_stop_task Josh Triplett
                   ` (4 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Al Viro, Josh Triplett, Paul Gortmaker,
	Andrew Morton, Eric Dumazet, linux-kernel

include/linux/syscalls.h has prototypes for most syscalls, but other
prototypes appear in the corresponding asm/syscalls.h instead.  Include
the latter in the former, giving include/linux/syscalls.h a more
complete set of syscall prototypes.  This eliminates warnings from GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

fs/exec.c:1667:2: warning: no previous prototype for ‘sys_execve’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 include/linux/syscalls.h |    1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 4ec00c1..2052f03 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -76,6 +76,7 @@ struct file_handle;
 #include <linux/quota.h>
 #include <linux/key.h>
 #include <trace/syscall.h>
+#include <asm/syscalls.h>
 
 #define __SC_DECL1(t1, a1)	t1 a1
 #define __SC_DECL2(t2, a2, ...) t2 a2, __SC_DECL1(__VA_ARGS__)
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 55/58] sched: Add prototype for sched_set_stop_task
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (53 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 54/58] linux/syscalls.h: Include asm/syscalls.h for additional prototypes Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 56/58] sched: Only define init_cfs_bandwidth stub when CONFIG_FAIR_GROUP_SCHED=y Josh Triplett
                   ` (3 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Ingo Molnar, Peter Zijlstra, linux-kernel; +Cc: Josh Triplett

kernel/sched/core.c defines a function sched_set_stop_task, only
referenced from kernel/stop_machine.c via an extern declaration; no
header file defines a prototype for sched_set_stop_task.  Add a
prototype right before its definition, to satisfy GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/sched/core.c:803:6: warning: no previous prototype for ‘sched_set_stop_task’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/sched/core.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 2d8927f..2d2f5a4 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -800,6 +800,8 @@ static void update_rq_clock_task(struct rq *rq, s64 delta)
 #endif
 }
 
+void sched_set_stop_task(int cpu, struct task_struct *stop);
+
 void sched_set_stop_task(int cpu, struct task_struct *stop)
 {
 	struct sched_param param = { .sched_priority = MAX_RT_PRIO - 1 };
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 56/58] sched: Only define init_cfs_bandwidth stub when CONFIG_FAIR_GROUP_SCHED=y
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (54 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 55/58] sched: Add prototype for sched_set_stop_task Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 57/58] sched: Move stubs for CONFIG_FAIR_GROUP_SCHED=n to sched.h Josh Triplett
                   ` (2 subsequent siblings)
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Ingo Molnar, Peter Zijlstra, linux-kernel; +Cc: Josh Triplett

kernel/sched/fair.c defines a stub version of init_cfs_bandwidth when
CONFIG_CFS_BANDWIDTH=n.  A few other places in the scheduler call
init_cfs_bandwidth, but only when CONFIG_FAIR_GROUP_SCHED=y, and
kernel/sched/sched.h only prototypes init_cfs_bandwidth when
CONFIG_FAIR_GROUP_SCHED=y.  Wrap the stub in an ifdef
CONFIG_FAIR_GROUP_SCHED as well, to avoid defining it when not needed,
and to satisfy GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/sched/fair.c:2098:6: warning: no previous prototype for ‘init_cfs_bandwidth’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/sched/fair.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 7e29e80..0f03bf1 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -2095,9 +2095,8 @@ static inline int throttled_lb_pair(struct task_group *tg,
 	return 0;
 }
 
-void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
-
 #ifdef CONFIG_FAIR_GROUP_SCHED
+void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
 static void init_cfs_rq_runtime(struct cfs_rq *cfs_rq) {}
 #endif
 
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 57/58] sched: Move stubs for CONFIG_FAIR_GROUP_SCHED=n to sched.h
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (55 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 56/58] sched: Only define init_cfs_bandwidth stub when CONFIG_FAIR_GROUP_SCHED=y Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19  5:28 ` [PATCH 58/58] sched: Move stubs for CONFIG_RT_GROUP_SCHED=n " Josh Triplett
  2012-11-19 10:36 ` [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ David Howells
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Ingo Molnar, Peter Zijlstra, linux-kernel; +Cc: Josh Triplett

kernel/sched/fair.c defines stub versions of free_fair_sched_group,
alloc_fair_sched_group, and unregister_fair_sched_group, for use when
CONFIG_FAIR_GROUP_SCHED=n.  However, sched.h only declares the
prototypes of those functions when CONFIG_CGROUP_SCHED=y, since the
scheduler core only calls those functions when CONFIG_CGROUP_SCHED=y.
Rather than complicating the ifdef logic around the stub functions to
only define them in that case, move the empty stubs to sched.h as static
inlines, only defined when needed.  That allows the compiler to throw
away the calls entirely rather than calling empty stubs, and also
satisfies GCC (-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/sched/fair.c:5277:6: warning: no previous prototype for ‘free_fair_sched_group’ [-Wmissing-prototypes]
kernel/sched/fair.c:5279:5: warning: no previous prototype for ‘alloc_fair_sched_group’ [-Wmissing-prototypes]
kernel/sched/fair.c:5284:6: warning: no previous prototype for ‘unregister_fair_sched_group’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/sched/fair.c  |   11 -----------
 kernel/sched/sched.h |   13 +++++++++++++
 2 files changed, 13 insertions(+), 11 deletions(-)

diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
index 0f03bf1..971657f 100644
--- a/kernel/sched/fair.c
+++ b/kernel/sched/fair.c
@@ -5272,17 +5272,6 @@ done:
 	mutex_unlock(&shares_mutex);
 	return 0;
 }
-#else /* CONFIG_FAIR_GROUP_SCHED */
-
-void free_fair_sched_group(struct task_group *tg) { }
-
-int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
-{
-	return 1;
-}
-
-void unregister_fair_sched_group(struct task_group *tg, int cpu) { }
-
 #endif /* CONFIG_FAIR_GROUP_SCHED */
 
 
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index 7a7db09..fc5b8b8 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -173,9 +173,22 @@ static inline int walk_tg_tree(tg_visitor down, tg_visitor up, void *data)
 
 extern int tg_nop(struct task_group *tg, void *data);
 
+#ifdef CONFIG_FAIR_GROUP_SCHED
 extern void free_fair_sched_group(struct task_group *tg);
 extern int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent);
 extern void unregister_fair_sched_group(struct task_group *tg, int cpu);
+#else
+static inline void free_fair_sched_group(struct task_group *tg) { }
+
+static inline int alloc_fair_sched_group(struct task_group *tg,
+					struct task_group *parent)
+{
+        return 1;
+}
+
+static inline void unregister_fair_sched_group(struct task_group *tg, int cpu) { }
+#endif
+
 extern void init_tg_cfs_entry(struct task_group *tg, struct cfs_rq *cfs_rq,
 			struct sched_entity *se, int cpu,
 			struct sched_entity *parent);
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [PATCH 58/58] sched: Move stubs for CONFIG_RT_GROUP_SCHED=n to sched.h
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (56 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 57/58] sched: Move stubs for CONFIG_FAIR_GROUP_SCHED=n to sched.h Josh Triplett
@ 2012-11-19  5:28 ` Josh Triplett
  2012-11-19 10:36 ` [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ David Howells
  58 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19  5:28 UTC (permalink / raw)
  To: Linus Torvalds, Ingo Molnar, Peter Zijlstra, linux-kernel; +Cc: Josh Triplett

kernel/sched/rt.c defines stub versions of free_rt_sched_group and
alloc_rt_sched_group, for use when CONFIG_RT_GROUP_SCHED=n.  However,
sched.h only declares the prototypes of those functions when
CONFIG_CGROUP_SCHED=y, since the scheduler core only calls those
functions when CONFIG_CGROUP_SCHED=y.  Rather than complicating the
ifdef logic around the stub functions to only define them in that case,
move the empty stubs to sched.h as static inlines, only defined when
needed.  That allows the compiler to throw away the calls entirely
rather than calling empty stubs, and also satisfies GCC
(-Wmissing-prototypes) and Sparse (-Wdecl).

kernel/sched/rt.c:220:6: warning: no previous prototype for ‘free_rt_sched_group’ [-Wmissing-prototypes]
kernel/sched/rt.c:222:5: warning: no previous prototype for ‘alloc_rt_sched_group’ [-Wmissing-prototypes]

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
---
 kernel/sched/rt.c    |    7 -------
 kernel/sched/sched.h |   11 +++++++++++
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
index 418feb0..9ef9d0e 100644
--- a/kernel/sched/rt.c
+++ b/kernel/sched/rt.c
@@ -216,13 +216,6 @@ static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)
 
 	return &rq->rt;
 }
-
-void free_rt_sched_group(struct task_group *tg) { }
-
-int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
-{
-	return 1;
-}
 #endif /* CONFIG_RT_GROUP_SCHED */
 
 #ifdef CONFIG_SMP
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index fc5b8b8..ae190e1 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -199,8 +199,19 @@ extern void __refill_cfs_bandwidth_runtime(struct cfs_bandwidth *cfs_b);
 extern void __start_cfs_bandwidth(struct cfs_bandwidth *cfs_b);
 extern void unthrottle_cfs_rq(struct cfs_rq *cfs_rq);
 
+#ifdef CONFIG_RT_GROUP_SCHED
 extern void free_rt_sched_group(struct task_group *tg);
 extern int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent);
+#else
+static inline void free_rt_sched_group(struct task_group *tg) { }
+
+static inline int alloc_rt_sched_group(struct task_group *tg,
+				struct task_group *parent)
+{
+	return 1;
+}
+#endif
+
 extern void init_tg_rt_entry(struct task_group *tg, struct rt_rq *rt_rq,
 		struct sched_rt_entity *rt_se, int cpu,
 		struct sched_rt_entity *parent);
-- 
1.7.10.4


^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 33/58] kernel/resource.c: Make internal function reallocate_resource static
  2012-11-19  5:28 ` [PATCH 33/58] kernel/resource.c: Make internal function reallocate_resource static Josh Triplett
@ 2012-11-19  7:08   ` Ram Pai
  0 siblings, 0 replies; 81+ messages in thread
From: Ram Pai @ 2012-11-19  7:08 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Andrew Morton, Ram Pai, T Makphaibulchoke,
	Wei Yang, linux-kernel

On Sun, Nov 18, 2012 at 09:28:12PM -0800, Josh Triplett wrote:
> Nothing outside of kernel/resource.c references reallocate_resource, so
> mark it static.  This eliminates warnings from GCC
> (-Wmissing-prototypes) and Sparse (-Wdecl).
> 
> kernel/resource.c:476:5: warning: no previous prototype for ‘reallocate_resource’ [-Wmissing-prototypes]
> 
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> ---
>  kernel/resource.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/resource.c b/kernel/resource.c
> index f593f18..0cc07d4 100644
> --- a/kernel/resource.c
> +++ b/kernel/resource.c
> @@ -473,7 +473,7 @@ static int find_resource(struct resource *root, struct resource *new,
>   * @newsize: new size of the resource descriptor
>   * @constraint: the size and alignment constraints to be met.
>   */
> -int reallocate_resource(struct resource *root, struct resource *old,
> +static int reallocate_resource(struct resource *root, struct resource *old,
>  			resource_size_t newsize,
>  			struct resource_constraint  *constraint)
>  {

Acked-by: Ram Pai <linuxram@us.ibm.com>


^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ
  2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
                   ` (57 preceding siblings ...)
  2012-11-19  5:28 ` [PATCH 58/58] sched: Move stubs for CONFIG_RT_GROUP_SCHED=n " Josh Triplett
@ 2012-11-19 10:36 ` David Howells
  2012-11-19 17:08   ` Josh Triplett
  58 siblings, 1 reply; 81+ messages in thread
From: David Howells @ 2012-11-19 10:36 UTC (permalink / raw)
  To: Josh Triplett
  Cc: dhowells, Linus Torvalds, Thomas Gleixner, Ingo Molnar,
	H. Peter Anvin, x86, Andrew Morton, Kees Cook, linux-kernel

Josh Triplett <josh@joshtriplett.org> wrote:

> arch/x86/kernel/irqinit.c defines an __init function init_IRQ, called
> from init/main.c.  No header file prototypes init_IRQ, because
> init/main.c tends to directly define prototypes for init functions it
> calls, rather than including appropriate headers.  So, add a prototype
> of init_IRQ to arch/x86/kernel/irqinit.c right above the definition, to
> satisfy gcc (-Wmissing-prototypes) and Sparse (-Wdecl).

Rather, you should put a declaration for it in a header file.

David

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ
  2012-11-19 10:36 ` [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ David Howells
@ 2012-11-19 17:08   ` Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: Josh Triplett @ 2012-11-19 17:08 UTC (permalink / raw)
  To: David Howells
  Cc: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Andrew Morton, Kees Cook, linux-kernel

On Mon, Nov 19, 2012 at 10:36:17AM +0000, David Howells wrote:
> Josh Triplett <josh@joshtriplett.org> wrote:
> > arch/x86/kernel/irqinit.c defines an __init function init_IRQ, called
> > from init/main.c.  No header file prototypes init_IRQ, because
> > init/main.c tends to directly define prototypes for init functions it
> > calls, rather than including appropriate headers.  So, add a prototype
> > of init_IRQ to arch/x86/kernel/irqinit.c right above the definition, to
> > satisfy gcc (-Wmissing-prototypes) and Sparse (-Wdecl).
> 
> Rather, you should put a declaration for it in a header file.

Happy to do so, except that as far as I can tell it doesn't seem
appropriate for any existing header, and creating a new header for the
sole purpose of that one prototype seems excessive, particularly since
the function only has the one call from init/main.c.  Nonetheless, if
you'd like a new header created for that prototype, or you have a
suggestion for an existing header I missed that seems appropriate, let
me know and I'll respin the patch.

- Josh Triplett

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 45/58] x86: Fix prototype for renamed function smp_threshold_interrupt
  2012-11-19  5:28 ` [PATCH 45/58] x86: Fix prototype for renamed function smp_threshold_interrupt Josh Triplett
@ 2012-11-19 18:27   ` Kees Cook
  0 siblings, 0 replies; 81+ messages in thread
From: Kees Cook @ 2012-11-19 18:27 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, linux-kernel

On Sun, Nov 18, 2012 at 9:28 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> Commit 7856f6cce4a8cda8c1f94b99605c07d16b8d8dec renamed
> mce_threshold_interrupt to smp_threshold_interrupt, but did not update
> the prototype in arch/x86/include/asm/traps.h to match.  Update the
> prototype to the new name.
>
> This also eliminates warnings from GCC (-Wmissing-prototypes) and Sparse
> (-Wdecl).
>
> arch/x86/kernel/traps.c:597:29: warning: no previous prototype for ‘smp_threshold_interrupt’ [-Wmissing-prototypes]
>
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>

Acked-by: Kees Cook <keescook@chromium.org>

-Kees

-- 
Kees Cook
Chrome OS Security

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions
  2012-11-19  5:28 ` [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions Josh Triplett
@ 2012-11-19 20:04   ` Andy Lutomirski
  2012-11-19 20:37     ` Josh Triplett
  0 siblings, 1 reply; 81+ messages in thread
From: Andy Lutomirski @ 2012-11-19 20:04 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, John Stultz, linux-kernel

On Sun, Nov 18, 2012 at 9:28 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> arch/x86/vdso/vclock_gettime.c and arch/x86/vdso/vgetcpu.c define
> several functions prefixed by __vdso_*, used in the alias definitions
> for the actual vdso symbols calls.  Add prototypes of these functions
> right before their definitions, to satisfy gcc (-Wmissing-prototypes)
> and Sparse (-Wdecl).
>
> arch/x86/vdso/vclock_gettime.c:161:45: warning: no previous prototype for ‘__vdso_clock_gettime’ [-Wmissing-prototypes]
> arch/x86/vdso/vclock_gettime.c:185:45: warning: no previous prototype for ‘__vdso_gettimeofday’ [-Wmissing-prototypes]
> arch/x86/vdso/vclock_gettime.c:213:48: warning: no previous prototype for ‘__vdso_time’ [-Wmissing-prototypes]
> arch/x86/vdso/vgetcpu.c:16:1: warning: no previous prototype for ‘__vdso_getcpu’ [-Wmissing-prototypes]
>
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> ---
>  arch/x86/vdso/vclock_gettime.c |    3 +++
>  arch/x86/vdso/vgetcpu.c        |    2 ++
>  2 files changed, 5 insertions(+)
>
> diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
> index 4df6c37..bc8b276 100644
> --- a/arch/x86/vdso/vclock_gettime.c
> +++ b/arch/x86/vdso/vclock_gettime.c
> @@ -158,6 +158,7 @@ notrace static int do_monotonic_coarse(struct timespec *ts)
>         return 0;
>  }
>
> +int __vdso_clock_gettime(clockid_t clock, struct timespec *ts);
>  notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
>  {
>         int ret = VCLOCK_NONE;
> @@ -182,6 +183,7 @@ notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
>  int clock_gettime(clockid_t, struct timespec *)
>         __attribute__((weak, alias("__vdso_clock_gettime")));
>
> +int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz);
>  notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
>  {
>         long ret = VCLOCK_NONE;
> @@ -210,6 +212,7 @@ int gettimeofday(struct timeval *, struct timezone *)
>   * This will break when the xtime seconds get inaccurate, but that is
>   * unlikely
>   */
> +time_t __vdso_time(time_t *t);
>  notrace time_t __vdso_time(time_t *t)
>  {
>         /* This is atomic on x86_64 so we don't need any locks. */
> diff --git a/arch/x86/vdso/vgetcpu.c b/arch/x86/vdso/vgetcpu.c
> index 5463ad5..b55350f 100644
> --- a/arch/x86/vdso/vgetcpu.c
> +++ b/arch/x86/vdso/vgetcpu.c
> @@ -12,6 +12,8 @@
>  #include <asm/vsyscall.h>
>  #include <asm/vgtod.h>
>
> +long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused);
> +
>  notrace long
>  __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
>  {
> --
> 1.7.10.4
>

Acked-by: Andy Lutomirski <luto@amacapital.net>

In theory, this could go in arch/x86/include/uapi/asm/vdso.h.  No one
cares, I suspect, since there exactly two non-test-case users that I
know of.

--Andy


-- 
Andy Lutomirski
AMA Capital Management, LLC

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions
  2012-11-19 20:04   ` Andy Lutomirski
@ 2012-11-19 20:37     ` Josh Triplett
  2012-11-19 22:44       ` Andy Lutomirski
  0 siblings, 1 reply; 81+ messages in thread
From: Josh Triplett @ 2012-11-19 20:37 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, John Stultz, linux-kernel

On Mon, Nov 19, 2012 at 12:04:23PM -0800, Andy Lutomirski wrote:
> On Sun, Nov 18, 2012 at 9:28 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> > arch/x86/vdso/vclock_gettime.c and arch/x86/vdso/vgetcpu.c define
> > several functions prefixed by __vdso_*, used in the alias definitions
> > for the actual vdso symbols calls.  Add prototypes of these functions
> > right before their definitions, to satisfy gcc (-Wmissing-prototypes)
> > and Sparse (-Wdecl).
> >
> > arch/x86/vdso/vclock_gettime.c:161:45: warning: no previous prototype for ‘__vdso_clock_gettime’ [-Wmissing-prototypes]
> > arch/x86/vdso/vclock_gettime.c:185:45: warning: no previous prototype for ‘__vdso_gettimeofday’ [-Wmissing-prototypes]
> > arch/x86/vdso/vclock_gettime.c:213:48: warning: no previous prototype for ‘__vdso_time’ [-Wmissing-prototypes]
> > arch/x86/vdso/vgetcpu.c:16:1: warning: no previous prototype for ‘__vdso_getcpu’ [-Wmissing-prototypes]
> >
> > Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> > ---
> >  arch/x86/vdso/vclock_gettime.c |    3 +++
> >  arch/x86/vdso/vgetcpu.c        |    2 ++
> >  2 files changed, 5 insertions(+)
> >
> > diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
> > index 4df6c37..bc8b276 100644
> > --- a/arch/x86/vdso/vclock_gettime.c
> > +++ b/arch/x86/vdso/vclock_gettime.c
> > @@ -158,6 +158,7 @@ notrace static int do_monotonic_coarse(struct timespec *ts)
> >         return 0;
> >  }
> >
> > +int __vdso_clock_gettime(clockid_t clock, struct timespec *ts);
> >  notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
> >  {
> >         int ret = VCLOCK_NONE;
> > @@ -182,6 +183,7 @@ notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
> >  int clock_gettime(clockid_t, struct timespec *)
> >         __attribute__((weak, alias("__vdso_clock_gettime")));
> >
> > +int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz);
> >  notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
> >  {
> >         long ret = VCLOCK_NONE;
> > @@ -210,6 +212,7 @@ int gettimeofday(struct timeval *, struct timezone *)
> >   * This will break when the xtime seconds get inaccurate, but that is
> >   * unlikely
> >   */
> > +time_t __vdso_time(time_t *t);
> >  notrace time_t __vdso_time(time_t *t)
> >  {
> >         /* This is atomic on x86_64 so we don't need any locks. */
> > diff --git a/arch/x86/vdso/vgetcpu.c b/arch/x86/vdso/vgetcpu.c
> > index 5463ad5..b55350f 100644
> > --- a/arch/x86/vdso/vgetcpu.c
> > +++ b/arch/x86/vdso/vgetcpu.c
> > @@ -12,6 +12,8 @@
> >  #include <asm/vsyscall.h>
> >  #include <asm/vgtod.h>
> >
> > +long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused);
> > +
> >  notrace long
> >  __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
> >  {
> > --
> > 1.7.10.4
> >
> 
> Acked-by: Andy Lutomirski <luto@amacapital.net>
> 
> In theory, this could go in arch/x86/include/uapi/asm/vdso.h.  No one
> cares, I suspect, since there exactly two non-test-case users that I
> know of.

If you think it makes sense to put the VDSO prototypes in that UAPI
header, I could prepare an alternate patch that does so.

- Josh Triplett

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 24/58] mm: include/linux/huge_mm.h: Declare is_vma_temporary_stack unconditionally
  2012-11-19  5:28 ` [PATCH 24/58] mm: include/linux/huge_mm.h: Declare is_vma_temporary_stack unconditionally Josh Triplett
@ 2012-11-19 21:36   ` David Rientjes
  0 siblings, 0 replies; 81+ messages in thread
From: David Rientjes @ 2012-11-19 21:36 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Andrew Morton, Andrea Arcangeli, Naoya Horiguchi,
	linux-kernel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 554 bytes --]

On Sun, 18 Nov 2012, Josh Triplett wrote:

> include/linux/huge_mm.h declares is_vma_temporary_stack inside an ifdef
> CONFIG_TRANSPARENT_HUGEPAGE; however, mm/rmap.c defines the function
> unconditionally.  Move the function outside of the ifdef.
> 
> This eliminates a warning from gcc (-Wmissing-prototypes) and from
> Sparse (-Wdecl).
> 
> mm/rmap.c:1440:6: warning: no previous prototype for ‘is_vma_temporary_stack’ [-Wmissing-prototypes]
> 
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 25/58] mm: include/linux/huge_mm.h: Declare handle_pte_fault unconditionally
  2012-11-19  5:28 ` [PATCH 25/58] mm: include/linux/huge_mm.h: Declare handle_pte_fault unconditionally Josh Triplett
@ 2012-11-19 21:39   ` David Rientjes
  0 siblings, 0 replies; 81+ messages in thread
From: David Rientjes @ 2012-11-19 21:39 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Andrew Morton, Andrea Arcangeli, Naoya Horiguchi,
	linux-kernel

On Sun, 18 Nov 2012, Josh Triplett wrote:

> diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h
> index 3f39803..8ed2187 100644
> --- a/include/linux/huge_mm.h
> +++ b/include/linux/huge_mm.h
> @@ -55,6 +55,10 @@ extern pmd_t *page_check_address_pmd(struct page *page,
>  
>  extern bool is_vma_temporary_stack(struct vm_area_struct *vma);
>  
> +extern int handle_pte_fault(struct mm_struct *mm,
> +			    struct vm_area_struct *vma, unsigned long address,
> +			    pte_t *pte, pmd_t *pmd, unsigned int flags);
> +
>  #ifdef CONFIG_TRANSPARENT_HUGEPAGE
>  #define HPAGE_PMD_SHIFT HPAGE_SHIFT
>  #define HPAGE_PMD_MASK HPAGE_MASK
> @@ -87,9 +91,6 @@ extern int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
>  			  pmd_t *dst_pmd, pmd_t *src_pmd,
>  			  struct vm_area_struct *vma,
>  			  unsigned long addr, unsigned long end);
> -extern int handle_pte_fault(struct mm_struct *mm,
> -			    struct vm_area_struct *vma, unsigned long address,
> -			    pte_t *pte, pmd_t *pmd, unsigned int flags);
>  extern int split_huge_page(struct page *page);
>  extern void __split_huge_page_pmd(struct mm_struct *mm, pmd_t *pmd);
>  #define split_huge_page_pmd(__mm, __pmd)				\

huge_mm.h is the last place someone would expect to see the prototype for 
this function and it only exists because the thp code needs to use it and 
it was the easy place to put it.  Perhaps declare this in mm.h instead 
where the declaration of handle_mm_fault() is?

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 29/58] mm: Make copy_pte_range static
  2012-11-19  5:28   ` Josh Triplett
@ 2012-11-19 21:40     ` David Rientjes
  -1 siblings, 0 replies; 81+ messages in thread
From: David Rientjes @ 2012-11-19 21:40 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Andrew Morton, Andrea Arcangeli, Naoya Horiguchi,
	Al Viro, Konstantin Khlebnikov, linux-kernel, linux-mm

[-- Attachment #1: Type: TEXT/PLAIN, Size: 691 bytes --]

On Sun, 18 Nov 2012, Josh Triplett wrote:

> Nothing outside of mm/memory.c references copy_pte_range.
> linux/huge_mm.h prototypes it, but nothing uses that prototype.  Commit
> 71e3aac0724ffe8918992d76acfe3aad7d8724a5 in January 2011 explicitly made
> copy_pte_range non-static, but no commit ever introduced a caller for
> copy_pte_range outside of mm/memory.c.  Make the function static.
> 
> This eliminates a warning from gcc (-Wmissing-prototypes) and from
> Sparse (-Wdecl).
> 
> mm/memory.c:917:5: warning: no previous prototype for ‘copy_pte_range’ [-Wmissing-prototypes]
> 
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 29/58] mm: Make copy_pte_range static
@ 2012-11-19 21:40     ` David Rientjes
  0 siblings, 0 replies; 81+ messages in thread
From: David Rientjes @ 2012-11-19 21:40 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Andrew Morton, Andrea Arcangeli, Naoya Horiguchi,
	Al Viro, Konstantin Khlebnikov, linux-kernel, linux-mm

[-- Attachment #1: Type: TEXT/PLAIN, Size: 691 bytes --]

On Sun, 18 Nov 2012, Josh Triplett wrote:

> Nothing outside of mm/memory.c references copy_pte_range.
> linux/huge_mm.h prototypes it, but nothing uses that prototype.  Commit
> 71e3aac0724ffe8918992d76acfe3aad7d8724a5 in January 2011 explicitly made
> copy_pte_range non-static, but no commit ever introduced a caller for
> copy_pte_range outside of mm/memory.c.  Make the function static.
> 
> This eliminates a warning from gcc (-Wmissing-prototypes) and from
> Sparse (-Wdecl).
> 
> mm/memory.c:917:5: warning: no previous prototype for a??copy_pte_rangea?? [-Wmissing-prototypes]
> 
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>

Acked-by: David Rientjes <rientjes@google.com>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions
  2012-11-19 20:37     ` Josh Triplett
@ 2012-11-19 22:44       ` Andy Lutomirski
  2012-11-19 22:46         ` H. Peter Anvin
  0 siblings, 1 reply; 81+ messages in thread
From: Andy Lutomirski @ 2012-11-19 22:44 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, John Stultz, linux-kernel

On Mon, Nov 19, 2012 at 12:37 PM, Josh Triplett <josh@joshtriplett.org> wrote:
> On Mon, Nov 19, 2012 at 12:04:23PM -0800, Andy Lutomirski wrote:
>> On Sun, Nov 18, 2012 at 9:28 PM, Josh Triplett <josh@joshtriplett.org> wrote:
>> > arch/x86/vdso/vclock_gettime.c and arch/x86/vdso/vgetcpu.c define
>> > several functions prefixed by __vdso_*, used in the alias definitions
>> > for the actual vdso symbols calls.  Add prototypes of these functions
>> > right before their definitions, to satisfy gcc (-Wmissing-prototypes)
>> > and Sparse (-Wdecl).
>> >
>> > arch/x86/vdso/vclock_gettime.c:161:45: warning: no previous prototype for ‘__vdso_clock_gettime’ [-Wmissing-prototypes]
>> > arch/x86/vdso/vclock_gettime.c:185:45: warning: no previous prototype for ‘__vdso_gettimeofday’ [-Wmissing-prototypes]
>> > arch/x86/vdso/vclock_gettime.c:213:48: warning: no previous prototype for ‘__vdso_time’ [-Wmissing-prototypes]
>> > arch/x86/vdso/vgetcpu.c:16:1: warning: no previous prototype for ‘__vdso_getcpu’ [-Wmissing-prototypes]
>> >
>> > Signed-off-by: Josh Triplett <josh@joshtriplett.org>
>> > ---
>> >  arch/x86/vdso/vclock_gettime.c |    3 +++
>> >  arch/x86/vdso/vgetcpu.c        |    2 ++
>> >  2 files changed, 5 insertions(+)
>> >
>> > diff --git a/arch/x86/vdso/vclock_gettime.c b/arch/x86/vdso/vclock_gettime.c
>> > index 4df6c37..bc8b276 100644
>> > --- a/arch/x86/vdso/vclock_gettime.c
>> > +++ b/arch/x86/vdso/vclock_gettime.c
>> > @@ -158,6 +158,7 @@ notrace static int do_monotonic_coarse(struct timespec *ts)
>> >         return 0;
>> >  }
>> >
>> > +int __vdso_clock_gettime(clockid_t clock, struct timespec *ts);
>> >  notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
>> >  {
>> >         int ret = VCLOCK_NONE;
>> > @@ -182,6 +183,7 @@ notrace int __vdso_clock_gettime(clockid_t clock, struct timespec *ts)
>> >  int clock_gettime(clockid_t, struct timespec *)
>> >         __attribute__((weak, alias("__vdso_clock_gettime")));
>> >
>> > +int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz);
>> >  notrace int __vdso_gettimeofday(struct timeval *tv, struct timezone *tz)
>> >  {
>> >         long ret = VCLOCK_NONE;
>> > @@ -210,6 +212,7 @@ int gettimeofday(struct timeval *, struct timezone *)
>> >   * This will break when the xtime seconds get inaccurate, but that is
>> >   * unlikely
>> >   */
>> > +time_t __vdso_time(time_t *t);
>> >  notrace time_t __vdso_time(time_t *t)
>> >  {
>> >         /* This is atomic on x86_64 so we don't need any locks. */
>> > diff --git a/arch/x86/vdso/vgetcpu.c b/arch/x86/vdso/vgetcpu.c
>> > index 5463ad5..b55350f 100644
>> > --- a/arch/x86/vdso/vgetcpu.c
>> > +++ b/arch/x86/vdso/vgetcpu.c
>> > @@ -12,6 +12,8 @@
>> >  #include <asm/vsyscall.h>
>> >  #include <asm/vgtod.h>
>> >
>> > +long __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused);
>> > +
>> >  notrace long
>> >  __vdso_getcpu(unsigned *cpu, unsigned *node, struct getcpu_cache *unused)
>> >  {
>> > --
>> > 1.7.10.4
>> >
>>
>> Acked-by: Andy Lutomirski <luto@amacapital.net>
>>
>> In theory, this could go in arch/x86/include/uapi/asm/vdso.h.  No one
>> cares, I suspect, since there exactly two non-test-case users that I
>> know of.
>
> If you think it makes sense to put the VDSO prototypes in that UAPI
> header, I could prepare an alternate patch that does so.

That header doesn't actually exist.  Feel free to create it if you're
feeling ambitious :)

--Andy

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions
  2012-11-19 22:44       ` Andy Lutomirski
@ 2012-11-19 22:46         ` H. Peter Anvin
  0 siblings, 0 replies; 81+ messages in thread
From: H. Peter Anvin @ 2012-11-19 22:46 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Josh Triplett, Linus Torvalds, Thomas Gleixner, Ingo Molnar, x86,
	John Stultz, linux-kernel

On 11/19/2012 02:44 PM, Andy Lutomirski wrote:
>>>
>>> Acked-by: Andy Lutomirski <luto@amacapital.net>
>>>
>>> In theory, this could go in arch/x86/include/uapi/asm/vdso.h.  No one
>>> cares, I suspect, since there exactly two non-test-case users that I
>>> know of.
>>
>> If you think it makes sense to put the VDSO prototypes in that UAPI
>> header, I could prepare an alternate patch that does so.
> 
> That header doesn't actually exist.  Feel free to create it if you're
> feeling ambitious :)
> 

It would indeed be good to separate out the UAPI for the vdso.

	-hpa



^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 22/58] arch/x86/kernel/cpu/common.c: Mark cpu_detect_tlb static
  2012-11-19  5:28 ` [PATCH 22/58] arch/x86/kernel/cpu/common.c: Mark cpu_detect_tlb static Josh Triplett
@ 2012-11-20  1:40   ` Alex Shi
  0 siblings, 0 replies; 81+ messages in thread
From: Alex Shi @ 2012-11-20  1:40 UTC (permalink / raw)
  To: Josh Triplett
  Cc: Linus Torvalds, Thomas Gleixner, Ingo Molnar, H. Peter Anvin,
	x86, Borislav Petkov, Steven Rostedt, linux-kernel

On 11/19/2012 01:28 PM, Josh Triplett wrote:
> Nothing outside of arch/x86/kernel/cpu/common.c references
> cpu_detect_tlb, so mark it static.
> 
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> ---
>  arch/x86/kernel/cpu/common.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/cpu/common.c b/arch/x86/kernel/cpu/common.c
> index 7505f7b..eb12c08 100644
> --- a/arch/x86/kernel/cpu/common.c
> +++ b/arch/x86/kernel/cpu/common.c
> @@ -482,7 +482,7 @@ u16 __read_mostly tlb_lld_4m[NR_INFO];
>   */
>  s8  __read_mostly tlb_flushall_shift = -1;
>  
> -void __cpuinit cpu_detect_tlb(struct cpuinfo_x86 *c)
> +static void __cpuinit cpu_detect_tlb(struct cpuinfo_x86 *c)
>  {
>  	if (this_cpu->c_detect_tlb)
>  		this_cpu->c_detect_tlb(c);
> 

Acked-by: Alex Shi <alex.shi@intel.com>

^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 13/58] RCU: Make rcu_is_cpu_rrupt_from_idle helper functions static
  2012-11-19  5:27 ` [PATCH 13/58] RCU: Make rcu_is_cpu_rrupt_from_idle helper functions static Josh Triplett
@ 2012-11-20 17:57   ` Paul E. McKenney
  0 siblings, 0 replies; 81+ messages in thread
From: Paul E. McKenney @ 2012-11-20 17:57 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Linus Torvalds, Dipankar Sarma, linux-kernel

On Sun, Nov 18, 2012 at 09:27:52PM -0800, Josh Triplett wrote:
> Both rcutiny and rcutree define a helper funtion
> rcu_is_cpu_rrupt_from_idle, each used exactly once, later in the same
> file.  Declare these helper functions static.
> 
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>

Hard to argue with this one!  I forward-ported to current -rcu and
queued for v3.9.

							Thanx, Paul

> ---
>  kernel/rcutiny.c |    2 +-
>  kernel/rcutree.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
> index e4c6a59..0e506c3 100644
> --- a/kernel/rcutiny.c
> +++ b/kernel/rcutiny.c
> @@ -193,7 +193,7 @@ EXPORT_SYMBOL(rcu_is_cpu_idle);
>   * interrupts don't count, we must be running at the first interrupt
>   * level.
>   */
> -int rcu_is_cpu_rrupt_from_idle(void)
> +static int rcu_is_cpu_rrupt_from_idle(void)
>  {
>  	return rcu_dynticks_nesting <= 0;
>  }
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 74df86b..70d9b6e 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -783,7 +783,7 @@ EXPORT_SYMBOL_GPL(rcu_lockdep_current_cpu_online);
>   * interrupt from idle, return true.  The caller must have at least
>   * disabled preemption.
>   */
> -int rcu_is_cpu_rrupt_from_idle(void)
> +static int rcu_is_cpu_rrupt_from_idle(void)
>  {
>  	return __get_cpu_var(rcu_dynticks).dynticks_nesting <= 1;
>  }
> -- 
> 1.7.10.4
> 


^ permalink raw reply	[flat|nested] 81+ messages in thread

* Re: [PATCH 11/58] tty: Mark sysfs_attr_ns static
  2012-11-19  5:27 ` [PATCH 11/58] tty: Mark sysfs_attr_ns static Josh Triplett
@ 2012-11-21 23:18   ` Greg Kroah-Hartman
  0 siblings, 0 replies; 81+ messages in thread
From: Greg Kroah-Hartman @ 2012-11-21 23:18 UTC (permalink / raw)
  To: Josh Triplett; +Cc: Linus Torvalds, linux-kernel

On Sun, Nov 18, 2012 at 09:27:50PM -0800, Josh Triplett wrote:
> Nothing outside of fs/sysfs/file.c references this function, so mark it static.
> 
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> ---
>  fs/sysfs/file.c |    4 ++--

Your Subject: is a bit wrong, this isn't a tty patch :(

I'll go clean it up...


^ permalink raw reply	[flat|nested] 81+ messages in thread

* [tip:perf/core] tracing: Mark tracing_dentry_percpu() static
  2012-11-19  5:27 ` [PATCH 06/58] trace: Mark tracing_dentry_percpu static Josh Triplett
@ 2013-02-03 19:15   ` tip-bot for Josh Triplett
  0 siblings, 0 replies; 81+ messages in thread
From: tip-bot for Josh Triplett @ 2013-02-03 19:15 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: linux-kernel, hpa, mingo, rostedt, josh, tglx

Commit-ID:  b736f48bda54ec75b7dc9306884c3843f1a78a0a
Gitweb:     http://git.kernel.org/tip/b736f48bda54ec75b7dc9306884c3843f1a78a0a
Author:     Josh Triplett <josh@joshtriplett.org>
AuthorDate: Sun, 18 Nov 2012 21:27:45 -0800
Committer:  Steven Rostedt <rostedt@goodmis.org>
CommitDate: Thu, 24 Jan 2013 22:03:01 -0500

tracing: Mark tracing_dentry_percpu() static

Nothing outside of kernel/trace/trace.c references tracing_dentry_percpu().

Link: http://lkml.kernel.org/r/1353302917-13995-7-git-send-email-josh@joshtriplett.org

Signed-off-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
---
 kernel/trace/trace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index d2a6583..ca9b7df 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -4506,7 +4506,7 @@ struct dentry *tracing_init_dentry(void)
 
 static struct dentry *d_percpu;
 
-struct dentry *tracing_dentry_percpu(void)
+static struct dentry *tracing_dentry_percpu(void)
 {
 	static int once;
 	struct dentry *d_tracer;

^ permalink raw reply	[flat|nested] 81+ messages in thread

end of thread, other threads:[~2013-02-03 19:16 UTC | newest]

Thread overview: 81+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-19  5:27 [PATCH 00/58] Eliminate GCC -Wmissing-prototypes warnings from allnoconfig Josh Triplett
2012-11-19  5:27 ` [PATCH 01/58] pty: Mark pty_resize static Josh Triplett
2012-11-19  5:27 ` [PATCH 02/58] drivers/tty/vt/vt_ioctl.c: Include <linux/suspend.h> for pm_set_vt_switch Josh Triplett
2012-11-19  5:27 ` [PATCH 03/58] sched: Mark scale_rt_power static Josh Triplett
2012-11-19  5:27 ` [PATCH 04/58] x86: apic: Mark enable_IR static Josh Triplett
2012-11-19  5:27 ` [PATCH 05/58] x86: Only define default_init_apic_ldr for 32-bit Josh Triplett
2012-11-19  5:27 ` [PATCH 06/58] trace: Mark tracing_dentry_percpu static Josh Triplett
2013-02-03 19:15   ` [tip:perf/core] tracing: Mark tracing_dentry_percpu() static tip-bot for Josh Triplett
2012-11-19  5:27 ` [PATCH 07/58] lib/iommu-helper.c: Include <linux/iommu-helper.h> for function prototypes Josh Triplett
2012-11-19  5:27 ` [PATCH 08/58] tty: Mark tty_del_file and __tty_hangup static Josh Triplett
2012-11-19  5:27 ` [PATCH 09/58] fs/locks.c: Mark generic_add_lease and generic_delete_lease static Josh Triplett
2012-11-19  5:27 ` [PATCH 10/58] swiotlb: Prototype swiotlb_late_init_with_default_size in swiotlb.h Josh Triplett
2012-11-19  5:27 ` [PATCH 11/58] tty: Mark sysfs_attr_ns static Josh Triplett
2012-11-21 23:18   ` Greg Kroah-Hartman
2012-11-19  5:27 ` [PATCH 12/58] linux/irq_work.h: Add prototype for arch_irq_work_raise Josh Triplett
2012-11-19  5:27 ` [PATCH 13/58] RCU: Make rcu_is_cpu_rrupt_from_idle helper functions static Josh Triplett
2012-11-20 17:57   ` Paul E. McKenney
2012-11-19  5:27 ` [PATCH 14/58] x86: Mark EVT_TO_HPET_DEV static Josh Triplett
2012-11-19  5:27 ` [PATCH 15/58] kernel/time/timekeeping.c: Include tick-internal.h for do_timer prototype Josh Triplett
2012-11-19  5:27 ` [PATCH 16/58] drivers/base/core.c: Mark to_root_device static Josh Triplett
2012-11-19  5:27 ` [PATCH 17/58] arch/x86/kernel/cpu/perf_event_intel_uncore.c: Mark internal functions static Josh Triplett
2012-11-19  5:27 ` [PATCH 18/58] mm: bootmem: Declare internal ___alloc_bootmem_node function static Josh Triplett
2012-11-19  5:27   ` Josh Triplett
2012-11-19  5:27 ` [PATCH 19/58] block: Mark __blkdev_issue_zeroout static Josh Triplett
2012-11-19  5:27 ` [PATCH 20/58] kernel/events/hw_breakpoint.c: Make hw_breakpoint_weight static Josh Triplett
2012-11-19  5:28 ` [PATCH 21/58] kernel/events/core.c: Mark internal function static Josh Triplett
2012-11-19  5:28 ` [PATCH 22/58] arch/x86/kernel/cpu/common.c: Mark cpu_detect_tlb static Josh Triplett
2012-11-20  1:40   ` Alex Shi
2012-11-19  5:28 ` [PATCH 23/58] mm: Avoid defining set_iounmap_nonlazy on non-x86 Josh Triplett
2012-11-19  5:28   ` Josh Triplett
2012-11-19  5:28 ` [PATCH 24/58] mm: include/linux/huge_mm.h: Declare is_vma_temporary_stack unconditionally Josh Triplett
2012-11-19 21:36   ` David Rientjes
2012-11-19  5:28 ` [PATCH 25/58] mm: include/linux/huge_mm.h: Declare handle_pte_fault unconditionally Josh Triplett
2012-11-19 21:39   ` David Rientjes
2012-11-19  5:28 ` [PATCH 26/58] mm/internal.h: Declare vma_address unconditionally Josh Triplett
2012-11-19  5:28   ` Josh Triplett
2012-11-19  5:28 ` [PATCH 27/58] x86: apic: Make apic_flat_64.c include asm/apic_flat_64.h for flat_init_apic_ldr prototype Josh Triplett
2012-11-19  5:28 ` [PATCH 28/58] x86: io_apic: Don't define acpi_get_override_irq if CONFIG_ACPI=n Josh Triplett
2012-11-19  5:28 ` [PATCH 29/58] mm: Make copy_pte_range static Josh Triplett
2012-11-19  5:28   ` Josh Triplett
2012-11-19 21:40   ` David Rientjes
2012-11-19 21:40     ` David Rientjes
2012-11-19  5:28 ` [PATCH 30/58] block: Eliminate unused function kblockd_schedule_delayed_work Josh Triplett
2012-11-19  5:28 ` [PATCH 31/58] perf: cgroup: Drop unused perf_cgroup_switch stub Josh Triplett
2012-11-19  5:28 ` [PATCH 32/58] kernel/resource.c: Include linux/mm.h for page_is_ram prototype Josh Triplett
2012-11-19  5:28 ` [PATCH 33/58] kernel/resource.c: Make internal function reallocate_resource static Josh Triplett
2012-11-19  7:08   ` Ram Pai
2012-11-19  5:28 ` [PATCH 34/58] kbuild: kernel/bounds.c: Add prototype for dummy function foo Josh Triplett
2012-11-19  5:28 ` [PATCH 35/58] x86: arch/x86/kernel/asm-offsets.c: Add prototype for dummy function common Josh Triplett
2012-11-19  5:28 ` [PATCH 36/58] kernel/fork.c: Add prototype for __weak stub of arch_release_thread_info Josh Triplett
2012-11-19  5:28 ` [PATCH 37/58] kernel/fork.c: Add prototype for fork_init Josh Triplett
2012-11-19  5:28 ` [PATCH 38/58] block: Mark internal function blk_drain_queue static Josh Triplett
2012-11-19  5:28 ` [PATCH 39/58] kernel/events/core.c: Add prototype for __weak stub of arch_perf_update_userpage Josh Triplett
2012-11-19  5:28 ` [PATCH 40/58] panic: Add prototype for __weak stub of panic_smp_self_stop Josh Triplett
2012-11-19  5:28 ` [PATCH 41/58] init/calibrate.c: Add prototype for __weak stub of calibrate_delay_is_known Josh Triplett
2012-11-19  5:28 ` [PATCH 42/58] kernel/events/hw_breakpoint.c: Add prototype for __weak stub of arch_unregister_hw_breakpoint Josh Triplett
2012-11-19  5:28 ` [PATCH 43/58] mm: Mark fallback version of __early_pfn_to_nid static Josh Triplett
2012-11-19  5:28   ` Josh Triplett
2012-11-19  5:28 ` [PATCH 44/58] mm: Only define is_pageblock_removable_nolock when needed Josh Triplett
2012-11-19  5:28   ` Josh Triplett
2012-11-19  5:28 ` [PATCH 45/58] x86: Fix prototype for renamed function smp_threshold_interrupt Josh Triplett
2012-11-19 18:27   ` Kees Cook
2012-11-19  5:28 ` [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ Josh Triplett
2012-11-19  5:28 ` [PATCH 47/58] x86: arch/x86/kernel/process.c: Include asm/switch_to.h for __switch_to_xtra prototype Josh Triplett
2012-11-19  5:28 ` [PATCH 48/58] x86: arch/x86/kernel/time.c: Include asm/setup.h for setup_default_timer_irq prototype Josh Triplett
2012-11-19  5:28 ` [PATCH 49/58] x86: init: Mark internal functions iommu_init_noop and iommu_shutdown_noop static Josh Triplett
2012-11-19  5:28 ` [PATCH 50/58] x86: arch/x86/kernel/irq_work.c: Add prototype for smp_irq_work_interrupt Josh Triplett
2012-11-19  5:28 ` [PATCH 51/58] x86: perf: Add prototype for arch_perf_update_userpage Josh Triplett
2012-11-19  5:28 ` [PATCH 52/58] x86: vdso: Add prototypes for __vdso_* functions Josh Triplett
2012-11-19 20:04   ` Andy Lutomirski
2012-11-19 20:37     ` Josh Triplett
2012-11-19 22:44       ` Andy Lutomirski
2012-11-19 22:46         ` H. Peter Anvin
2012-11-19  5:28 ` [PATCH 53/58] linux/syscalls.h: Add prototypes for sys_rt_sigaction and sys_rt_sigsuspend Josh Triplett
2012-11-19  5:28 ` [PATCH 54/58] linux/syscalls.h: Include asm/syscalls.h for additional prototypes Josh Triplett
2012-11-19  5:28 ` [PATCH 55/58] sched: Add prototype for sched_set_stop_task Josh Triplett
2012-11-19  5:28 ` [PATCH 56/58] sched: Only define init_cfs_bandwidth stub when CONFIG_FAIR_GROUP_SCHED=y Josh Triplett
2012-11-19  5:28 ` [PATCH 57/58] sched: Move stubs for CONFIG_FAIR_GROUP_SCHED=n to sched.h Josh Triplett
2012-11-19  5:28 ` [PATCH 58/58] sched: Move stubs for CONFIG_RT_GROUP_SCHED=n " Josh Triplett
2012-11-19 10:36 ` [PATCH 46/58] x86: arch/x86/kernel/irqinit.c: Add prototype for init_IRQ David Howells
2012-11-19 17:08   ` Josh Triplett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.