All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: Yi Wang <wang.yi59@zte.com.cn>
Cc: linux-efi@vger.kernel.org, anton@enomsg.org, kvm@vger.kernel.org,
	rkrcmar@redhat.com, peterz@infradead.org, jan.kiszka@siemens.com,
	virtualization@lists.linux-foundation.org,
	pravin.shedge4linux@gmail.com, namit@vmware.com, hpa@zytor.com,
	frowand.list@gmail.com, akataria@vmware.com, prarit@redhat.com,
	robh@kernel.org, zhong.weidong@zte.com.cn, bhe@redhat.com,
	devicetree@vger.kernel.org, x86@kernel.org,
	pasha.tatashin@oracle.com, takahiro.akashi@linaro.org,
	andy.shevchenko@gmail.com, mingo@redhat.com,
	linux-pci@vger.kernel.org, dyoung@redhat.com,
	m.mizuma@jp.fujitsu.com, jailhouse-dev@googlegroups.com,
	jroedel@suse.de, keescook@chromium.org, konrad.wilk@oracle.com,
	rostedt@goodmis.org, rajvi.jingar@intel.com, tony.luck@intel.com,
	bp@alien8.de, luto@kernel.org, oleg@redhat.com,
	bhelgaas@google.com, tglx@linutronix.de, frank.rowand@sony.com,
	jgross@suse.com, douly.fnst@cn.fujitsu.com,
	thomas.lendacky@amd.com, zhe.he@windriver.com,
	ard.biesheuvel@linaro.org, kexec@lists.infradead.org,
	linux-kernel@vger.kernel.org, robh+dt@kernel.org,
	ebiederm@xmission.com, ccross@android.com, pbonzini@redhat.com,
	akpm@linux-foundation.org, up2wing@gmail.com, dwmw@amazon.co.uk,
	ivan.gorinov@intel.com
Subject: Re: [PATCH] x86: fix -Wmissing-prototypes warning
Date: Thu, 22 Nov 2018 09:48:15 +0100	[thread overview]
Message-ID: <20181122084815.GA84118@gmail.com> (raw)
In-Reply-To: <1542852249-19820-1-git-send-email-wang.yi59@zte.com.cn>


* Yi Wang <wang.yi59@zte.com.cn> wrote:

