Skip to content

x86: address -Wmissing-prototype warnings

Arnd Bergmann linux-mm linux-pci linux-pm linux-trace-kernel lkml platform-driver-x86 virtualization xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest20 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/20x86: move prepare_ftrace_return prototype to headerarch/x86/include/asm/ftrace.h arch/x86/kernel/ftrace.c+3 -31 reply
2/20x86: ce4100: Mark local functions as 'static'arch/x86/pci/ce4100.c+2 -20 replies
3/20x86: apic: hide unused safe_smp_processor_id on UParch/x86/kernel/apic/ipi.c+2 -00 replies
4/20x86: avoid unneeded __div64_32 function definitionarch/x86/include/asm/div64.h+2 -00 replies
5/20x86: head: add dummy prototype for mk_early_pgtbl_32arch/x86/kernel/head32.c+1 -01 reply
6/20x86: math-emu: include asm/fpu/regset.harch/x86/math-emu/fpu_entry.c+1 -00 replies
7/20x86: doublefault: avoid missing-prototype warningsarch/x86/include/asm/doublefault.h arch/x86/kernel/doublefault_32.c+5 -00 replies
8/20x86: highmem: include asm/numa.h for set_highmem_pages_initarch/x86/mm/highmem_32.c+1 -00 replies
9/20x86: platform_quirks: include linux/pnp.h for arch_pnpbios_disabledarch/x86/kernel/platform-quirks.c+1 -00 replies
10/20x86: xen: add missing prototypesarch/x86/xen/efi.c arch/x86/xen/smp.h arch/x86/xen/xen-ops.h +1 more+22 -02 replies
11/20x86: entry: add do_SYSENTER_32() prototypearch/x86/include/asm/syscall.h+4 -20 replies
12/20x86: qspinlock-paravirt: fix mising-prototype warningsarch/x86/include/asm/qspinlock_paravirt.h arch/x86/kernel/paravirt.c kernel/locking/qspinlock_paravirt.h+14 -100 replies
13/20x86: hibernate: declare global functions in suspend.hinclude/linux/suspend.h kernel/power/power.h+4 -50 replies
14/20x86: fbdev: include asm/fb.h as neededarch/x86/video/fbdev.c+1 -00 replies
15/20x86: mce: add copy_mc_fragile_handle_tail prototypearch/x86/include/asm/mce.h+3 -00 replies
16/20x86: vdso: include vdso/processor.harch/x86/entry/vdso/vgetcpu.c+1 -00 replies
17/20x86: usercopy: include arch_wb_cache_pmem declarationarch/x86/lib/usercopy_64.c+1 -00 replies
18/20x86: ioremap: add early_memremap_pgprot_adjust prototypeinclude/linux/io.h mm/internal.h+5 -60 replies
19/20x86: purgatory: include header for warn() declarationarch/x86/boot/compressed/error.c arch/x86/boot/compressed/error.h arch/x86/purgatory/purgatory.c+3 -20 replies
20/20x86: olpc: avoid missing-prototype warningsarch/x86/platform/olpc/olpc_dt.c include/linux/olpc-ec.h+3 -10 replies

Reviews trailers per patch

2 of 20 patches have a Reviewed-by or Acked-by.

PatchSteven Rostedt (Google)Alexander Lobakin
1/20A-b
2/20
3/20
4/20
5/20R-b
6/20
7/20
8/20
9/20
10/20
11/20
12/20
13/20
14/20
15/20
16/20
17/20
18/20
19/20
20/20

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/20] x86: address -Wmissing-prototype warnings

From: Arnd Bergmann <[email protected]>

This addresses all x86 specific prototype warnings. The majority of the patches should be straightforward, either adding an #include statement to get the right header, or ensuring that an unused global function is left out of the build when the prototype is hidden.

The ones that are a bit awkward are those that just add a prototype to shut up the warning, but the prototypes are never used for calling the function because the only caller is in assembler code. I tried to come up with other ways to shut up the compiler using the asmlinkage annotation, but with no success.

All of the warnings have to be addressed in some form before the warning can be enabled by default.

Arnd

Arnd Bergmann (20):
x86: move prepare_ftrace_return prototype to header
x86: ce4100: Mark local functions as 'static'
x86: apic: hide unused safe_smp_processor_id on UP
x86: avoid unneeded __div64_32 function definition
x86: head: add dummy prototype for mk_early_pgtbl_32
x86: math-emu: include asm/fpu/regset.h
x86: doublefault: avoid missing-prototype warnings
x86: highmem: include asm/numa.h for set_highmem_pages_init
x86: platform_quirks: include linux/pnp.h for arch_pnpbios_disabled
x86: xen: add missing prototypes
x86: entry: add do_SYSENTER_32() prototype
x86: qspinlock-paravirt: fix mising-prototype warnings
x86: hibernate: declare global functions in suspend.h
x86: fbdev: include asm/fb.h as needed
x86: mce: add copy_mc_fragile_handle_tail prototype
x86: vdso: include vdso/processor.h
x86: usercopy: include arch_wb_cache_pmem declaration
x86: ioremap: add early_memremap_pgprot_adjust prototype
x86: purgatory: include header for warn() declaration
x86: olpc: avoid missing-prototype warnings

 arch/x86/boot/compressed/error.c          |  2 +-
 arch/x86/boot/compressed/error.h          |  2 +-
 arch/x86/entry/vdso/vgetcpu.c             |  1 +
 arch/x86/include/asm/div64.h              |  2 ++
 arch/x86/include/asm/doublefault.h        |  4 ++++
 arch/x86/include/asm/ftrace.h             |  3 +++
 arch/x86/include/asm/mce.h                |  3 +++
 arch/x86/include/asm/qspinlock_paravirt.h |  2 ++
 arch/x86/include/asm/syscall.h            |  6 ++++--
 arch/x86/kernel/apic/ipi.c                |  2 ++
 arch/x86/kernel/doublefault_32.c          |  1 +
 arch/x86/kernel/ftrace.c                  |  3 ---
 arch/x86/kernel/head32.c                  |  1 +
 arch/x86/kernel/paravirt.c                |  2 ++
 arch/x86/kernel/platform-quirks.c         |  1 +
 arch/x86/lib/usercopy_64.c                |  1 +
 arch/x86/math-emu/fpu_entry.c             |  1 +
 arch/x86/mm/highmem_32.c                  |  1 +
 arch/x86/pci/ce4100.c                     |  4 ++--
 arch/x86/platform/olpc/olpc_dt.c          |  2 +-
 arch/x86/purgatory/purgatory.c            |  1 +
 arch/x86/video/fbdev.c                    |  1 +
 arch/x86/xen/efi.c                        |  2 ++
 arch/x86/xen/smp.h                        |  3 +++
 arch/x86/xen/xen-ops.h                    | 14 ++++++++++++++
 include/linux/io.h                        |  5 +++++
 include/linux/olpc-ec.h                   |  2 ++
 include/linux/suspend.h                   |  4 ++++
 include/xen/xen.h                         |  3 +++
 kernel/locking/qspinlock_paravirt.h       | 20 ++++++++++----------
 kernel/power/power.h                      |  5 -----
 mm/internal.h                             |  6 ------
 32 files changed, 79 insertions(+), 31 deletions(-)
Signature · 29 lines
2.39.2

Cc: Thomas Gleixner <[email protected]> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),commit_signer:1/5=20%,authored:1/5=20%)
Cc: Ingo Molnar <[email protected]> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: Borislav Petkov <[email protected]> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),commit_signer:1/3=33%,commit_signer:1/5=20%,authored:1/5=20%,removed_lines:40/51=78%)
Cc: Dave Hansen <[email protected]> (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT),commit_signer:1/5=20%)
Cc: [email protected] (maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: "H. Peter Anvin" <[email protected]> (reviewer:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: Andy Lutomirski <[email protected]> (maintainer:X86 VDSO)
Cc: Steven Rostedt <[email protected]> (maintainer:FUNCTION HOOKS (FTRACE))
Cc: Masami Hiramatsu <[email protected]> (maintainer:FUNCTION HOOKS (FTRACE))
Cc: Mark Rutland <[email protected]> (reviewer:FUNCTION HOOKS (FTRACE))
Cc: Juergen Gross <[email protected]> (supporter:PARAVIRT_OPS INTERFACE,commit_signer:2/5=40%,authored:1/5=20%,added_lines:20/31=65%,removed_lines:27/35=77%)
Cc: "Srivatsa S. Bhat (VMware)" <[email protected]> (supporter:PARAVIRT_OPS INTERFACE)
Cc: Alexey Makhalov <[email protected]> (reviewer:PARAVIRT_OPS INTERFACE)
Cc: VMware PV-Drivers Reviewers <[email protected]> (reviewer:PARAVIRT_OPS INTERFACE)
Cc: Peter Zijlstra <[email protected]> (maintainer:X86 MM,commit_signer:4/5=80%,commit_signer:1/2=50%)
Cc: Darren Hart <[email protected]> (reviewer:X86 PLATFORM DRIVERS - ARCH)
Cc: Andy Shevchenko <[email protected]> (reviewer:X86 PLATFORM DRIVERS - ARCH)
Cc: Boris Ostrovsky <[email protected]> (reviewer:XEN HYPERVISOR X86)
Cc: "Rafael J. Wysocki" <[email protected]> (supporter:HIBERNATION (aka Software Suspend, aka swsusp))
Cc: [email protected] (open list:X86 ARCHITECTURE (32-BIT AND 64-BIT))
Cc: [email protected] (open list:FUNCTION HOOKS (FTRACE))
Cc: [email protected] (open list:PARAVIRT_OPS INTERFACE)
Cc: [email protected] (open list:PCI SUBSYSTEM)
Cc: [email protected] (open list:X86 PLATFORM DRIVERS - ARCH)
Cc: [email protected] (moderated list:XEN HYPERVISOR X86)
Cc: [email protected] (open list:HIBERNATION (aka Software Suspend, aka swsusp))
Cc: [email protected] (open list:MEMORY MANAGEMENT)