m68k: define __div64_32() to avoid a warning
PATCH 1/2 m68k: define __div64_32() to avoid a warning
From: Arnd Bergmann <[email protected]>
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]
--- arch/m68k/include/asm/div64.h | 3 +++ 1 file changed, 3 insertions(+)
arch/m68k/include/asm/div64.h +3 -0
@@ -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 */
Signature · 1 line
2.39.2
PATCH 2/2 m68k: add memcmp() declarartion
From: Arnd Bergmann <[email protected]>
There is a global definition of memcmp() that gets built on m68k but is never used and causes a warning because of the missing prototype:
lib/string.c:671:15: error: no previous prototype for 'memcmp' [-Werror=missing-prototypes]
Add the corresponding declaration to avoid the warning. As far as I understand the #define to redirect memcmp() to __builtin_memcmp() does not actually do anything here since this is what it does anyway.
--- arch/m68k/include/asm/string.h | 1 + 1 file changed, 1 insertion(+)
arch/m68k/include/asm/string.h +1 -0
@@ -41,6 +41,7 @@ static inline char *strncpy(char *dest, const char *src, size_t n)#define __HAVE_ARCH_MEMMOVEextern void *memmove (void *,const void *,__kernel_size_t ); +extern int memcmp (const void *,const void *,__kernel_size_t );#define memcmp (d, s, n) __builtin_memcmp(d, s, n)#define __HAVE_ARCH_MEMSET
Signature · 1 line
2.39.2
Re: [PATCH 2/2] m68k: add memcmp() declarartion
Hi Arnd!
Quoted 5 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is a global definition of
memcmp()that gets built on m68k but is never used and causes a warning because of the missing prototype:
Quoted 7 lines
lib/string.c:671:15: error: no previous prototype for 'memcmp' [-Werror=missing-prototypes]Add the corresponding declaration to avoid the warning. As far as I understand the #define to redirect
memcmp()to__builtin_memcmp()does not actually do anything here since this is what it does anyway.Signed-off-by Arnd Bergmann <[email protected]>
Can you fix the typo in the subject?
s/declarartion/declaration/
Thanks,
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Re: [PATCH 2/2] m68k: add memcmp() declarartion
In reply to Arnd BergmannHi Arnd,
Quoted 10 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
There is a global definition of
memcmp()that gets built on m68k but is never used and causes a warning because of the missing prototype:
lib/string.c:671:15: error: no previous prototype for 'memcmp' [-Werror=missing-prototypes]Add the corresponding declaration to avoid the warning. As far as I understand the #define to redirect
memcmp()to__builtin_memcmp()does not actually do anything here since this is what it does anyway.
I believe it does with -ffreestanding?
So if you don't mind, I'd like to apply this with that sentence removed.
x86 also still has that define in string_32.h. Andi dropped it for amd64 in commit 6edfba1b33c70110 ("[PATCH] x86_64: Don't define string functions to builtin") in v2.6.17.
Quoted 1 line
Signed-off-by Arnd Bergmann <[email protected]>
i.e. will queue in the m68k for-v6.6 branch, with the obvious typo fixed.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Quoted 9 lines · Arnd Bergmann
From: Arnd Bergmann <[email protected]>
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 <[email protected]>
Nice! 142 bytes saved (which do not show up with bloat-o-meter, as it does not count weak symbols; patch sent).
i.e. will queue in the m68k for-v6.6 branch.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds