* [PATCH] arm64: dovetail: Fix cast-function-type warning
@ 2022-07-03 10:59 Jan Kiszka
2022-07-03 14:01 ` Philippe Gerum
0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2022-07-03 10:59 UTC (permalink / raw)
To: Xenomai, Philippe Gerum
From: Jan Kiszka <jan.kiszka@siemens.com>
Resolves
../arch/arm64/kernel/entry-common.c: In function ‘do_interrupt_handler’:
../arch/arm64/kernel/entry-common.c:434:13: warning: cast between incompatible function types from ‘int (*)(struct pt_regs *)’ to ‘void (*)(struct pt_regs *)’ [-Wcast-function-type]
434 | handler = (void (*)(struct pt_regs *))handle_irq_pipelined;
| ^
which is harmless in this context.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
arch/arm64/kernel/entry-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c
index 9e7f424aa00b..525e13be728f 100644
--- a/arch/arm64/kernel/entry-common.c
+++ b/arch/arm64/kernel/entry-common.c
@@ -431,7 +431,7 @@ static bool do_interrupt_handler(struct pt_regs *regs,
struct pt_regs *old_regs = set_irq_regs(regs); /* need this for FIQs */
if (handler == handle_arch_irq)
- handler = (void (*)(struct pt_regs *))handle_irq_pipelined;
+ handler = (typeof(handler))(void (*)(void))handle_irq_pipelined;
__do_interrupt_handler(regs, handler);
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] arm64: dovetail: Fix cast-function-type warning
2022-07-03 10:59 [PATCH] arm64: dovetail: Fix cast-function-type warning Jan Kiszka
@ 2022-07-03 14:01 ` Philippe Gerum
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Gerum @ 2022-07-03 14:01 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai
Jan Kiszka <jan.kiszka@siemens.com> writes:
> From: Jan Kiszka <jan.kiszka@siemens.com>
>
> Resolves
>
> ../arch/arm64/kernel/entry-common.c: In function ‘do_interrupt_handler’:
> ../arch/arm64/kernel/entry-common.c:434:13: warning: cast between incompatible function types from ‘int (*)(struct pt_regs *)’ to ‘void (*)(struct pt_regs *)’ [-Wcast-function-type]
> 434 | handler = (void (*)(struct pt_regs *))handle_irq_pipelined;
> | ^
>
> which is harmless in this context.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
> arch/arm64/kernel/entry-common.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/arm64/kernel/entry-common.c b/arch/arm64/kernel/entry-common.c
> index 9e7f424aa00b..525e13be728f 100644
> --- a/arch/arm64/kernel/entry-common.c
> +++ b/arch/arm64/kernel/entry-common.c
> @@ -431,7 +431,7 @@ static bool do_interrupt_handler(struct pt_regs *regs,
> struct pt_regs *old_regs = set_irq_regs(regs); /* need this for FIQs */
>
> if (handler == handle_arch_irq)
> - handler = (void (*)(struct pt_regs *))handle_irq_pipelined;
> + handler = (typeof(handler))(void (*)(void))handle_irq_pipelined;
>
> __do_interrupt_handler(regs, handler);
Merged, thanks (fixing up the subject line, this helps me dispatching the
changes when flattening the tree).
--
Philippe.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-03 14:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-03 10:59 [PATCH] arm64: dovetail: Fix cast-function-type warning Jan Kiszka
2022-07-03 14:01 ` Philippe Gerum
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.