• Bibo Mao's avatar
    LoongArch: Fix some build warnings with W=1 · c718a0ba
    Bibo Mao authored
    There are some building warnings when building LoongArch kernel with W=1
    as following, this patch fixes them.
    
    arch/loongarch/kernel/acpi.c:284:13: warning: no previous prototype for ‘acpi_numa_arch_fixup’ [-Wmissing-prototypes]
      284 | void __init acpi_numa_arch_fixup(void) {}
          |             ^~~~~~~~~~~~~~~~~~~~
    arch/loongarch/kernel/time.c:32:13: warning: no previous prototype for ‘constant_timer_interrupt’ [-Wmissing-prototypes]
       32 | irqreturn_t constant_timer_interrupt(int irq, void *data)
          |             ^~~~~~~~~~~~~~~~~~~~~~~~
    arch/loongarch/kernel/traps.c:496:25: warning: no previous prototype for 'do_fpe' [-Wmissing-prototypes]
      496 | asmlinkage void noinstr do_fpe(struct pt_regs *regs
          |                         ^~~~~~
    arch/loongarch/kernel/traps.c:813:22: warning: variable ‘opcode’ set but not used [-Wunused-but-set-variable]
      813 |         unsigned int opcode;
          |                      ^~~~~~
    arch/loongarch/kernel/signal.c:895:14: warning: no previous prototype for ‘get_sigframe’ [-Wmissing-prototypes]
      895 | void __user *get_sigframe(struct ksignal *ksig, struct pt_regs *regs,
          |              ^~~~~~~~~~~~
    arch/loongarch/kernel/syscall.c:21:40: warning: initialized field overwritten [-Woverride-init]
       21 | #define __SYSCALL(nr, call)     [nr] = (call),
          |                                        ^
    arch/loongarch/kernel/syscall.c:40:14: warning: no previous prototype for ‘do_syscall’ [-Wmissing-prototypes]
       40 | void noinstr do_syscall(struct pt_regs *regs)
          |              ^~~~~~~~~~
    arch/loongarch/kernel/smp.c:502:17: warning: no previous prototype for ‘start_secondary’ [-Wmissing-prototypes]
      502 | asmlinkage void start_secondary(void)
          |                 ^~~~~~~~~~~~~~~
    arch/loongarch/kernel/process.c:309:15: warning: no previous prototype for ‘arch_align_stack’ [-Wmissing-prototypes]
      309 | unsigned long arch_align_stack(unsigned long sp)
          |               ^~~~~~~~~~~~~~~~
    arch/loongarch/kernel/topology.c:13:5: warning: no previous prototype for ‘arch_register_cpu’ [-Wmissing-prototypes]
       13 | int arch_register_cpu(int cpu)
          |     ^~~~~~~~~~~~~~~~~
    arch/loongarch/kernel/topology.c:27:6: warning: no previous prototype for ‘arch_unregister_cpu’ [-Wmissing-prototypes]
       27 | void arch_unregister_cpu(int cpu)
          |      ^~~~~~~~~~~~~~~~~~~
    arch/loongarch/kernel/module-sections.c:103:5: warning: no previous prototype for ‘module_frob_arch_sections’ [-Wmissing-prototypes]
      103 | int module_frob_arch_sections(Elf_Ehdr *ehdr, Elf_Shdr *sechdrs,
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~
    arch/loongarch/mm/hugetlbpage.c:56:5: warning: no previous prototype for ‘is_aligned_hugepage_range’ [-Wmissing-prototypes]
       56 | int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
          |     ^~~~~~~~~~~~~~~~~~~~~~~~~
    Signed-off-by: default avatarBibo Mao <maobibo@loongson.cn>
    Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
    c718a0ba
syscall.c 1.58 KB