> We may get -Wmissing-prototypes warnings when building
> kernel with W=1, it's better to fix them as global function
> signature can be changed and caller who use the old unchanged
> prototypes will be hosed.
> 
> This patch fixes most of -Wmissing-prototypes warnings which
> are in the root directory of arch/x86/kernel, not including
> the subdirectories.
> 
> These are the warnings fixed in this patch:
> arch/x86/kernel/signal.c:865:17: warning: no previous prototype for ‘sys32_x32_rt_sigreturn’ [-Wmissing-prototypes]
> arch/x86/kernel/signal_compat.c:164:6: warning: no previous prototype for ‘sigaction_compat_abi’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:625:46: warning: no previous prototype for ‘sync_regs’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:640:24: warning: no previous prototype for ‘fixup_bad_iret’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:929:13: warning: no previous prototype for ‘trap_init’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:270:28: warning: no previous prototype for ‘smp_x86_platform_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:301:16: warning: no previous prototype for ‘smp_kvm_posted_intr_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:314:16: warning: no previous prototype for ‘smp_kvm_posted_intr_wakeup_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:328:16: warning: no previous prototype for ‘smp_kvm_posted_intr_nested_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq_work.c:16:28: warning: no previous prototype for ‘smp_irq_work_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/irqinit.c:79:13: warning: no previous prototype for ‘init_IRQ’ [-Wmissing-prototypes]
> arch/x86/kernel/quirks.c:672:13: warning: no previous prototype for ‘early_platform_quirks’ [-Wmissing-prototypes]
> arch/x86/kernel/tsc.c:1499:15: warning: no previous prototype for ‘calibrate_delay_is_known’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:653:13: warning: no previous prototype for ‘arch_post_acpi_subsys_init’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:717:15: warning: no previous prototype for ‘arch_randomize_brk’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:784:6: warning: no previous prototype for ‘do_arch_prctl_common’ [-Wmissing-prototypes]
> arch/x86/kernel/reboot.c:869:6: warning: no previous prototype for ‘nmi_panic_self_stop’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:176:27: warning: no previous prototype for ‘smp_reboot_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:260:28: warning: no previous prototype for ‘smp_reschedule_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:281:28: warning: no previous prototype for ‘smp_call_function_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:291:28: warning: no previous prototype for ‘smp_call_function_single_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:840:6: warning: no previous prototype for ‘arch_ftrace_update_trampoline’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:934:7: warning: no previous prototype for ‘arch_ftrace_trampoline_func’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:946:6: warning: no previous prototype for ‘arch_ftrace_trampoline_free’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:114:6: warning: no previous prototype for ‘crash_smp_send_stop’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:351:5: warning: no previous prototype for ‘crash_setup_memmap_entries’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:424:5: warning: no previous prototype for ‘crash_load_segments’ [-Wmissing-prototypes]
> arch/x86/kernel/machine_kexec_64.c:372:7: warning: no previous prototype for ‘arch_kexec_kernel_image_load’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:12:16: warning: no previous prototype for ‘__native_queued_spin_unlock’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:18:6: warning: no previous prototype for ‘pv_is_native_spin_unlock’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:24:16: warning: no previous prototype for ‘__native_vcpu_is_preempted’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:30:6: warning: no previous prototype for ‘pv_is_native_vcpu_is_preempted’ [-Wmissing-prototypes]
> arch/x86/kernel/kvm.c:258:1: warning: no previous prototype for ‘do_async_page_fault’ [-Wmissing-prototypes]
> arch/x86/kernel/jailhouse.c:200:6: warning: no previous prototype for ‘jailhouse_paravirt’ [-Wmissing-prototypes]
> arch/x86/kernel/check.c:91:13: warning: no previous prototype for ‘setup_bios_corruption_check’ [-Wmissing-prototypes]
> arch/x86/kernel/check.c:139:6: warning: no previous prototype for ‘check_for_bios_corruption’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:32:13: warning: no previous prototype for ‘early_init_dt_scan_chosen_arch’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:42:13: warning: no previous prototype for ‘add_dtb’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:108:6: warning: no previous prototype for ‘x86_of_pci_init’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:314:13: warning: no previous prototype for ‘x86_dtb_init’ [-Wmissing-prototypes]
> arch/x86/kernel/tracepoint.c:16:5: warning: no previous prototype for ‘trace_pagefault_reg’ [-Wmissing-prototypes]
> arch/x86/kernel/tracepoint.c:22:6: warning: no previous prototype for ‘trace_pagefault_unreg’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:113:22: warning: no previous prototype for ‘__startup_64’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:262:15: warning: no previous prototype for ‘__startup_secondary_64’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:350:12: warning: no previous prototype for ‘early_make_pgtable’ [-Wmissing-prototypes]
> 
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
>  arch/x86/include/asm/crash.h       | 1 +
>  arch/x86/include/asm/efi.h         | 2 --
>  arch/x86/include/asm/irq.h         | 7 +++++++
>  arch/x86/include/asm/irq_work.h    | 1 +
>  arch/x86/include/asm/kvm_para.h    | 1 +
>  arch/x86/include/asm/paravirt.h    | 5 +++++
>  arch/x86/include/asm/reboot.h      | 1 +
>  arch/x86/include/asm/setup.h       | 5 +++++
>  arch/x86/include/asm/sighandling.h | 5 +++++
>  arch/x86/include/asm/smp.h         | 6 ++++++
>  arch/x86/include/asm/traps.h       | 4 ++++
>  arch/x86/include/asm/tsc.h         | 1 +
>  arch/x86/kernel/check.c            | 3 ++-
>  arch/x86/kernel/crash.c            | 1 +
>  arch/x86/kernel/devicetree.c       | 1 +
>  arch/x86/kernel/jailhouse.c        | 1 +
>  arch/x86/kernel/process.c          | 3 +++
>  arch/x86/kernel/quirks.c           | 1 +
>  arch/x86/kernel/tracepoint.c       | 1 +
>  include/linux/efi.h                | 2 ++
>  include/linux/ftrace.h             | 3 +++
>  include/linux/kexec.h              | 1 +
>  include/linux/of_fdt.h             | 1 +
>  include/linux/ptrace.h             | 1 +
>  24 files changed, 55 insertions(+), 3 deletions(-)

