Skip to content

Eliminate GCC -Wmissing-prototype warnings

Darshana Padmadas lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest16 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/16arch: x86: boot: Make function static and add function prototypearch/x86/boot/compressed/eboot.c+8 -11 reply
2/16arch: x86: boot: Add prototype for decompress_kernelarch/x86/boot/compressed/misc.c+7 -00 replies
3/16arch: x86: boot: Include header string.h for function prototypesarch/x86/boot/string.c+1 -00 replies
4/16arch: x86: ia32: Add prototype for compat_ni_syscallarch/x86/ia32/nosyscall.c+2 -00 replies
5/16arch: x86: kernel: Make internal functions static in cpu/intel_cacheinfo.carch/x86/kernel/cpu/intel_cacheinfo.c+2 -22 replies
6/16arch: x86: kernel: cpu: Mark function mce_chrdev_write staticarch/x86/kernel/cpu/mcheck/mce.c+1 -10 replies
7/16arch: x86: kernel: Mark internal function EVT_TO_HPET_DEV staticarch/x86/kernel/hpet.c+1 -10 replies
8/16arch: x86: kernel: Mark internal functions static in kvm.carch/x86/kernel/kvm.c+2 -20 replies
9/16arch: x86: kernel: Include <asm/switch_to.h> for function prototypearch/x86/kernel/process.c+1 -00 replies
10/16arch: x86: kernel: Add prototype for function sys32_x32_rt_sigreturnarch/x86/kernel/signal.c+3 -00 replies
11/16arch: x86: kernel: Add prototype for smp_reboot_interruptarch/x86/kernel/smp.c+2 -00 replies
12/16arch: x86: kernel: Add prototype for fixup_bad_iret in traps.carch/x86/kernel/traps.c+3 -00 replies
13/16arch: x86: xen: Add prototype for xen_start_kernel in enlighten.carch/x86/xen/enlighten.c+2 -00 replies
14/16arch: x86: xen: Mark internal function xen_flush_tlb_all static.arch/x86/xen/mmu.c+1 -10 replies
15/16arch: x86: xen: Add prototypes for functions defined in mmu.carch/x86/xen/mmu.h+8 -00 replies
16/16arch: x86: xen: Mark internal functions static in setup.carch/x86/xen/setup.c+2 -20 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/16] Eliminate GCC -Wmissing-prototype warnings

GCC warns about functions without previous
prototypes i.e -Wmissing-prototypes warnings.

In the following patches the following fixes have been adopted to eliminate these warnings:
- Functions defined in a file, that are internal to that file have been made static.
- Header files have been included in files whose non-internal functions have their prototypes defined in these headers files.
- Adding prototypes for several non-internal functions in the appropriate header file while keeping the structure definitions of the parameters used by the functions in mind.
- Add the prototype above the
function definition.

These warnings can be generated by adding -Wmissing-prototypes to KBUILD_FLAGS in the top-level Makefile and then perform the build.

Darshana Padmadas (16):
arch: x86: boot: Make function static and add function prototype
arch: x86: boot: Add prototype for decompress_kernel
arch: x86: boot: Include header string.h for function prototypes
arch: x86: ia32: Add prototype for compat_ni_syscall
arch: x86: kernel: Make internal functions static in
cpu/intel_cacheinfo.c
arch: x86: kernel: cpu: Mark function mce_chrdev_write static
arch: x86: kernel: Mark internal function EVT_TO_HPET_DEV static
arch: x86: kernel: Mark internal functions static in kvm.c
arch: x86: kernel: Include <asm/switch_to.h> for function prototype
arch: x86: kernel: Add prototype for function sys32_x32_rt_sigreturn
arch: x86: kernel: Add prototype for smp_reboot_interrupt
arch: x86: kernel: Add prototype for fixup_bad_iret in traps.c
arch: x86: xen: Add prototype for xen_start_kernel in enlighten.c
arch: x86: xen: Mark internal function xen_flush_tlb_all static.
arch: x86: xen: Add prototypes for functions defined in mmu.c
arch: x86: xen: Mark internal functions static in setup.c

 arch/x86/boot/compressed/eboot.c      | 9 ++++++++-
 arch/x86/boot/compressed/misc.c       | 7 +++++++
 arch/x86/boot/string.c                | 1 +
 arch/x86/ia32/nosyscall.c             | 2 ++
 arch/x86/kernel/cpu/intel_cacheinfo.c | 4 ++--
 arch/x86/kernel/cpu/mcheck/mce.c      | 2 +-
 arch/x86/kernel/hpet.c                | 2 +-
 arch/x86/kernel/kvm.c                 | 4 ++--
 arch/x86/kernel/process.c             | 1 +
 arch/x86/kernel/signal.c              | 3 +++
 arch/x86/kernel/smp.c                 | 2 ++
 arch/x86/kernel/traps.c               | 3 +++
 arch/x86/xen/enlighten.c              | 2 ++
 arch/x86/xen/mmu.c                    | 2 +-
 arch/x86/xen/mmu.h                    | 8 ++++++++
 arch/x86/xen/setup.c                  | 4 ++--
 16 files changed, 46 insertions(+), 10 deletions(-)
Signature · 1 line
1.9.1