[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190515120942.3812-1-malat@debian.org>
Date: Wed, 15 May 2019 14:09:42 +0200
From: Mathieu Malaterre <malat@...ian.org>
To: Michael Ellerman <mpe@...erman.id.au>
Cc: Mathieu Malaterre <malat@...ian.org>,
Michael Neuling <mikey@...ling.org>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Paul Mackerras <paulus@...ba.org>,
linuxppc-dev@...ts.ozlabs.org, linux-kernel@...r.kernel.org
Subject: [PATCH] powerpc: silence a -Wcast-function-type warning in dawr_write_file_bool
In commit c1fe190c0672 ("powerpc: Add force enable of DAWR on P9
option") the following piece of code was added:
smp_call_function((smp_call_func_t)set_dawr, &null_brk, 0);
Since GCC 8 this trigger the following warning about incompatible
function types:
arch/powerpc/kernel/hw_breakpoint.c:408:21: error: cast between incompatible function types from 'int (*)(struct arch_hw_breakpoint *)' to 'void (*)(void *)' [-Werror=cast-function-type]
Cast the function to an intermediate (void*) to make the compiler loose
knowledge about actual type.
Fixes: c1fe190c0672 ("powerpc: Add force enable of DAWR on P9 option")
Cc: Michael Neuling <mikey@...ling.org>
Signed-off-by: Mathieu Malaterre <malat@...ian.org>
---
arch/powerpc/kernel/hw_breakpoint.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/kernel/hw_breakpoint.c b/arch/powerpc/kernel/hw_breakpoint.c
index f70fb89dbf60..baeb4c58de3b 100644
--- a/arch/powerpc/kernel/hw_breakpoint.c
+++ b/arch/powerpc/kernel/hw_breakpoint.c
@@ -405,7 +405,8 @@ static ssize_t dawr_write_file_bool(struct file *file,
/* If we are clearing, make sure all CPUs have the DAWR cleared */
if (!dawr_force_enable)
- smp_call_function((smp_call_func_t)set_dawr, &null_brk, 0);
+ smp_call_function((smp_call_func_t)(void *)set_dawr,
+ &null_brk, 0);
return rc;
}
--
2.20.1
Powered by blists - more mailing lists