Breaks 32-bit compilation:

./arch/x86/include/asm/setup.h: Assembler messages:
./arch/x86/include/asm/setup.h:30: Error: no such instruction: `unsigned long __startup_64(unsigned long physaddr,struct boot_params *bp)'

I'll skip the setup.h bits - let's hope that's the only bug.

Thanks,

	Ingo

_______________________________________________
kexec mailing list
kexec@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/kexec

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Yi Wang <wang.yi59@zte.com.cn>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	ard.biesheuvel@linaro.org, linux-efi@vger.kernel.org,
	pbonzini@redhat.com, rkrcmar@redhat.com, kvm@vger.kernel.org,
	jgross@suse.com, akataria@vmware.com,
	virtualization@lists.linux-foundation.org,
	m.mizuma@jp.fujitsu.com, peterz@infradead.org, prarit@redhat.com,
	douly.fnst@cn.fujitsu.com, dwmw@amazon.co.uk, luto@kernel.org,
	pasha.tatashin@oracle.com, rajvi.jingar@intel.com,
	zhe.he@windriver.com, akpm@linux-foundation.org,
	dyoung@redhat.com, takahiro.akashi@linaro.org,
	ebiederm@xmission.com, bhe@redhat.com, ivan.gorinov@intel.com,
	robh@kernel.org, andy.shevchenko@gmail.com,
	frank.rowand@sony.com, jan.kiszka@siemens.com,
	jailhouse-dev@googlegroups.com, konrad.wilk@oracle.com,
	thomas.lendacky@amd.com, pravin.shedge4linux@gmail.com,
	namit@vmware.com, jroedel@sus
Subject: Re: [PATCH] x86: fix -Wmissing-prototypes warning
Date: Thu, 22 Nov 2018 09:48:15 +0100	[thread overview]
Message-ID: <20181122084815.GA84118@gmail.com> (raw)
In-Reply-To: <1542852249-19820-1-git-send-email-wang.yi59@zte.com.cn>


* Yi Wang <wang.yi59@zte.com.cn> wrote:

> We may get -Wmissing-prototypes warnings when building
> kernel with W=1, it's better to fix them as global function
> signature can be changed and caller who use the old unchanged
> prototypes will be hosed.
> 
> This patch fixes most of -Wmissing-prototypes warnings which
> are in the root directory of arch/x86/kernel, not including
> the subdirectories.
> 
> These are the warnings fixed in this patch:
> arch/x86/kernel/signal.c:865:17: warning: no previous prototype for ‘sys32_x32_rt_sigreturn’ [-Wmissing-prototypes]
> arch/x86/kernel/signal_compat.c:164:6: warning: no previous prototype for ‘sigaction_compat_abi’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:625:46: warning: no previous prototype for ‘sync_regs’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:640:24: warning: no previous prototype for ‘fixup_bad_iret’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:929:13: warning: no previous prototype for ‘trap_init’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:270:28: warning: no previous prototype for ‘smp_x86_platform_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:301:16: warning: no previous prototype for ‘smp_kvm_posted_intr_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:314:16: warning: no previous prototype for ‘smp_kvm_posted_intr_wakeup_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:328:16: warning: no previous prototype for ‘smp_kvm_posted_intr_nested_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq_work.c:16:28: warning: no previous prototype for ‘smp_irq_work_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/irqinit.c:79:13: warning: no previous prototype for ‘init_IRQ’ [-Wmissing-prototypes]
> arch/x86/kernel/quirks.c:672:13: warning: no previous prototype for ‘early_platform_quirks’ [-Wmissing-prototypes]
> arch/x86/kernel/tsc.c:1499:15: warning: no previous prototype for ‘calibrate_delay_is_known’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:653:13: warning: no previous prototype for ‘arch_post_acpi_subsys_init’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:717:15: warning: no previous prototype for ‘arch_randomize_brk’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:784:6: warning: no previous prototype for ‘do_arch_prctl_common’ [-Wmissing-prototypes]
> arch/x86/kernel/reboot.c:869:6: warning: no previous prototype for ‘nmi_panic_self_stop’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:176:27: warning: no previous prototype for ‘smp_reboot_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:260:28: warning: no previous prototype for ‘smp_reschedule_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:281:28: warning: no previous prototype for ‘smp_call_function_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:291:28: warning: no previous prototype for ‘smp_call_function_single_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:840:6: warning: no previous prototype for ‘arch_ftrace_update_trampoline’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:934:7: warning: no previous prototype for ‘arch_ftrace_trampoline_func’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:946:6: warning: no previous prototype for ‘arch_ftrace_trampoline_free’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:114:6: warning: no previous prototype for ‘crash_smp_send_stop’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:351:5: warning: no previous prototype for ‘crash_setup_memmap_entries’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:424:5: warning: no previous prototype for ‘crash_load_segments’ [-Wmissing-prototypes]
> arch/x86/kernel/machine_kexec_64.c:372:7: warning: no previous prototype for ‘arch_kexec_kernel_image_load’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:12:16: warning: no previous prototype for ‘__native_queued_spin_unlock’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:18:6: warning: no previous prototype for ‘pv_is_native_spin_unlock’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:24:16: warning: no previous prototype for ‘__native_vcpu_is_preempted’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:30:6: warning: no previous prototype for ‘pv_is_native_vcpu_is_preempted’ [-Wmissing-prototypes]
> arch/x86/kernel/kvm.c:258:1: warning: no previous prototype for ‘do_async_page_fault’ [-Wmissing-prototypes]
> arch/x86/kernel/jailhouse.c:200:6: warning: no previous prototype for ‘jailhouse_paravirt’ [-Wmissing-prototypes]
> arch/x86/kernel/check.c:91:13: warning: no previous prototype for ‘setup_bios_corruption_check’ [-Wmissing-prototypes]
> arch/x86/kernel/check.c:139:6: warning: no previous prototype for ‘check_for_bios_corruption’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:32:13: warning: no previous prototype for ‘early_init_dt_scan_chosen_arch’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:42:13: warning: no previous prototype for ‘add_dtb’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:108:6: warning: no previous prototype for ‘x86_of_pci_init’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:314:13: warning: no previous prototype for ‘x86_dtb_init’ [-Wmissing-prototypes]
> arch/x86/kernel/tracepoint.c:16:5: warning: no previous prototype for ‘trace_pagefault_reg’ [-Wmissing-prototypes]
> arch/x86/kernel/tracepoint.c:22:6: warning: no previous prototype for ‘trace_pagefault_unreg’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:113:22: warning: no previous prototype for ‘__startup_64’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:262:15: warning: no previous prototype for ‘__startup_secondary_64’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:350:12: warning: no previous prototype for ‘early_make_pgtable’ [-Wmissing-prototypes]
> 
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
>  arch/x86/include/asm/crash.h       | 1 +
>  arch/x86/include/asm/efi.h         | 2 --
>  arch/x86/include/asm/irq.h         | 7 +++++++
>  arch/x86/include/asm/irq_work.h    | 1 +
>  arch/x86/include/asm/kvm_para.h    | 1 +
>  arch/x86/include/asm/paravirt.h    | 5 +++++
>  arch/x86/include/asm/reboot.h      | 1 +
>  arch/x86/include/asm/setup.h       | 5 +++++
>  arch/x86/include/asm/sighandling.h | 5 +++++
>  arch/x86/include/asm/smp.h         | 6 ++++++
>  arch/x86/include/asm/traps.h       | 4 ++++
>  arch/x86/include/asm/tsc.h         | 1 +
>  arch/x86/kernel/check.c            | 3 ++-
>  arch/x86/kernel/crash.c            | 1 +
>  arch/x86/kernel/devicetree.c       | 1 +
>  arch/x86/kernel/jailhouse.c        | 1 +
>  arch/x86/kernel/process.c          | 3 +++
>  arch/x86/kernel/quirks.c           | 1 +
>  arch/x86/kernel/tracepoint.c       | 1 +
>  include/linux/efi.h                | 2 ++
>  include/linux/ftrace.h             | 3 +++
>  include/linux/kexec.h              | 1 +
>  include/linux/of_fdt.h             | 1 +
>  include/linux/ptrace.h             | 1 +
>  24 files changed, 55 insertions(+), 3 deletions(-)

Breaks 32-bit compilation:

./arch/x86/include/asm/setup.h: Assembler messages:
./arch/x86/include/asm/setup.h:30: Error: no such instruction: `unsigned long __startup_64(unsigned long physaddr,struct boot_params *bp)'

