lkml.org 
[lkml]   [2023]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] m68k: define __div64_32() to avoid a warning
Date
From: Arnd Bergmann <arnd@arndb.de>

The generic __div64_32() definition is built on all architectures that don't
provide this as a macro. m68k however neither defines nor requires __div64_32,
so it should define an empty one to avoid the warning:

lib/math/div64.c:31:32: error: no previous prototype for '__div64_32' [-Werror=missing-prototypes]

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
arch/m68k/include/asm/div64.h | 3 +++
1 file changed, 3 insertions(+)

diff --git a/arch/m68k/include/asm/div64.h b/arch/m68k/include/asm/div64.h
index 365f39f5e256f..df1f6b450cc51 100644
--- a/arch/m68k/include/asm/div64.h
+++ b/arch/m68k/include/asm/div64.h
@@ -31,6 +31,9 @@
__rem; \
})

+/* defining this stops the unused helper function from being built */
+#define __div64_32 __div64_32
+
#endif /* CONFIG_CPU_HAS_NO_MULDIV64 */

#endif /* _M68K_DIV64_H */
--
2.39.2
\
 
 \ /
  Last update: 2023-08-09 23:11    [W:0.076 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site