powerpc: address missing-prototypes warnings
PATCH 1/1 powerpc: address missing-prototypes warnings
From: Arnd Bergmann <[email protected]>
There are a few warnings in powerpc64 defconfig builds after -Wmissing-prototypes gets promoted from W=1 to the default warning set:
arch/powerpc/mm/book3s64/pgtable.c:422:6: error: no previous prototype for 'arch_report_meminfo' [-Werror=missing-prototypes] arch/powerpc/mm/init_64.c:311:12: error: no previous prototype for '__vmemmap_free' [-Werror=missing-prototypes] arch/powerpc/platforms/cell/ras.c:275:5: error: no previous prototype for 'cbe_sysreset_hack' [-Werror=missing-prototypes] arch/powerpc/platforms/cell/spu_manage.c:29:21: error: no previous prototype for 'spu_devnode' [-Werror=missing-prototypes] arch/powerpc/platforms/pasemi/time.c:12:17: error: no previous prototype for 'pas_get_boot_time' [-Werror=missing-prototypes] arch/powerpc/platforms/powermac/feature.c:1532:13: error: no previous prototype for 'g5_phy_disable_cpu1' [-Werror=missing-prototypes] arch/powerpc/platforms/86xx/pic.c:28:13: error: no previous prototype for 'mpc86xx_init_irq' [-Werror=missing-prototypes] drivers/pci/pci-sysfs.c:936:13: error: no previous prototype for 'pci_adjust_legacy_attr' [-Werror=missing-prototypes]
Address these by including the right header files or marking the functions static. The audit.c one is a bit tricky since compat_audit.h cannot include regular kernel headers tht have conflicting types on 32-bit powerpc.
--- arch/powerpc/include/asm/pci.h | 3 ++- arch/powerpc/kernel/audit.c | 3 ++- arch/powerpc/kernel/audit_32.h | 7 +++++++ arch/powerpc/kernel/compat_audit.c | 2 ++ arch/powerpc/mm/book3s64/pgtable.c | 1 + arch/powerpc/mm/init_64.c | 2 +- arch/powerpc/platforms/86xx/pic.c | 2 ++ arch/powerpc/platforms/cell/ras.c | 2 +- arch/powerpc/platforms/cell/spu_manage.c | 1 + arch/powerpc/platforms/pasemi/pasemi.h | 1 + arch/powerpc/platforms/pasemi/time.c | 2 ++ arch/powerpc/platforms/powermac/feature.c | 2 ++ 12 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 arch/powerpc/kernel/audit_32.h
arch/powerpc/include/asm/pci.h +2 -1
@@ -82,7 +82,8 @@ extern int pci_legacy_write(struct pci_bus *bus, loff_t port, u32 val,extern int pci_mmap_legacy_page_range (struct pci_bus *bus,struct vm_area_struct *vma,enum pci_mmap_state mmap_state); - +extern void pci_adjust_legacy_attr (struct pci_bus *bus, +enum pci_mmap_state mmap_type);#define HAVE_PCI_LEGACY 1extern void pcibios_claim_one_bus (struct pci_bus *b);
arch/powerpc/kernel/audit.c +2 -1
@@ -4,6 +4,8 @@#include <linux/audit.h> #include <asm/unistd.h> +#include "audit_32.h" +static unsigned dir_class[] = { #include <asm-generic/audit_dir_write.h> ~0U
@@ -41,7 +43,6 @@ int audit_classify_arch(int arch)int audit_classify_syscall (int abi,unsigned syscall) {#ifdef CONFIG_PPC64 -extern int ppc32_classify_syscall (unsigned );if (abi ==AUDIT_ARCH_PPC )return ppc32_classify_syscall (syscall);#endif
arch/powerpc/kernel/audit_32.h new file +7 -0
@@ -0,0 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef __AUDIT_32_H__ +#define __AUDIT_32_H__ + +extern int ppc32_classify_syscall (unsigned ); + +#endif
arch/powerpc/kernel/compat_audit.c +2 -0
@@ -3,6 +3,8 @@#include <linux/audit_arch.h> #include <asm/unistd.h> +#include "audit_32.h" +unsigned ppc32_dir_class[] = { #include <asm-generic/audit_dir_write.h> ~0U
arch/powerpc/mm/book3s64/pgtable.c +1 -0
@@ -9,6 +9,7 @@#include <linux/memremap.h> #include <linux/pkeys.h> #include <linux/debugfs.h> +#include <linux/proc_fs.h> #include <misc/cxl-base.h> #include <asm/pgalloc.h>
arch/powerpc/mm/init_64.c +1 -1
@@ -315,7 +315,7 @@ static unsigned long vmemmap_list_free(unsigned long start)return vmem_back->phys; } -void __ref __vmemmap_free (unsigned long start,unsigned long end, +static void __ref __vmemmap_free (unsigned long start,unsigned long end,struct vmem_altmap *altmap) {unsigned long page_size =1 << mmu_psize_defs[mmu_vmemmap_psize].shift;
arch/powerpc/platforms/86xx/pic.c +2 -0
@@ -12,6 +12,8 @@#include <asm/mpic.h> #include <asm/i8259.h> +#include "mpc86xx.h" +#ifdef CONFIG_PPC_I8259 static void mpc86xx_8259_cascade (struct irq_desc *desc) {
arch/powerpc/platforms/cell/ras.c +1 -1
@@ -22,7 +22,7 @@#include <asm/cell-regs.h> #include "ras.h" - +#include "pervasive.h" static void dump_fir (int cpu) {
arch/powerpc/platforms/cell/spu_manage.c +1 -0
@@ -25,6 +25,7 @@#include "spufs/spufs.h" #include "interrupt.h" +#include "spu_priv1_mmio.h" struct device_node *spu_devnode (struct spu *spu) {
arch/powerpc/platforms/pasemi/pasemi.h +1 -0
@@ -4,6 +4,7 @@extern time64_t pas_get_boot_time (void );extern void pas_pci_init (void ); +struct pci_dev ;extern void pas_pci_irq_fixup (struct pci_dev *dev);extern void pas_pci_dma_dev_setup (struct pci_dev *dev);
arch/powerpc/platforms/pasemi/time.c +2 -0
@@ -9,6 +9,8 @@#include <asm/time.h> +#include "pasemi.h" +time64_t __init pas_get_boot_time (void ) {/* Let's just return a fake date right now */
arch/powerpc/platforms/powermac/feature.c +2 -0
@@ -37,6 +37,8 @@#include <asm/pci-bridge.h> #include <asm/pmac_low_i2c.h> +#include "pmac.h" +#undef DEBUG_FEATURE#ifdef DEBUG_FEATURE
Signature · 1 line
2.39.2
Michael Ellerman
AppliedQuoted 12 lines · Arnd Bergmann
There are a few warnings in powerpc64 defconfig builds after -Wmissing-prototypes gets promoted from W=1 to the default warning set:
arch/powerpc/mm/book3s64/pgtable.c:422:6: error: no previous prototype for 'arch_report_meminfo' [-Werror=missing-prototypes]arch/powerpc/mm/init_64.c:311:12: error: no previous prototype for '__vmemmap_free' [-Werror=missing-prototypes]arch/powerpc/platforms/cell/ras.c:275:5: error: no previous prototype for 'cbe_sysreset_hack' [-Werror=missing-prototypes]arch/powerpc/platforms/cell/spu_manage.c:29:21: error: no previous prototype for 'spu_devnode' [-Werror=missing-prototypes]arch/powerpc/platforms/pasemi/time.c:12:17: error: no previous prototype for 'pas_get_boot_time' [-Werror=missing-prototypes]arch/powerpc/platforms/powermac/feature.c:1532:13: error: no previous prototype for 'g5_phy_disable_cpu1' [-Werror=missing-prototypes]arch/powerpc/platforms/86xx/pic.c:28:13: error: no previous prototype for 'mpc86xx_init_irq' [-Werror=missing-prototypes]drivers/pci/pci-sysfs.c:936:13: error: no previous prototype for 'pci_adjust_legacy_attr' [-Werror=missing-prototypes]
Quoted 1 line
[...]
Applied to powerpc/next.
[1/1] powerpc: address missing-prototypes warnings
https://git.kernel.org/powerpc/c/54f30b83fe627453082f15d83d7820b28b2d24bb
cheers