I'll skip the setup.h bits - let's hope that's the only bug.

Thanks,

	Ingo

-- 
You received this message because you are subscribed to the Google Groups "Jailhouse" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jailhouse-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

WARNING: multiple messages have this Message-ID (diff)
From: Ingo Molnar <mingo@kernel.org>
To: Yi Wang <wang.yi59@zte.com.cn>
Cc: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	hpa@zytor.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	ard.biesheuvel@linaro.org, linux-efi@vger.kernel.org,
	pbonzini@redhat.com, rkrcmar@redhat.com, kvm@vger.kernel.org,
	jgross@suse.com, akataria@vmware.com,
	virtualization@lists.linux-foundation.org,
	m.mizuma@jp.fujitsu.com, peterz@infradead.org, prarit@redhat.com,
	douly.fnst@cn.fujitsu.com, dwmw@amazon.co.uk, luto@kernel.org,
	pasha.tatashin@oracle.com, rajvi.jingar@intel.com,
	zhe.he@windriver.com, akpm@linux-foundation.org,
	dyoung@redhat.com, takahiro.akashi@linaro.org,
	ebiederm@xmission.com, bhe@redhat.com, ivan.gorinov@intel.com,
	robh@kernel.org, andy.shevchenko@gmail.com,
	frank.rowand@sony.com, jan.kiszka@siemens.com,
	jailhouse-dev@googlegroups.com, konrad.wilk@oracle.com,
	thomas.lendacky@amd.com, pravin.shedge4linux@gmail.com,
	namit@vmware.com, jroedel@suse.de, bhelgaas@google.com,
	linux-pci@vger.kernel.org, keescook@chromium.org,
	anton@enomsg.org, ccross@android.com, tony.luck@intel.com,
	rostedt@goodmis.org, kexec@lists.infradead.org,
	robh+dt@kernel.org, frowand.list@gmail.com,
	devicetree@vger.kernel.org, oleg@redhat.com,
	zhong.weidong@zte.com.cn, up2wing@gmail.com
