* fix misc compiler warnings in the ia64 build
@ 2019-08-12 6:55 Christoph Hellwig
2019-08-12 6:55 ` [PATCH 1/4] ia64: annotate a switch fallthrough in ia64_do_signal Christoph Hellwig
` (4 more replies)
0 siblings, 5 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-08-12 6:55 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu; +Cc: linux-ia64, linux-kernel
Hi Tony,
this little series fixes various warnings I see in ia64 builds.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/4] ia64: annotate a switch fallthrough in ia64_do_signal
2019-08-12 6:55 fix misc compiler warnings in the ia64 build Christoph Hellwig
@ 2019-08-12 6:55 ` Christoph Hellwig
2019-08-12 6:55 ` [PATCH 2/4] ia64: annotate switch fallthroughs in ia64_handle_unaligned Christoph Hellwig
` (3 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-08-12 6:55 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu; +Cc: linux-ia64, linux-kernel
Also reindent the switch statement to use the normal kernel style
while at it.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/ia64/kernel/signal.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/ia64/kernel/signal.c b/arch/ia64/kernel/signal.c
index e5044aed9452..d07ed65c9c6e 100644
--- a/arch/ia64/kernel/signal.c
+++ b/arch/ia64/kernel/signal.c
@@ -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... */
}
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/4] ia64: annotate switch fallthroughs in ia64_handle_unaligned
2019-08-12 6:55 fix misc compiler warnings in the ia64 build Christoph Hellwig
2019-08-12 6:55 ` [PATCH 1/4] ia64: annotate a switch fallthrough in ia64_do_signal Christoph Hellwig
@ 2019-08-12 6:55 ` Christoph Hellwig
2019-08-12 6:55 ` [PATCH 3/4] ia64/kprobes: remove the unused ia64_get_bsp_cfm function Christoph Hellwig
` (2 subsequent siblings)
4 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-08-12 6:55 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu; +Cc: linux-ia64, linux-kernel
Replace the "no break" comments with something that the compiler
recognizes.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/ia64/kernel/unaligned.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/ia64/kernel/unaligned.c b/arch/ia64/kernel/unaligned.c
index eb7d5df59fa3..2d4e65ba5c3e 100644
--- a/arch/ia64/kernel/unaligned.c
+++ b/arch/ia64/kernel/unaligned.c
@@ -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);
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/4] ia64/kprobes: remove the unused ia64_get_bsp_cfm function
2019-08-12 6:55 fix misc compiler warnings in the ia64 build Christoph Hellwig
2019-08-12 6:55 ` [PATCH 1/4] ia64: annotate a switch fallthrough in ia64_do_signal Christoph Hellwig
2019-08-12 6:55 ` [PATCH 2/4] ia64: annotate switch fallthroughs in ia64_handle_unaligned Christoph Hellwig
@ 2019-08-12 6:55 ` Christoph Hellwig
2019-08-12 6:55 ` [PATCH 4/4] kernel: only define task_struct_whitelist conditionally Christoph Hellwig
2019-08-12 21:47 ` fix misc compiler warnings in the ia64 build Luck, Tony
4 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-08-12 6:55 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu; +Cc: linux-ia64, linux-kernel
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
arch/ia64/kernel/kprobes.c | 26 --------------------------
1 file changed, 26 deletions(-)
diff --git a/arch/ia64/kernel/kprobes.c b/arch/ia64/kernel/kprobes.c
index 5de801a2c0f0..b8356edbde65 100644
--- a/arch/ia64/kernel/kprobes.c
+++ b/arch/ia64/kernel/kprobes.c
@@ -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;
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 4/4] kernel: only define task_struct_whitelist conditionally
2019-08-12 6:55 fix misc compiler warnings in the ia64 build Christoph Hellwig
` (2 preceding siblings ...)
2019-08-12 6:55 ` [PATCH 3/4] ia64/kprobes: remove the unused ia64_get_bsp_cfm function Christoph Hellwig
@ 2019-08-12 6:55 ` Christoph Hellwig
2019-08-12 21:47 ` fix misc compiler warnings in the ia64 build Luck, Tony
4 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-08-12 6:55 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu; +Cc: linux-ia64, linux-kernel
If CONFIG_ARCH_TASK_STRUCT_ALLOCATOR is set task_struct_whitelist is
never called, and thus generates a compiler warning.
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
kernel/fork.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/fork.c b/kernel/fork.c
index 2852d0e76ea3..f79e3da0caaf 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -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)
{
--
2.20.1
^ permalink raw reply related [flat|nested] 7+ messages in thread
* RE: fix misc compiler warnings in the ia64 build
2019-08-12 6:55 fix misc compiler warnings in the ia64 build Christoph Hellwig
` (3 preceding siblings ...)
2019-08-12 6:55 ` [PATCH 4/4] kernel: only define task_struct_whitelist conditionally Christoph Hellwig
@ 2019-08-12 21:47 ` Luck, Tony
2019-08-12 21:52 ` Christoph Hellwig
4 siblings, 1 reply; 7+ messages in thread
From: Luck, Tony @ 2019-08-12 21:47 UTC (permalink / raw)
To: Christoph Hellwig, Yu, Fenghua; +Cc: linux-ia64, linux-kernel
> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: fix misc compiler warnings in the ia64 build
2019-08-12 21:47 ` fix misc compiler warnings in the ia64 build Luck, Tony
@ 2019-08-12 21:52 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2019-08-12 21:52 UTC (permalink / raw)
To: Luck, Tony; +Cc: Christoph Hellwig, Yu, Fenghua, linux-ia64, linux-kernel
On Mon, Aug 12, 2019 at 09:47:40PM +0000, Luck, Tony wrote:
> > 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.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2019-08-12 21:52 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-12 6:55 fix misc compiler warnings in the ia64 build Christoph Hellwig
2019-08-12 6:55 ` [PATCH 1/4] ia64: annotate a switch fallthrough in ia64_do_signal Christoph Hellwig
2019-08-12 6:55 ` [PATCH 2/4] ia64: annotate switch fallthroughs in ia64_handle_unaligned Christoph Hellwig
2019-08-12 6:55 ` [PATCH 3/4] ia64/kprobes: remove the unused ia64_get_bsp_cfm function Christoph Hellwig
2019-08-12 6:55 ` [PATCH 4/4] kernel: only define task_struct_whitelist conditionally Christoph Hellwig
2019-08-12 21:47 ` fix misc compiler warnings in the ia64 build Luck, Tony
2019-08-12 21:52 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).