fix misc compiler warnings in the ia64 build
Subsystems (3)
Hi Tony,
this little series fixes various warnings I see in ia64 builds.
PATCH 1/4 ia64: annotate a switch fallthrough in ia64_do_signal
Also reindent the switch statement to use the normal kernel style while at it.
--- arch/ia64/kernel/signal.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
arch/ia64/kernel/signal.c +5 -5
@@ -363,19 +363,19 @@ ia64_do_signal (struct sigscratch *scr, long in_syscall)if (unlikely (restart)) {switch (errno) { -case ERESTART_RESTARTBLOCK : -case ERESTARTNOHAND : +case ERESTART_RESTARTBLOCK : +case ERESTARTNOHAND : scr->pt.r8 =EINTR ;/* note: scr->pt.r10 is already -1 */ break ; - -case ERESTARTSYS : +case ERESTARTSYS :if ((ksig.ka.sa.sa_flags &SA_RESTART ) =0 ) { scr->pt.r8 =EINTR ;/* note: scr->pt.r10 is already -1 */ break ; } -case ERESTARTNOINTR : +/*FALLTHRU*/ +case ERESTARTNOINTR :ia64_decrement_ip (&scr->pt); restart =0 ;/* don't restart twice if handle_signal() fails... */ }
Signature · 1 line
2.20.1
PATCH 2/4 ia64: annotate switch fallthroughs in ia64_handle_unaligned
In reply to Christoph HellwigReplace the "no break" comments with something that the compiler recognizes.
--- arch/ia64/kernel/unaligned.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/ia64/kernel/unaligned.c +3 -3
@@ -1431,7 +1431,7 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)if (u.insn.x)/* oops, really a semaphore op (cmpxchg, etc) */ goto failure; -/* no break */ +/*FALLTHRU*/ case LDS_IMM_OP :case LDSA_IMM_OP :case LDFS_OP :
@@ -1459,7 +1459,7 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)if (u.insn.x)/* oops, really a semaphore op (cmpxchg, etc) */ goto failure; -/* no break */ +/*FALLTHRU*/ case LD_IMM_OP :case LDA_IMM_OP :case LDBIAS_IMM_OP :
@@ -1475,7 +1475,7 @@ ia64_handle_unaligned (unsigned long ifa, struct pt_regs *regs)if (u.insn.x)/* oops, really a semaphore op (cmpxchg, etc) */ goto failure; -/* no break */ +/*FALLTHRU*/ case ST_IMM_OP :case STREL_IMM_OP : ret =emulate_store_int (ifa, u.insn, regs);
Signature · 1 line
2.20.1
PATCH 3/4 ia64/kprobes: remove the unused ia64_get_bsp_cfm function
In reply to Christoph Hellwig--- arch/ia64/kernel/kprobes.c | 26 -------------------------- 1 file changed, 26 deletions(-)
arch/ia64/kernel/kprobes.c +0 -26
@@ -979,32 +979,6 @@ int __kprobes kprobe_exceptions_notify(struct notifier_block *self,return ret; } -struct param_bsp_cfm { -unsigned long ip; -unsigned long *bsp; -unsigned long cfm; -}; - -static void ia64_get_bsp_cfm (struct unw_frame_info *info,void *arg) -{ -unsigned long ip; -struct param_bsp_cfm *lp = arg; - -do { -unw_get_ip (info, &ip); -if (ip =0 ) -break ; -if (ip = lp->ip) { -unw_get_bsp (info, (unsigned long *)&lp->bsp); -unw_get_cfm (info, (unsigned long *)&lp->cfm); -return ; - } - }while (unw_unwind (info) >=0 ); - lp->bsp =NULL ; - lp->cfm =0 ; -return ; -} -unsigned long arch_deref_entry_point (void *entry) {return ((struct fnptr *)entry)->ip;
Signature · 1 line
2.20.1
PATCH 4/4 kernel: only define task_struct_whitelist conditionally
In reply to Christoph HellwigIf CONFIG_ARCH_TASK_STRUCT_ALLOCATOR is set task_struct_whitelist is never called, and thus generates a compiler warning.
--- kernel/fork.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/fork.c +2 -0
@@ -768,6 +768,7 @@ static void set_max_threads(unsigned int max_threads_suggested)int arch_task_struct_size__read_mostly ;#endif +#ifndef CONFIG_ARCH_TASK_STRUCT_ALLOCATOR static void task_struct_whitelist (unsigned long *offset,unsigned long *size) {/* Fetch thread_struct whitelist for the architecture. */
@@ -782,6 +783,7 @@ static void task_struct_whitelist(unsigned long *offset, unsigned long *size) else *offset += offsetof(struct task_struct, thread); } +#endif /* CONFIG_ARCH_TASK_STRUCT_ALLOCATOR */ void __init fork_init (void ) {
Signature · 1 line
2.20.1
Luck, Tony
AppliedQuoted 1 line
this little series fixes various warnings I see in ia64 builds.
Applied. Thanks.
[I assume you are using some up-to-date version of gcc that generates these
warnings ... I'm not seeing them, but I'm still using a compiler from the stone age]
-Tony
Quoted 7 lines · Tony
Quoted 1 line
this little series fixes various warnings I see in ia64 builds.
Applied. Thanks.
[I assume you are using some up-to-date version of gcc that generates these
warnings ... I'm not seeing them, but I'm still using a compiler from the stone age]
This is with the gcc 8.1 x86 to ia64 binary from
http://kernel.mirror.ac.za/tools/crosstool/ that I found recently. But at least the fork.c and kprobes.c ones should probably show up with any supported compiler, the switch ones are fairly new.