Subject: Re: [PATCH] x86: fix -Wmissing-prototypes warning
Date: Thu, 22 Nov 2018 09:48:15 +0100	[thread overview]
Message-ID: <20181122084815.GA84118@gmail.com> (raw)
In-Reply-To: <1542852249-19820-1-git-send-email-wang.yi59@zte.com.cn>


* Yi Wang <wang.yi59@zte.com.cn> wrote:

> We may get -Wmissing-prototypes warnings when building
> kernel with W=1, it's better to fix them as global function
> signature can be changed and caller who use the old unchanged
> prototypes will be hosed.
> 
> This patch fixes most of -Wmissing-prototypes warnings which
> are in the root directory of arch/x86/kernel, not including
> the subdirectories.
> 
> These are the warnings fixed in this patch:
> arch/x86/kernel/signal.c:865:17: warning: no previous prototype for ‘sys32_x32_rt_sigreturn’ [-Wmissing-prototypes]
> arch/x86/kernel/signal_compat.c:164:6: warning: no previous prototype for ‘sigaction_compat_abi’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:625:46: warning: no previous prototype for ‘sync_regs’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:640:24: warning: no previous prototype for ‘fixup_bad_iret’ [-Wmissing-prototypes]
> arch/x86/kernel/traps.c:929:13: warning: no previous prototype for ‘trap_init’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:270:28: warning: no previous prototype for ‘smp_x86_platform_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:301:16: warning: no previous prototype for ‘smp_kvm_posted_intr_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:314:16: warning: no previous prototype for ‘smp_kvm_posted_intr_wakeup_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq.c:328:16: warning: no previous prototype for ‘smp_kvm_posted_intr_nested_ipi’ [-Wmissing-prototypes]
> arch/x86/kernel/irq_work.c:16:28: warning: no previous prototype for ‘smp_irq_work_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/irqinit.c:79:13: warning: no previous prototype for ‘init_IRQ’ [-Wmissing-prototypes]
> arch/x86/kernel/quirks.c:672:13: warning: no previous prototype for ‘early_platform_quirks’ [-Wmissing-prototypes]
> arch/x86/kernel/tsc.c:1499:15: warning: no previous prototype for ‘calibrate_delay_is_known’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:653:13: warning: no previous prototype for ‘arch_post_acpi_subsys_init’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:717:15: warning: no previous prototype for ‘arch_randomize_brk’ [-Wmissing-prototypes]
> arch/x86/kernel/process.c:784:6: warning: no previous prototype for ‘do_arch_prctl_common’ [-Wmissing-prototypes]
> arch/x86/kernel/reboot.c:869:6: warning: no previous prototype for ‘nmi_panic_self_stop’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:176:27: warning: no previous prototype for ‘smp_reboot_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:260:28: warning: no previous prototype for ‘smp_reschedule_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:281:28: warning: no previous prototype for ‘smp_call_function_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/smp.c:291:28: warning: no previous prototype for ‘smp_call_function_single_interrupt’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:840:6: warning: no previous prototype for ‘arch_ftrace_update_trampoline’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:934:7: warning: no previous prototype for ‘arch_ftrace_trampoline_func’ [-Wmissing-prototypes]
> arch/x86/kernel/ftrace.c:946:6: warning: no previous prototype for ‘arch_ftrace_trampoline_free’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:114:6: warning: no previous prototype for ‘crash_smp_send_stop’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:351:5: warning: no previous prototype for ‘crash_setup_memmap_entries’ [-Wmissing-prototypes]
> arch/x86/kernel/crash.c:424:5: warning: no previous prototype for ‘crash_load_segments’ [-Wmissing-prototypes]
> arch/x86/kernel/machine_kexec_64.c:372:7: warning: no previous prototype for ‘arch_kexec_kernel_image_load’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:12:16: warning: no previous prototype for ‘__native_queued_spin_unlock’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:18:6: warning: no previous prototype for ‘pv_is_native_spin_unlock’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:24:16: warning: no previous prototype for ‘__native_vcpu_is_preempted’ [-Wmissing-prototypes]
> arch/x86/kernel/paravirt-spinlocks.c:30:6: warning: no previous prototype for ‘pv_is_native_vcpu_is_preempted’ [-Wmissing-prototypes]
> arch/x86/kernel/kvm.c:258:1: warning: no previous prototype for ‘do_async_page_fault’ [-Wmissing-prototypes]
> arch/x86/kernel/jailhouse.c:200:6: warning: no previous prototype for ‘jailhouse_paravirt’ [-Wmissing-prototypes]
> arch/x86/kernel/check.c:91:13: warning: no previous prototype for ‘setup_bios_corruption_check’ [-Wmissing-prototypes]
> arch/x86/kernel/check.c:139:6: warning: no previous prototype for ‘check_for_bios_corruption’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:32:13: warning: no previous prototype for ‘early_init_dt_scan_chosen_arch’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:42:13: warning: no previous prototype for ‘add_dtb’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:108:6: warning: no previous prototype for ‘x86_of_pci_init’ [-Wmissing-prototypes]
> arch/x86/kernel/devicetree.c:314:13: warning: no previous prototype for ‘x86_dtb_init’ [-Wmissing-prototypes]
> arch/x86/kernel/tracepoint.c:16:5: warning: no previous prototype for ‘trace_pagefault_reg’ [-Wmissing-prototypes]
> arch/x86/kernel/tracepoint.c:22:6: warning: no previous prototype for ‘trace_pagefault_unreg’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:113:22: warning: no previous prototype for ‘__startup_64’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:262:15: warning: no previous prototype for ‘__startup_secondary_64’ [-Wmissing-prototypes]
> arch/x86/kernel/head64.c:350:12: warning: no previous prototype for ‘early_make_pgtable’ [-Wmissing-prototypes]
> 
> Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
> ---
>  arch/x86/include/asm/crash.h       | 1 +
>  arch/x86/include/asm/efi.h         | 2 --
>  arch/x86/include/asm/irq.h         | 7 +++++++
>  arch/x86/include/asm/irq_work.h    | 1 +
>  arch/x86/include/asm/kvm_para.h    | 1 +
>  arch/x86/include/asm/paravirt.h    | 5 +++++
>  arch/x86/include/asm/reboot.h      | 1 +
>  arch/x86/include/asm/setup.h       | 5 +++++
>  arch/x86/include/asm/sighandling.h | 5 +++++
>  arch/x86/include/asm/smp.h         | 6 ++++++
>  arch/x86/include/asm/traps.h       | 4 ++++
>  arch/x86/include/asm/tsc.h         | 1 +
>  arch/x86/kernel/check.c            | 3 ++-
>  arch/x86/kernel/crash.c            | 1 +
>  arch/x86/kernel/devicetree.c       | 1 +
>  arch/x86/kernel/jailhouse.c        | 1 +
>  arch/x86/kernel/process.c          | 3 +++
>  arch/x86/kernel/quirks.c           | 1 +
>  arch/x86/kernel/tracepoint.c       | 1 +
>  include/linux/efi.h                | 2 ++
>  include/linux/ftrace.h             | 3 +++
>  include/linux/kexec.h              | 1 +
>  include/linux/of_fdt.h             | 1 +
>  include/linux/ptrace.h             | 1 +
>  24 files changed, 55 insertions(+), 3 deletions(-)

