Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARC: -Wmissing-prototype warning fixes

Anrd reported [1] new compiler warnings due to -Wmissing-protype.
These are for non static functions mostly used in asm code hence not
exported already. Fix this by adding the prototypes.

[1] https://lore.kernel.org/lkml/20230810141947.1236730-1-arnd@kernel.org

Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Vineet Gupta <vgupta@kernel.org>

+48 -10
+21
arch/arc/include/asm/entry.h
··· 13 13 #include <asm/processor.h> /* For VMALLOC_START */ 14 14 #include <asm/mmu.h> 15 15 16 + #ifdef __ASSEMBLY__ 17 + 16 18 #ifdef CONFIG_ISA_ARCOMPACT 17 19 #include <asm/entry-compact.h> /* ISA specific bits */ 18 20 #else ··· 296 294 .endm 297 295 298 296 #endif /* CONFIG_ARC_CURR_IN_REG */ 297 + 298 + #else /* !__ASSEMBLY__ */ 299 + 300 + extern void do_signal(struct pt_regs *); 301 + extern void do_notify_resume(struct pt_regs *); 302 + extern int do_privilege_fault(unsigned long, struct pt_regs *); 303 + extern int do_extension_fault(unsigned long, struct pt_regs *); 304 + extern int insterror_is_error(unsigned long, struct pt_regs *); 305 + extern int do_memory_error(unsigned long, struct pt_regs *); 306 + extern int trap_is_brkpt(unsigned long, struct pt_regs *); 307 + extern int do_misaligned_error(unsigned long, struct pt_regs *); 308 + extern int do_trap5_error(unsigned long, struct pt_regs *); 309 + extern int do_misaligned_access(unsigned long, struct pt_regs *, struct callee_regs *); 310 + extern void do_machine_check_fault(unsigned long, struct pt_regs *); 311 + extern void do_non_swi_trap(unsigned long, struct pt_regs *); 312 + extern void do_insterror_or_kprobe(unsigned long, struct pt_regs *); 313 + extern void do_page_fault(unsigned long, struct pt_regs *); 314 + 315 + #endif 299 316 300 317 #endif /* __ASM_ARC_ENTRY_H */
+1
arch/arc/include/asm/irq.h
··· 25 25 #include <asm-generic/irq.h> 26 26 27 27 extern void arc_init_IRQ(void); 28 + extern void arch_do_IRQ(unsigned int, struct pt_regs *); 28 29 29 30 #endif
+2
arch/arc/include/asm/mmu.h
··· 14 14 unsigned long asid[NR_CPUS]; /* 8 bit MMU PID + Generation cycle */ 15 15 } mm_context_t; 16 16 17 + extern void do_tlb_overlap_fault(unsigned long, unsigned long, struct pt_regs *); 18 + 17 19 #endif 18 20 19 21 #include <asm/mmu-arcv2.h>
+3
arch/arc/include/asm/ptrace.h
··· 181 181 return *(unsigned long *)((unsigned long)regs + offset); 182 182 } 183 183 184 + extern int syscall_trace_entry(struct pt_regs *); 185 + extern void syscall_trace_exit(struct pt_regs *); 186 + 184 187 #endif /* !__ASSEMBLY__ */ 185 188 186 189 #endif /* __ASM_PTRACE_H */
+2
arch/arc/include/asm/setup.h
··· 42 42 extern char *arc_cache_mumbojumbo(int cpu_id, char *buf, int len); 43 43 extern void read_decode_cache_bcr(void); 44 44 45 + extern void __init handle_uboot_args(void); 46 + 45 47 #endif /* __ASMARC_SETUP_H */
+2
arch/arc/include/asm/smp.h
··· 29 29 extern void __init smp_init_cpus(void); 30 30 extern void first_lines_of_secondary(void); 31 31 extern const char *arc_platform_smp_cpuinfo(void); 32 + extern void arc_platform_smp_wait_to_boot(int); 33 + extern void start_kernel_secondary(void); 32 34 33 35 /* 34 36 * API expected BY platform smp code (FROM arch smp code)
+1 -1
arch/arc/kernel/ctx_sw.c
··· 12 12 */ 13 13 14 14 #include <asm/asm-offsets.h> 15 - #include <linux/sched.h> 15 + #include <asm/switch_to.h> 16 16 #include <linux/sched/debug.h> 17 17 18 18 #define KSP_WORD_OFF ((TASK_THREAD + THREAD_KSP) / 4)
+1
arch/arc/kernel/devtree.c
··· 12 12 #include <linux/of.h> 13 13 #include <linux/of_fdt.h> 14 14 #include <asm/mach_desc.h> 15 + #include <asm/serial.h> 15 16 16 17 #ifdef CONFIG_SERIAL_EARLYCON 17 18
+1 -1
arch/arc/kernel/intc-arcv2.c
··· 108 108 write_aux_reg(AUX_IRQ_ENABLE, 1); 109 109 } 110 110 111 - void arcv2_irq_enable(struct irq_data *data) 111 + static void arcv2_irq_enable(struct irq_data *data) 112 112 { 113 113 /* set default priority */ 114 114 write_aux_reg(AUX_IRQ_SELECT, data->hwirq);
+1
arch/arc/kernel/signal.c
··· 53 53 #include <linux/sched/task_stack.h> 54 54 55 55 #include <asm/ucontext.h> 56 + #include <asm/entry.h> 56 57 57 58 struct rt_sigframe { 58 59 struct siginfo info;
+4 -3
arch/arc/kernel/smp.c
··· 23 23 #include <linux/export.h> 24 24 #include <linux/of_fdt.h> 25 25 26 - #include <asm/processor.h> 27 - #include <asm/setup.h> 28 26 #include <asm/mach_desc.h> 27 + #include <asm/setup.h> 28 + #include <asm/smp.h> 29 + #include <asm/processor.h> 29 30 30 31 #ifndef CONFIG_ARC_HAS_LLSC 31 32 arch_spinlock_t smp_atomic_ops_lock = __ARCH_SPIN_LOCK_UNLOCKED; ··· 352 351 * arch-common ISR to handle for inter-processor interrupts 353 352 * Has hooks for platform specific IPI 354 353 */ 355 - irqreturn_t do_IPI(int irq, void *dev_id) 354 + static irqreturn_t do_IPI(int irq, void *dev_id) 356 355 { 357 356 unsigned long pending; 358 357 unsigned long __maybe_unused copy;
+1
arch/arc/kernel/stacktrace.c
··· 29 29 30 30 #include <asm/arcregs.h> 31 31 #include <asm/unwind.h> 32 + #include <asm/stacktrace.h> 32 33 #include <asm/switch_to.h> 33 34 34 35 /*-------------------------------------------------------------------------
+1
arch/arc/kernel/traps.c
··· 16 16 #include <linux/ptrace.h> 17 17 #include <linux/kprobes.h> 18 18 #include <linux/kgdb.h> 19 + #include <asm/entry.h> 19 20 #include <asm/setup.h> 20 21 #include <asm/unaligned.h> 21 22 #include <asm/kprobes.h>
+4 -4
arch/arc/mm/cache.c
··· 581 581 582 582 #endif /* CONFIG_ARC_HAS_ICACHE */ 583 583 584 - noinline void slc_op_rgn(phys_addr_t paddr, unsigned long sz, const int op) 584 + static noinline void slc_op_rgn(phys_addr_t paddr, unsigned long sz, const int op) 585 585 { 586 586 #ifdef CONFIG_ISA_ARCV2 587 587 /* ··· 644 644 #endif 645 645 } 646 646 647 - noinline void slc_op_line(phys_addr_t paddr, unsigned long sz, const int op) 647 + static __maybe_unused noinline void slc_op_line(phys_addr_t paddr, unsigned long sz, const int op) 648 648 { 649 649 #ifdef CONFIG_ISA_ARCV2 650 650 /* ··· 1069 1069 * 3. All Caches need to be disabled when setting up IOC to elide any in-flight 1070 1070 * Coherency transactions 1071 1071 */ 1072 - noinline void __init arc_ioc_setup(void) 1072 + static noinline void __init arc_ioc_setup(void) 1073 1073 { 1074 1074 unsigned int ioc_base, mem_sz; 1075 1075 ··· 1131 1131 * one core suffices for all 1132 1132 * - IOC setup / dma callbacks only need to be done once 1133 1133 */ 1134 - void __init arc_cache_init_master(void) 1134 + static noinline void __init arc_cache_init_master(void) 1135 1135 { 1136 1136 unsigned int __maybe_unused cpu = smp_processor_id(); 1137 1137
+1
arch/arc/mm/fault.c
··· 13 13 #include <linux/kdebug.h> 14 14 #include <linux/perf_event.h> 15 15 #include <linux/mm_types.h> 16 + #include <asm/entry.h> 16 17 #include <asm/mmu.h> 17 18 18 19 /*
+1
arch/arc/mm/init.c
··· 15 15 #include <linux/highmem.h> 16 16 #include <asm/page.h> 17 17 #include <asm/sections.h> 18 + #include <asm/setup.h> 18 19 #include <asm/arcregs.h> 19 20 20 21 pgd_t swapper_pg_dir[PTRS_PER_PGD] __aligned(PAGE_SIZE);
+1 -1
arch/arc/mm/tlb.c
··· 389 389 /* 390 390 * Routine to create a TLB entry 391 391 */ 392 - void create_tlb(struct vm_area_struct *vma, unsigned long vaddr, pte_t *ptep) 392 + static void create_tlb(struct vm_area_struct *vma, unsigned long vaddr, pte_t *ptep) 393 393 { 394 394 unsigned long flags; 395 395 unsigned int asid_or_sasid, rwx;