powerpc/powermac: Fix unused function warning
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 21 Aug 2023 14:09:49 +0000 (00:09 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 24 Aug 2023 22:39:29 +0000 (08:39 +1000)
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>
Link: https://msgid.link/20230821140949.491881-1-mpe@ellerman.id.au
arch/powerpc/platforms/powermac/feature.c

index ed472b797e28a031e44569d6713032ff8987cb7c..ae62d432db8bbf0382963f1c9eda1951495eefa1 100644 (file)
@@ -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)
 {