Breaks 32-bit compilation:

./arch/x86/include/asm/setup.h: Assembler messages:
./arch/x86/include/asm/setup.h:30: Error: no such instruction: `unsigned long __startup_64(unsigned long physaddr,struct boot_params *bp)'

I'll skip the setup.h bits - let's hope that's the only bug.

Thanks,

	Ingo

  parent reply	other threads:[~2018-11-22  8:48 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-22  2:04 [PATCH] x86: fix -Wmissing-prototypes warning Yi Wang
2018-11-22  2:04 ` Yi Wang
2018-11-22  2:04 ` Yi Wang
2018-11-22  8:48 ` Ingo Molnar
2018-11-22  8:48 ` Ingo Molnar [this message]
2018-11-22  8:48   ` Ingo Molnar
2018-11-22  8:48   ` Ingo Molnar
2018-11-22 11:04   ` wang.yi59
2018-11-22 11:04     ` wang.yi59
2018-11-22 11:14     ` Ingo Molnar
2018-11-22 11:14       ` Ingo Molnar
2018-11-22 11:14       ` Ingo Molnar
2018-11-22 11:14     ` Ingo Molnar
2018-11-22 10:15 ` [tip:x86/cleanups] x86/headers: Fix " tip-bot for Yi Wang
2018-11-23  7:03   ` Ingo Molnar
2018-11-23  7:04 ` tip-bot for Yi Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181122084815.GA84118@gmail.com \
    --to=mingo@kernel.org \
    --cc=akataria@vmware.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy.shevchenko@gmail.com \
    --cc=anton@enomsg.org \
    --cc=ard.biesheuvel@linaro.org \
    --cc=bhe@redhat.com \
    --cc=bhelgaas@google.com \
    --cc=bp@alien8.de \
    --cc=ccross@android.com \
    --cc=devicetree@vger.kernel.org \
    --cc=douly.fnst@cn.fujitsu.com \
    --cc=dwmw@amazon.co.uk \
    --cc=dyoung@redhat.com \
    --cc=ebiederm@xmission.com \
    --cc=frank.rowand@sony.com \
    --cc=frowand.list@gmail.com \
    --cc=hpa@zytor.com \
    --cc=ivan.gorinov@intel.com \
    --cc=jailhouse-dev@googlegroups.com \
    --cc=jan.kiszka@siemens.com \
    --cc=jgross@suse.com \
    --cc=jroedel@suse.de \
    --cc=keescook@chromium.org \
    --cc=kexec@lists.infradead.org \
    --cc=konrad.wilk@oracle.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=luto@kernel.org \
    --cc=m.mizuma@jp.fujitsu.com \
    --cc=mingo@redhat.com \
    --cc=namit@vmware.com \
    --cc=oleg@redhat.com \
    --cc=pasha.tatashin@oracle.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=prarit@redhat.com \
    --cc=pravin.shedge4linux@gmail.com \
    --cc=rajvi.jingar@intel.com \
    --cc=rkrcmar@redhat.com \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=rostedt@goodmis.org \
    --cc=takahiro.akashi@linaro.org \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=tony.luck@intel.com \
    --cc=up2wing@gmail.com \
    --cc=virtualization@lists.linux-foundation.org \
    --cc=wang.yi59@zte.com.cn \
    --cc=x86@kernel.org \
    --cc=zhe.he@windriver.com \
    --cc=zhong.weidong@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.