public inbox for linux-m68k@lists.linux-m68k.org
 help / color / mirror / Atom feed
* [PATCH 1/2] m68k: define __div64_32() to avoid a warning
@ 2023-08-09 21:10 Arnd Bergmann
  2023-08-09 21:10 ` [PATCH 2/2] m68k: add memcmp() declarartion Arnd Bergmann
  2023-08-16 15:33 ` [PATCH 1/2] m68k: define __div64_32() to avoid a warning Geert Uytterhoeven
  0 siblings, 2 replies; 5+ messages in thread
From: Arnd Bergmann @ 2023-08-09 21:10 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Arnd Bergmann, linux-m68k, linux-kernel

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-08-16 15:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-09 21:10 [PATCH 1/2] m68k: define __div64_32() to avoid a warning Arnd Bergmann
2023-08-09 21:10 ` [PATCH 2/2] m68k: add memcmp() declarartion Arnd Bergmann
2023-08-09 21:28   ` John Paul Adrian Glaubitz
2023-08-16 15:42   ` Geert Uytterhoeven
2023-08-16 15:33 ` [PATCH 1/2] m68k: define __div64_32() to avoid a warning Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox