xtensa: fix W=1 build warnings
Subsystems (4)
cover xtensa: fix W=1 build warnings
This series fixes all xtensa W=1 build warnings that I have seen with the exception of some in arch/xtensa/boot/. [1]
These have been through defconfig, allnoconfig, tinyconfig, allyesconfig, allmodconfig, and many randconfig builds.
[PATCH 01/16] xtensa: FSF: define XCHAL_HAVE_DIV32
[PATCH 02/16] xtensa: fault: include <asm/traps.h>
[PATCH 03/16] xtensa: irq: include <asm/traps.h>
[PATCH 04/16] xtensa: ptrace: add prototypes to <asm/ptrace.h> [PATCH 05/16] xtensa: processor.h: add init_arch() prototype [PATCH 06/16] xtensa: signal: include headers for function prototypes [PATCH 07/16] xtensa: stacktrace: include <asm/ftrace.h> for prototype [PATCH 08/16] xtensa: traps: add <linux/cpu.h> for function prototype [PATCH 09/16] irqchip: irq-xtensa-mx: include header for missing prototype [PATCH 10/16] xtensa: smp: add headers for missing function prototypes [PATCH 11/16] xtensa: hw_breakpoing: include header for missing prototype [PATCH 12/16] xtensa: tlb: include <asm/tlb.h> for missing prototype [PATCH 13/16] xtensa: iss/network: make functions static [PATCH 14/16] xtensa: boot: don't add include-dirs
[PATCH 15/16] xtensa: umulsidi3: fix conditional expression [PATCH 16/16] xtensa: boot/lib: add missing prototypes for functions
1:arch/xtensa/boot/boot-elf/bootstrap.S:68: Warning: value 0x1a0003000 truncated to 0xa0003000
arch/xtensa/boot/Makefile | 3 +-- arch/xtensa/boot/lib/zmem.c | 4 ++++ arch/xtensa/include/asm/hw_breakpoint.h | 1 + arch/xtensa/include/asm/processor.h | 5 +++++ arch/xtensa/include/asm/ptrace.h | 3 +++ arch/xtensa/include/asm/smp.h | 1 + arch/xtensa/include/asm/tlb.h | 2 ++ arch/xtensa/kernel/hw_breakpoint.c | 1 + arch/xtensa/kernel/irq.c | 1 + arch/xtensa/kernel/ptrace.c | 1 - arch/xtensa/kernel/signal.c | 2 ++ arch/xtensa/kernel/smp.c | 1 + arch/xtensa/kernel/stacktrace.c | 1 + arch/xtensa/kernel/traps.c | 1 + arch/xtensa/lib/umulsidi3.S | 4 +++- arch/xtensa/mm/fault.c | 1 + arch/xtensa/mm/tlb.c | 1 + arch/xtensa/platforms/iss/network.c | 4 ++-- arch/xtensa/variants/fsf/include/variant/core.h | 1 + drivers/irqchip/irq-xtensa-mx.c | 1 + 20 files changed, 33 insertions(+), 6 deletions(-)
PATCH 1/16 xtensa: FSF: define XCHAL_HAVE_DIV32
When variant FSF is set, XCHAL_HAVE_DIV32 is not defined, so add the define for FSF to prevent build warnings:
arch/xtensa/lib/divsi3.S:9:5: warning: "XCHAL_HAVE_DIV32" is not defined, evaluates to 0 [-Wundef]
9 | #if XCHAL_HAVE_DIV32
arch/xtensa/lib/modsi3.S:9:5: warning: "XCHAL_HAVE_DIV32" is not defined, evaluates to 0 [-Wundef]
9 | #if XCHAL_HAVE_DIV32--- arch/xtensa/variants/fsf/include/variant/core.h | 1 + 1 file changed, 1 insertion(+)
arch/xtensa/variants/fsf/include/variant/core.h +1 -0
@@ -41,6 +41,7 @@#define XCHAL_HAVE_MUL16 0/* MUL16S/MUL16U instructions */ #define XCHAL_HAVE_MUL32 0/* MULL instruction */ #define XCHAL_HAVE_MUL32_HIGH 0/* MULUH/MULSH instructions */ +#define XCHAL_HAVE_DIV32 0/* QUOS/QUOU/REMS/REMU instructions */ #define XCHAL_HAVE_L32R 1/* L32R instruction */ #define XCHAL_HAVE_ABSOLUTE_LITERALS 1/* non-PC-rel (extended) L32R */ #define XCHAL_HAVE_CONST16 0/* CONST16 instruction */
Max Filippov
maintainerRe: [PATCH 01/16] xtensa: FSF: define XCHAL_HAVE_DIV32
Quoted 15 lines · Randy Dunlap
When variant FSF is set,
XCHAL_HAVE_DIV32is not defined, so add the define for FSF to prevent build warnings:
arch/xtensa/lib/divsi3.S:9:5: warning: "XCHAL_HAVE_DIV32" is not defined, evaluates to 0 [-Wundef]9 | #if XCHAL_HAVE_DIV32 arch/xtensa/lib/modsi3.S:9:5: warning: "XCHAL_HAVE_DIV32" is not defined, evaluates to 0 [-Wundef] 9 | #if XCHAL_HAVE_DIV32Fixes 173d6681380a ("xtensa: remove extra header files")Signed-off-by Randy Dunlap <[email protected]>Reported-by kernel test robot <[email protected]>Closes lore.kernel.org/r/[email protected]Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>
Quoted 3 lines
--- arch/xtensa/variants/fsf/include/variant/core.h | 1 + 1 file changed, 1 insertion(+)
If this configuration overlay doesn't define that macro then other configurations
from that era may have similar issue. I've posted a different fix that adds a default
definition for XCHAL_HAVE_DIV32 to asm/core.h instead.
Signature · 2 lines
Thanks. -- Max
PATCH 2/16 xtensa: fault: include <asm/traps.h>
In reply to Randy DunlapUse <asm/traps.h> to provide the function prototype for do_page_fault() to prevent a build warning:
arch/xtensa/mm/fault.c:87:6: warning: no previous prototype for 'do_page_fault' [-Wmissing-prototypes]
87 | void do_page_fault(struct pt_regs *regs)
--- arch/xtensa/mm/fault.c | 1 + 1 file changed, 1 insertion(+)
arch/xtensa/mm/fault.c +1 -0
@@ -20,6 +20,7 @@#include <asm/mmu_context.h> #include <asm/cacheflush.h> #include <asm/hardirq.h> +#include <asm/traps.h> void bad_page_fault (struct pt_regs *,unsigned long ,int );
PATCH 3/16 xtensa: irq: include <asm/traps.h>
In reply to Randy DunlapUse <asm/traps.h> to provide the function prototype for do_IRQ() to prevent a build warning:
arch/xtensa/kernel/irq.c:34:17: warning: no previous prototype for 'do_IRQ' [-Wmissing-prototypes]
34 | asmlinkage void do_IRQ(int hwirq, struct pt_regs *regs)
--- arch/xtensa/kernel/irq.c | 1 + 1 file changed, 1 insertion(+)
arch/xtensa/kernel/irq.c +1 -0
@@ -28,6 +28,7 @@#include <asm/mxregs.h> #include <linux/uaccess.h> #include <asm/platform.h> +#include <asm/traps.h> DECLARE_PER_CPU(unsigned long, nmi_count);
PATCH 4/16 xtensa: ptrace: add prototypes to <asm/ptrace.h>
In reply to Randy DunlapAdd prototype for do_syscall_trace_enter() to asm/ptrace.h. Move prototype for do_syscall_trace_leave() there to be consistent.
Fixes a build warning:
arch/xtensa/kernel/ptrace.c:545:5: warning: no previous prototype for 'do_syscall_trace_enter' [-Wmissing-prototypes]
545 | int do_syscall_trace_enter(struct pt_regs *regs)
--- arch/xtensa/include/asm/ptrace.h | 3 +++ arch/xtensa/kernel/ptrace.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-)
arch/xtensa/include/asm/ptrace.h +3 -0
@@ -106,6 +106,9 @@ static inline unsigned long regs_return_ return regs->areg[2]; } +int do_syscall_trace_enter (struct pt_regs *regs); +void do_syscall_trace_leave (struct pt_regs *regs); +#else /* __ASSEMBLY__ */ # include <asm/asm-offsets.h>
arch/xtensa/kernel/ptrace.c +0 -1
@@ -541,7 +541,6 @@ long arch_ptrace(struct task_struct *chireturn ret; } -void do_syscall_trace_leave (struct pt_regs *regs);int do_syscall_trace_enter (struct pt_regs *regs) {if (regs->syscall ==NO_SYSCALL )
PATCH 5/16 xtensa: processor.h: add init_arch() prototype
In reply to Randy DunlapAdd the prototype for init_arch() to asm/processor.h to prevent a build warning:
arch/xtensa/kernel/setup.c:244:13: warning: no previous prototype for 'init_arch' [-Wmissing-prototypes]
244 | void __init init_arch(bp_tag_t *bp_start)
--- arch/xtensa/include/asm/processor.h | 4 ++++ 1 file changed, 4 insertions(+)
arch/xtensa/include/asm/processor.h +4 -0
@@ -14,6 +14,8 @@#include <linux/compiler.h> #include <linux/stringify.h> + +#include <asm/bootparam.h> #include <asm/ptrace.h> #include <asm/types.h> #include <asm/regs.h>
@@ -217,6 +219,8 @@ struct mm_struct;extern unsigned long __get_wchan (struct task_struct *p); +void init_arch (bp_tag_t *bp_start); +#define KSTK_EIP (tsk) (task_pt_regs(tsk)->pc)#define KSTK_ESP (tsk) (task_pt_regs(tsk)->areg[1])
PATCH 6/16 xtensa: signal: include headers for function prototypes
In reply to Randy DunlapAdd <asm/syscall.h> to satisfy the xtensa_rt_sigreturn() prototype warning.
Add <asm/processor.h> to satisfy the do_notify_resume() prototype warning.
arch/xtensa/kernel/signal.c:246:17: warning: no previous prototype for 'xtensa_rt_sigreturn' [-Wmissing-prototypes] arch/xtensa/kernel/signal.c:525:6: warning: no previous prototype for 'do_notify_resume' [-Wmissing-prototypes]
525 | void do_notify_resume(struct pt_regs *regs)
--- arch/xtensa/include/asm/processor.h | 1 + arch/xtensa/kernel/signal.c | 2 ++ 2 files changed, 3 insertions(+)
arch/xtensa/kernel/signal.c +2 -0
@@ -26,6 +26,8 @@#include <linux/uaccess.h> #include <asm/cacheflush.h> #include <asm/coprocessor.h> +#include <asm/processor.h> +#include <asm/syscall.h> #include <asm/unistd.h> extern struct task_struct *coproc_owners[];
arch/xtensa/include/asm/processor.h +1 -0
@@ -220,6 +220,7 @@ struct mm_struct;extern unsigned long __get_wchan (struct task_struct *p);void init_arch (bp_tag_t *bp_start); +void do_notify_resume (struct pt_regs *regs);#define KSTK_EIP (tsk) (task_pt_regs(tsk)->pc)#define KSTK_ESP (tsk) (task_pt_regs(tsk)->areg[1])
PATCH 7/16 xtensa: stacktrace: include <asm/ftrace.h> for prototype
In reply to Randy DunlapUse <asm/ftrace.h> to prevent a build warning:
arch/xtensa/kernel/stacktrace.c:263:15: warning: no previous prototype for 'return_address' [-Wmissing-prototypes]
263 | unsigned long return_address(unsigned level)
--- arch/xtensa/kernel/stacktrace.c | 1 + 1 file changed, 1 insertion(+)
arch/xtensa/kernel/stacktrace.c +1 -0
@@ -12,6 +12,7 @@#include <linux/sched.h> #include <linux/stacktrace.h> +#include <asm/ftrace.h> #include <asm/stacktrace.h> #include <asm/traps.h> #include <linux/uaccess.h>
PATCH 8/16 xtensa: traps: add <linux/cpu.h> for function prototype
In reply to Randy DunlapUse <linux/cpu.h> to provide the prototype for trap_init(), to prevent a build warning:
arch/xtensa/kernel/traps.c:484:13: warning: no previous prototype for 'trap_init' [-Wmissing-prototypes]
484 | void __init trap_init(void)
--- arch/xtensa/kernel/traps.c | 1 + 1 file changed, 1 insertion(+)
arch/xtensa/kernel/traps.c +1 -0
@@ -23,6 +23,7 @@* for more details. */ +#include <linux/cpu.h> #include <linux/kernel.h> #include <linux/sched/signal.h> #include <linux/sched/debug.h>
PATCH 9/16 irqchip: irq-xtensa-mx: include header for missing prototype
In reply to Randy DunlapAdd <linux/irqchips/xtensa-mx.h> to provide the function prototype to prevent a build warning:
drivers/irqchip/irq-xtensa-mx.c:166:12: warning: no previous prototype for 'xtensa_mx_init_legacy' [-Wmissing-prototypes]
166 | int __init xtensa_mx_init_legacy(struct device_node *interrupt_parent)
--- drivers/irqchip/irq-xtensa-mx.c | 1 + 1 file changed, 1 insertion(+)
drivers/irqchip/irq-xtensa-mx.c +1 -0
@@ -12,6 +12,7 @@#include <linux/irqdomain.h> #include <linux/irq.h> #include <linux/irqchip.h> +#include <linux/irqchip/xtensa-mx.h> #include <linux/of.h> #include <asm/mxregs.h>
Re: [PATCH 09/16] irqchip: irq-xtensa-mx: include header for missing prototype
Quoted 21 lines · Randy Dunlap
Add <
linux/irqchips/xtensa-mx.h> to provide the function prototype to prevent a build warning:
drivers/irqchip/irq-xtensa-mx.c:166:12: warning: no previous prototype for 'xtensa_mx_init_legacy' [-Wmissing-prototypes]
166 | int__initxtensa_mx_init_legacy(struct device_node *interrupt_parent)Signed-off-by Randy Dunlap <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Marc Zyngier <[email protected]>--- drivers/irqchip/irq-xtensa-mx.c | 1 + 1 file changed, 1 insertion(+)diff --
a/drivers/irqchip/irq-xtensa-mx.cb/drivers/irqchip/irq-xtensa-mx.c
drivers/irqchip/irq-xtensa-mx.c line 18
Quoted 7 lines
drivers/irqchip/irq-xtensa-mx.c +1
-0@@ -12,6 +12,7 @@#include <linux/irqdomain.h> #include <linux/irq.h> #include <linux/irqchip.h> +#include <linux/irqchip/xtensa-mx.h> #include <linux/of.h> #include <asm/mxregs.h>
It also begs the question of the continuing support for non-DT driven systems.
Max, Chris: are we any closer to being DT-only on the xtensa front?
Thanks,
M.
Signature · 1 line
Without deviation from the norm, progress is not possible.
Max Filippov
maintainerRe: [PATCH 09/16] irqchip: irq-xtensa-mx: include header for missing prototype
Quoted 4 lines · Marc Zyngier
It also begs the question of the continuing support for non-DT driven systems.
Max, Chris: are we any closer to being DT-only on the xtensa front?
I have never seen it as a goal. Let's see: iss doesn't have devices at all, virt based on it is DT-only, xtfpga with DT loses USB host support, but it hasn't really been all that useful. xt2000 is the only xtensa platform that does not support device trees now. I can convert the code, but I don't have the hardware to test it. I also know that it hasn't been in use in Cadence. Maybe Chris has it? If not then I guess we can drop it.
Signature · 2 lines
Thanks. -- Max
PATCH 10/16 xtensa: smp: add headers for missing function prototypes
In reply to Randy DunlapUse <asm/smp.h> to provide the prototype for secondary_start_kernel(). Use <linux/profile.h> to provide the prototype for setup_profiling_timer().
arch/xtensa/kernel/smp.c:119:6: warning: no previous prototype for 'secondary_start_kernel' [-Wmissing-prototypes]
119 | void secondary_start_kernel(void)arch/xtensa/kernel/smp.c:461:5: warning: no previous prototype for 'setup_profiling_timer' [-Wmissing-prototypes]
461 | int setup_profiling_timer(unsigned int multiplier)
--- arch/xtensa/include/asm/smp.h | 1 + arch/xtensa/kernel/smp.c | 1 + 2 files changed, 2 insertions(+)
arch/xtensa/include/asm/smp.h +1 -0
@@ -23,6 +23,7 @@ struct cpumask;void arch_send_call_function_ipi_mask (const struct cpumask *mask);void arch_send_call_function_single_ipi (int cpu); +void secondary_start_kernel (void );void smp_init_cpus (void );void secondary_init_irq (void );void ipi_init (void );
arch/xtensa/kernel/smp.c +1 -0
@@ -21,6 +21,7 @@#include <linux/irq.h> #include <linux/kdebug.h> #include <linux/module.h> +#include <linux/profile.h> #include <linux/sched/mm.h> #include <linux/sched/hotplug.h> #include <linux/sched/task_stack.h>
PATCH 11/16 xtensa: hw_breakpoint: include header for missing prototype
In reply to Randy DunlapAdd the prototype for restore_dbreak() to <asm/hw_breakpoint.h> and use that header in hw_breakpoint.c to prevent a build warning:
arch/xtensa/kernel/hw_breakpoint.c:263:6: warning: no previous prototype for 'restore_dbreak' [-Wmissing-prototypes]
263 | void restore_dbreak(void)
--- arch/xtensa/include/asm/hw_breakpoint.h | 1 + arch/xtensa/kernel/hw_breakpoint.c | 1 + 2 files changed, 2 insertions(+)
arch/xtensa/include/asm/hw_breakpoint.h +1 -0
@@ -48,6 +48,7 @@ void arch_uninstall_hw_breakpoint(structvoid hw_breakpoint_pmu_read (struct perf_event *bp);int check_hw_breakpoint (struct pt_regs *regs);void clear_ptrace_hw_breakpoint (struct task_struct *tsk); +void restore_dbreak (void );#else
arch/xtensa/kernel/hw_breakpoint.c +1 -0
@@ -13,6 +13,7 @@#include <linux/percpu.h> #include <linux/perf_event.h> #include <asm/core.h> +#include <asm/hw_breakpoint.h> /* Breakpoint currently in use for each IBREAKA. */ static DEFINE_PER_CPU(struct perf_event *, bp_on_reg[XCHAL_NUM_IBREAK]);
PATCH 12/16 xtensa: tlb: include <asm/tlb.h> for missing prototype
In reply to Randy DunlapAdd the prototype for check_tlb_sanity() to <asm/tlb.h> and use that header to prevent a build warning:
arch/xtensa/mm/tlb.c:273:6: warning: no previous prototype for 'check_tlb_sanity' [-Wmissing-prototypes]
273 | void check_tlb_sanity(void)
--- arch/xtensa/include/asm/tlb.h | 2 ++ arch/xtensa/mm/tlb.c | 1 + 2 files changed, 3 insertions(+)
arch/xtensa/include/asm/tlb.h +2 -0
@@ -18,4 +18,6 @@#define __pte_free_tlb (tlb, pte, address) pte_free((tlb)->mm, pte) +void check_tlb_sanity (void ); +#endif /* _XTENSA_TLB_H */
arch/xtensa/mm/tlb.c +1 -0
@@ -17,6 +17,7 @@#include <linux/mm.h> #include <asm/processor.h> #include <asm/mmu_context.h> +#include <asm/tlb.h> #include <asm/tlbflush.h> #include <asm/cacheflush.h>
PATCH 13/16 xtensa: iss/network: make functions static
In reply to Randy DunlapMake 2 functions static to prevent build warnings:
arch/xtensa/platforms/iss/network.c:204:16: warning: no previous prototype for 'tuntap_protocol' [-Wmissing-prototypes]
204 | unsigned short tuntap_protocol(struct sk_buff *skb)arch/xtensa/platforms/iss/network.c:444:6: warning: no previous prototype for 'iss_net_user_timer_expire' [-Wmissing-prototypes]
444 | void iss_net_user_timer_expire(struct timer_list *unused)
--- arch/xtensa/platforms/iss/network.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/xtensa/platforms/iss/network.c +2 -2
@@ -201,7 +201,7 @@ static int tuntap_write(struct iss_net_preturn simc_write (lp->tp.info.tuntap.fd, (*skb)->data, (*skb)->len); } -unsigned short tuntap_protocol (struct sk_buff *skb) +static unsigned short tuntap_protocol (struct sk_buff *skb) {return eth_type_trans (skb, skb->dev); }
@@ -441,7 +441,7 @@ static int iss_net_change_mtu(struct netreturn -EINVAL ; } -void iss_net_user_timer_expire (struct timer_list *unused) +static void iss_net_user_timer_expire (struct timer_list *unused) { }
PATCH 14/16 xtensa: boot: don't add include-dirs
In reply to Randy DunlapDrop the -I<include-dir> options to prevent build warnings since there is not boot/include directory:
cc1: warning: arch/xtensa/boot/include: No such file or directory [-Wmissing-include-dirs]
--- arch/xtensa/boot/Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
arch/xtensa/boot/Makefile +1 -2
@@ -9,8 +9,7 @@ # KBUILD_CFLAGS used when building rest of boot (takes effect recursively) -KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include -HOSTFLAGS += -Iarch/$(ARCH)/boot/include +KBUILD_CFLAGS += -fno-builtin subdir-y := lib targets += vmlinux.bin vmlinux.bin.gz
PATCH 15/16 xtensa: umulsidi3: fix conditional expression
In reply to Randy DunlapEven when a variant has one or more of these defines set to 1, the multiplier code paths are not used. Change the expression so that the correct code paths are used.
arch/xtensa/lib/umulsidi3.S:44:38: warning: "XCHAL_NO_MUL" is not defined, evaluates to 0 [-Wundef]
44 | #if defined(__XTENSA_CALL0_ABI__) && XCHAL_NO_MULarch/xtensa/lib/umulsidi3.S:145:38: warning: "XCHAL_NO_MUL" is not defined, evaluates to 0 [-Wundef]
145 | #if defined(__XTENSA_CALL0_ABI__) && XCHAL_NO_MULarch/xtensa/lib/umulsidi3.S:159:5: warning: "XCHAL_NO_MUL" is not defined, evaluates to 0 [-Wundef]
159 | #if XCHAL_NO_MUL
--- arch/xtensa/lib/umulsidi3.S | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
arch/xtensa/lib/umulsidi3.S +3 -1
@@ -3,7 +3,9 @@ #include <asm/asmmacro.h> #include <asm/core.h> -#if !XCHAL_HAVE_MUL16 && !XCHAL_HAVE_MUL32 && !XCHAL_HAVE_MAC16 +#if XCHAL_HAVE_MUL16 || XCHAL_HAVE_MUL32 || XCHAL_HAVE_MAC16 +#define XCHAL_NO_MUL 0 +#else #define XCHAL_NO_MUL 1 #endif
PATCH 16/16 xtensa: boot/lib: add missing prototypes for functions
In reply to Randy DunlapAdd function prototypes for exit(), zalloc(), and gunzip() to the boot library code.
arch/xtensa/boot/lib/zmem.c:8:6: warning: no previous prototype for 'exit' [-Wmissing-prototypes]
8 | void exit (void)arch/xtensa/boot/lib/zmem.c:13:7: warning: no previous prototype for 'zalloc' [-Wmissing-prototypes]
13 | void *zalloc(unsigned size)arch/xtensa/boot/lib/zmem.c:35:6: warning: no previous prototype for 'gunzip' [-Wmissing-prototypes]
35 | void gunzip (void *dst, int dstlen, unsigned char *src, int *lenp)
--- arch/xtensa/boot/lib/zmem.c | 4 ++++ 1 file changed, 4 insertions(+)
arch/xtensa/boot/lib/zmem.c +4 -0
@@ -5,6 +5,10 @@extern void *avail_ram, *end_avail; +void exit (void ); +void *zalloc (unsigned size); +void gunzip (void *dst,int dstlen,unsigned char *src,int *lenp); +void exit (void ) {for (;;);
Max Filippov
maintainerRe: [PATCH 16/16] xtensa: boot/lib: add missing prototypes for functions
Quoted 3 lines · Randy Dunlap
Add function prototypes for
exit(),zalloc(), andgunzip()to the boot library code.
exit() and zalloc() don't need to be public. I've posted a different fix that makes these two functions static.
Quoted 15 lines
arch/xtensa/boot/lib/zmem.c:8:6: warning: no previous prototype for 'exit' [-Wmissing-prototypes]
8 | void exit (void)arch/xtensa/boot/lib/zmem.c:13:7: warning: no previous prototype for 'zalloc' [-Wmissing-prototypes]
13 | void *zalloc(unsigned size)arch/xtensa/boot/lib/zmem.c:35:6: warning: no previous prototype for 'gunzip' [-Wmissing-prototypes]
35 | void gunzip (void *dst, int dstlen, unsigned char *src, int *lenp)Fixes 4bedea945451 ("xtensa: Architecture support for Tensilica Xtensa Part 2")Fixes e7d163f76665 ("xtensa: Removed local copy of zlib and fixed O= support")Signed-off-by Randy Dunlap <[email protected]>Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>--- arch/xtensa/boot/lib/zmem.c | 4 ++++ 1 file changed, 4 insertions(+)
Signature · 2 lines
Thanks. -- Max
Max Filippov
maintainerHi Randy,
Quoted 49 lines · Randy Dunlap
This series fixes all xtensa W=1 build warnings that I have seen with the exception of some in
arch/xtensa/boot/. [1]These have been through defconfig, allnoconfig, tinyconfig, allyesconfig, allmodconfig, and many randconfig builds.
[PATCH 01/16] xtensa: FSF: define
XCHAL_HAVE_DIV32
[PATCH 02/16] xtensa: fault: include <asm/traps.h>
[PATCH 03/16] xtensa: irq: include <asm/traps.h>
[PATCH 04/16] xtensa: ptrace: add prototypes to <asm/ptrace.h> [PATCH 05/16] xtensa:processor.h: addinit_arch()prototype [PATCH 06/16] xtensa: signal: include headers for function prototypes [PATCH 07/16] xtensa: stacktrace: include <asm/ftrace.h> for prototype [PATCH 08/16] xtensa: traps: add <linux/cpu.h> for function prototype [PATCH 09/16] irqchip: irq-xtensa-mx: include header for missing prototype [PATCH 10/16] xtensa: smp: add headers for missing function prototypes [PATCH 11/16] xtensa:hw_breakpoing: include header for missing prototype [PATCH 12/16] xtensa: tlb: include <asm/tlb.h> for missing prototype [PATCH 13/16] xtensa: iss/network: make functions static [PATCH 14/16] xtensa: boot: don't add include-dirs
[PATCH 15/16] xtensa: umulsidi3: fix conditional expression [PATCH 16/16] xtensa: boot/lib: add missing prototypes for functions1:
arch/xtensa/boot/boot-elf/bootstrap.S:68: Warning: value0x1a0003000truncated to0xa0003000arch/xtensa/boot/Makefile | 3 +-- arch/xtensa/boot/lib/zmem.c | 4 ++++ arch/xtensa/include/asm/hw_breakpoint.h | 1 + arch/xtensa/include/asm/processor.h | 5 +++++ arch/xtensa/include/asm/ptrace.h | 3 +++ arch/xtensa/include/asm/smp.h | 1 + arch/xtensa/include/asm/tlb.h | 2 ++ arch/xtensa/kernel/hw_breakpoint.c | 1 + arch/xtensa/kernel/irq.c | 1 + arch/xtensa/kernel/ptrace.c | 1 - arch/xtensa/kernel/signal.c | 2 ++ arch/xtensa/kernel/smp.c | 1 + arch/xtensa/kernel/stacktrace.c | 1 + arch/xtensa/kernel/traps.c | 1 + arch/xtensa/lib/umulsidi3.S | 4 +++- arch/xtensa/mm/fault.c | 1 + arch/xtensa/mm/tlb.c | 1 + arch/xtensa/platforms/iss/network.c | 4 ++-- arch/xtensa/variants/fsf/include/variant/core.h | 1 + drivers/irqchip/irq-xtensa-mx.c | 1 + 20 files changed, 33 insertions(+), 6 deletions(-)
Quoted 4 lines
Cc Chris Zankel <[email protected]>Cc Max Filippov <[email protected]>Cc Thomas Gleixner <[email protected]>Cc Marc Zyngier <[email protected]>
Thank you for this nice cleanup. Applied the whole series (except the first and the last patches, which I replaced with different fixes) to my xtensa tree.
Signature · 2 lines
Thanks. -- Max