Skip to contentSkip to conversation

ARC: hide unused function unw_hdr_alloc

PATCH In review Arnd Bergmann 2 participants 4 messages Jul 3, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARC: hide unused function unw_hdr_alloc

As kernelci.org reports, this function is not used in vdk_hs38_defconfig:

arch/arc/kernel/unwind.c:188:14: warning: 'unw_hdr_alloc' defined but not used [-Wunused-function]

Fixes bc79c9a72165 ("ARC: dw2 unwind: Reinstante unwinding out of modules")
Cc stable at vger.kernel.org
Signed-off-by Arnd Bergmann <arnd at arndb.de>
---
 arch/arc/kernel/unwind.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
arch/arc/kernel/unwind.c +4 -5
index 182ce67dfe10..c2663fce7f6c 100644
@@ -181,11 +181,6 @@ static void *__init unw_hdr_alloc_early(unsigned long sz)
 	return memblock_alloc_from(sz, sizeof(unsigned int), MAX_DMA_ADDRESS);
 }
 
-static void *unw_hdr_alloc(unsigned long sz)
-{
-	return kmalloc(sz, GFP_KERNEL);
-}
-
 static void init_unwind_table(struct unwind_table *table, const char *name,
 			      const void *core_start, unsigned long core_size,
 			      const void *init_start, unsigned long init_size,
@@ -366,6 +361,10 @@ static void init_unwind_hdr(struct unwind_table *table,
 }
 
 #ifdef CONFIG_MODULES
+static void *unw_hdr_alloc(unsigned long sz)
+{
+	return kmalloc(sz, GFP_KERNEL);
+}
 
 static struct unwind_table *last_table;
 
Signature · 1 line
2.20.0
#1 lore raw
Quoted 1 line · Arnd Bergmann

As kernelci.org reports,

Curious, how are you getting these reports ? I want to see as well.

Quoted 9 lines

this function is not used in
vdk_hs38_defconfig:

arch/arc/kernel/unwind.c:188:14: warning: 'unw_hdr_alloc' defined but not used [-Wunused-function]

Fixes bc79c9a72165 ("ARC: dw2 unwind: Reinstante unwinding out of modules")
Cc stable at vger.kernel.org
Signed-off-by Arnd Bergmann <arnd at arndb.de>

Thx, do you want me to pick this up via arc tree.

Thx,
-Vineet