Message ID | 5cdbe08296693dd53849f199c3933e16e97b33c1.1682088593.git.geert+renesas@glider.be (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | libgcc: Add forward declarations for generic library routines | expand |
On Fri, Apr 21, 2023, at 16:54, Geert Uytterhoeven wrote: > With W=1 on platforms that use the generic gcc library routines > (csky/loongarch/mips/riscv/sh/xtensa): > > Reported-by: kernel test robot <lkp@intel.com> > Link: https://lore.kernel.org/oe-kbuild-all/202303272214.RxzpA6bP-lkp@intel.com/ > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Nice, this is one I don't have in my series, Acked-by: Arnd Bergmann <arnd@arndb.de> I have patches for a lot of other missing prototype warnings, plan to send them out after -rc1. Arnd
On Fri, 21 Apr 2023 13:38:52 PDT (-0700), Arnd Bergmann wrote: > On Fri, Apr 21, 2023, at 16:54, Geert Uytterhoeven wrote: >> With W=1 on platforms that use the generic gcc library routines >> (csky/loongarch/mips/riscv/sh/xtensa): >> >> Reported-by: kernel test robot <lkp@intel.com> >> Link: https://lore.kernel.org/oe-kbuild-all/202303272214.RxzpA6bP-lkp@intel.com/ >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > > Nice, this is one I don't have in my series, > > Acked-by: Arnd Bergmann <arnd@arndb.de> > > I have patches for a lot of other missing prototype warnings, plan > to send them out after -rc1. Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> I think I've merged some stuff around here before, but it's probably better for some more generic tree? LMK if you guys wanted me to pick these up, though, I've got a smattering of small stuff already so I'll have another PR either way.
Hi Palmer, On Sat, Apr 29, 2023 at 10:20 PM Palmer Dabbelt <palmer@dabbelt.com> wrote: > On Fri, 21 Apr 2023 13:38:52 PDT (-0700), Arnd Bergmann wrote: > > On Fri, Apr 21, 2023, at 16:54, Geert Uytterhoeven wrote: > >> With W=1 on platforms that use the generic gcc library routines > >> (csky/loongarch/mips/riscv/sh/xtensa): > >> > >> Reported-by: kernel test robot <lkp@intel.com> > >> Link: https://lore.kernel.org/oe-kbuild-all/202303272214.RxzpA6bP-lkp@intel.com/ > >> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> > > > > Nice, this is one I don't have in my series, > > > > Acked-by: Arnd Bergmann <arnd@arndb.de> > > > > I have patches for a lot of other missing prototype warnings, plan > > to send them out after -rc1. > > Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com> > Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Thanks! > I think I've merged some stuff around here before, but it's probably > better for some more generic tree? LMK if you guys wanted me to pick > these up, though, I've got a smattering of small stuff already so I'll > have another PR either way. Too late ;-) Already upstream via akpm's tree. Gr{oetje,eeting}s, Geert
Hello: This patch was applied to riscv/linux.git (fixes) by Andrew Morton <akpm@linux-foundation.org>: On Fri, 21 Apr 2023 16:54:24 +0200 you wrote: > With W=1 on platforms that use the generic gcc library routines > (csky/loongarch/mips/riscv/sh/xtensa): > > lib/ashldi3.c:9:19: warning: no previous prototype for '__ashldi3' [-Wmissing-prototypes] > 9 | long long notrace __ashldi3(long long u, word_type b) > | ^~~~~~~~~ > CC lib/ashrdi3.o > lib/ashrdi3.c:9:19: warning: no previous prototype for '__ashrdi3' [-Wmissing-prototypes] > 9 | long long notrace __ashrdi3(long long u, word_type b) > | ^~~~~~~~~ > CC lib/cmpdi2.o > lib/cmpdi2.c:9:19: warning: no previous prototype for '__cmpdi2' [-Wmissing-prototypes] > 9 | word_type notrace __cmpdi2(long long a, long long b) > | ^~~~~~~~ > CC lib/lshrdi3.o > lib/lshrdi3.c:9:19: warning: no previous prototype for '__lshrdi3' [-Wmissing-prototypes] > 9 | long long notrace __lshrdi3(long long u, word_type b) > | ^~~~~~~~~ > CC lib/muldi3.o > lib/muldi3.c:49:19: warning: no previous prototype for '__muldi3' [-Wmissing-prototypes] > 49 | long long notrace __muldi3(long long u, long long v) > | ^~~~~~~~ > CC lib/ucmpdi2.o > lib/ucmpdi2.c:8:19: warning: no previous prototype for '__ucmpdi2' [-Wmissing-prototypes] > 8 | word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b) > | ^~~~~~~~~ > > [...] Here is the summary with links: - libgcc: Add forward declarations for generic library routines https://git.kernel.org/riscv/c/4f20b7471c57 You are awesome, thank you!
diff --git a/include/linux/libgcc.h b/include/linux/libgcc.h index b8dc75f0c8308bd4..fc388da6a027faaf 100644 --- a/include/linux/libgcc.h +++ b/include/linux/libgcc.h @@ -27,4 +27,11 @@ typedef union { long long ll; } DWunion; +long long notrace __ashldi3(long long u, word_type b); +long long notrace __ashrdi3(long long u, word_type b); +word_type notrace __cmpdi2(long long a, long long b); +long long notrace __lshrdi3(long long u, word_type b); +long long notrace __muldi3(long long u, long long v); +word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b); + #endif /* __ASM_LIBGCC_H */
With W=1 on platforms that use the generic gcc library routines (csky/loongarch/mips/riscv/sh/xtensa): lib/ashldi3.c:9:19: warning: no previous prototype for '__ashldi3' [-Wmissing-prototypes] 9 | long long notrace __ashldi3(long long u, word_type b) | ^~~~~~~~~ CC lib/ashrdi3.o lib/ashrdi3.c:9:19: warning: no previous prototype for '__ashrdi3' [-Wmissing-prototypes] 9 | long long notrace __ashrdi3(long long u, word_type b) | ^~~~~~~~~ CC lib/cmpdi2.o lib/cmpdi2.c:9:19: warning: no previous prototype for '__cmpdi2' [-Wmissing-prototypes] 9 | word_type notrace __cmpdi2(long long a, long long b) | ^~~~~~~~ CC lib/lshrdi3.o lib/lshrdi3.c:9:19: warning: no previous prototype for '__lshrdi3' [-Wmissing-prototypes] 9 | long long notrace __lshrdi3(long long u, word_type b) | ^~~~~~~~~ CC lib/muldi3.o lib/muldi3.c:49:19: warning: no previous prototype for '__muldi3' [-Wmissing-prototypes] 49 | long long notrace __muldi3(long long u, long long v) | ^~~~~~~~ CC lib/ucmpdi2.o lib/ucmpdi2.c:8:19: warning: no previous prototype for '__ucmpdi2' [-Wmissing-prototypes] 8 | word_type notrace __ucmpdi2(unsigned long long a, unsigned long long b) | ^~~~~~~~~ Fix this by adding forward declarations to the common libgcc header file. Reported-by: kernel test robot <lkp@intel.com> Link: https://lore.kernel.org/oe-kbuild-all/202303272214.RxzpA6bP-lkp@intel.com/ Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- include/linux/libgcc.h | 7 +++++++ 1 file changed, 7 insertions(+)