* [PATCH] powerpc/powermac: Fix unused function warning
@ 2023-08-21 14:09 Michael Ellerman
2023-08-31 4:02 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Michael Ellerman @ 2023-08-21 14:09 UTC (permalink / raw)
To: linuxppc-dev; +Cc: arnd
Clang reports:
arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak'
It's only used inside the #ifndef CONFIG_PPC64 block, so move it in
there to fix the warning. While at it drop the inline, the compiler will
decide whether it should be inlined or not.
Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308181501.AR5HMDWC-lkp@intel.com/
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
arch/powerpc/platforms/powermac/feature.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index ed472b797e28..ae62d432db8b 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -134,8 +134,10 @@ static struct pmac_mb_def pmac_mb;
* Here are the chip specific feature functions
*/
-static inline int simple_feature_tweak(struct device_node *node, int type,
- int reg, u32 mask, int value)
+#ifndef CONFIG_PPC64
+
+static int simple_feature_tweak(struct device_node *node, int type, int reg,
+ u32 mask, int value)
{
struct macio_chip* macio;
unsigned long flags;
@@ -154,8 +156,6 @@ static inline int simple_feature_tweak(struct device_node *node, int type,
return 0;
}
-#ifndef CONFIG_PPC64
-
static long ohare_htw_scc_enable(struct device_node *node, long param,
long value)
{
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] powerpc/powermac: Fix unused function warning
2023-08-21 14:09 [PATCH] powerpc/powermac: Fix unused function warning Michael Ellerman
@ 2023-08-31 4:02 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2023-08-31 4:02 UTC (permalink / raw)
To: linuxppc-dev, Michael Ellerman; +Cc: arnd
On Tue, 22 Aug 2023 00:09:49 +1000, Michael Ellerman wrote:
> Clang reports:
> arch/powerpc/platforms/powermac/feature.c:137:19: error: unused function 'simple_feature_tweak'
>
> It's only used inside the #ifndef CONFIG_PPC64 block, so move it in
> there to fix the warning. While at it drop the inline, the compiler will
> decide whether it should be inlined or not.
>
> [...]
Applied to powerpc/next.
[1/1] powerpc/powermac: Fix unused function warning
https://git.kernel.org/powerpc/c/1eafbd8764b10798934344bd40395b27cec63145
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-31 4:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-21 14:09 [PATCH] powerpc/powermac: Fix unused function warning Michael Ellerman
2023-08-31 4:02 ` Michael Ellerman
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).