]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: armv8: Fix warning about redeclaring global functions as weak
authorTom Rini <trini@konsulko.com>
Tue, 29 Jun 2021 23:33:04 +0000 (19:33 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 9 Jul 2021 16:15:41 +0000 (12:15 -0400)
As seen with clang-12:
warning: __asm_invalidate_l3_dcache changed binding to STB_WEAK

As we indeed use ENTRY and then declare the function weak manually.  Use
the WEAK declarative from <linux/linkage.h> instead.

Signed-off-by: Tom Rini <trini@konsulko.com>
arch/arm/cpu/armv8/cache.S

index 443d94c262a09d15b7358d5e27f236b9faf0d02a..e04907dd8c0bec90708c98f58934315b56707c0f 100644 (file)
@@ -188,27 +188,24 @@ ENDPROC(__asm_invalidate_icache_all)
 .popsection
 
 .pushsection .text.__asm_invalidate_l3_dcache, "ax"
-ENTRY(__asm_invalidate_l3_dcache)
+WEAK(__asm_invalidate_l3_dcache)
        mov     x0, #0                  /* return status as success */
        ret
 ENDPROC(__asm_invalidate_l3_dcache)
-       .weak   __asm_invalidate_l3_dcache
 .popsection
 
 .pushsection .text.__asm_flush_l3_dcache, "ax"
-ENTRY(__asm_flush_l3_dcache)
+WEAK(__asm_flush_l3_dcache)
        mov     x0, #0                  /* return status as success */
        ret
 ENDPROC(__asm_flush_l3_dcache)
-       .weak   __asm_flush_l3_dcache
 .popsection
 
 .pushsection .text.__asm_invalidate_l3_icache, "ax"
-ENTRY(__asm_invalidate_l3_icache)
+WEAK(__asm_invalidate_l3_icache)
        mov     x0, #0                  /* return status as success */
        ret
 ENDPROC(__asm_invalidate_l3_icache)
-       .weak   __asm_invalidate_l3_icache
 .popsection
 
 /*