diff mbox series

[06/10] socfpga: Mark socfpga_fpga_add() as static inline in the non-FPGA case

Message ID 20200514123009.5721-6-trini@konsulko.com
State Accepted
Commit 6ca300aec0652661f2dd28c9976f9ecb6a338b77
Headers show
Series [01/10] kconfiglib: Update to the 14.1.0 release | expand

Commit Message

Tom Rini May 14, 2020, 12:30 p.m. UTC
Unless we mark the function as 'static inline' it may end up being
non-inlined by the compiled and result in duplicate functions.

Cc: Marek Vasut <marex at denx.de>
Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
Cc: Ley Foon Tan <ley.foon.tan at intel.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
 arch/arm/mach-socfpga/include/mach/misc.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Marek Vasut May 14, 2020, 12:52 p.m. UTC | #1
On 5/14/20 2:30 PM, Tom Rini wrote:
> Unless we mark the function as 'static inline' it may end up being
> non-inlined by the compiled and result in duplicate functions.
> 
> Cc: Marek Vasut <marex at denx.de>
> Cc: Simon Goldschmidt <simon.k.r.goldschmidt at gmail.com>
> Cc: Ley Foon Tan <ley.foon.tan at intel.com>
> Signed-off-by: Tom Rini <trini at konsulko.com>

Acked-by: Marek Vasut <marex at denx.de>
diff mbox series

Patch

diff --git a/arch/arm/mach-socfpga/include/mach/misc.h b/arch/arm/mach-socfpga/include/mach/misc.h
index f6de1ccb4a01..a85c5aeef955 100644
--- a/arch/arm/mach-socfpga/include/mach/misc.h
+++ b/arch/arm/mach-socfpga/include/mach/misc.h
@@ -20,7 +20,7 @@  extern struct bsel bsel_str[];
 #ifdef CONFIG_FPGA
 void socfpga_fpga_add(void *fpga_desc);
 #else
-inline void socfpga_fpga_add(void *fpga_desc) {}
+static inline void socfpga_fpga_add(void *fpga_desc) {}
 #endif
 
 #ifdef CONFIG_TARGET_SOCFPGA_GEN5