arch/sh/boot/compressed/../../lib/ashldi3.c:6:11: warning: no previous prototype for '__ashldi3'

From: kernel test robot
Date: Fri Nov 19 2021 - 01:50:54 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 4c388a8e740d3235a194f330c8ef327deef710f6
commit: 7fe859eef99b6fac655416d5bb01c82bd0da2ada sh: boot: avoid unneeded rebuilds under arch/sh/boot/compressed/
date: 9 weeks ago
config: sh-randconfig-r015-20211116 (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7fe859eef99b6fac655416d5bb01c82bd0da2ada
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7fe859eef99b6fac655416d5bb01c82bd0da2ada
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from arch/sh/boot/compressed/ashldi3.c:2:
>> arch/sh/boot/compressed/../../lib/ashldi3.c:6:11: warning: no previous prototype for '__ashldi3' [-Wmissing-prototypes]
6 | long long __ashldi3(long long u, word_type b)
| ^~~~~~~~~


vim +/__ashldi3 +6 arch/sh/boot/compressed/../../lib/ashldi3.c

1aad54a99b6ce3 Paul Mundt 2008-11-18 5
1aad54a99b6ce3 Paul Mundt 2008-11-18 @6 long long __ashldi3(long long u, word_type b)
1aad54a99b6ce3 Paul Mundt 2008-11-18 7 {
1aad54a99b6ce3 Paul Mundt 2008-11-18 8 DWunion uu, w;
1aad54a99b6ce3 Paul Mundt 2008-11-18 9 word_type bm;
1aad54a99b6ce3 Paul Mundt 2008-11-18 10
1aad54a99b6ce3 Paul Mundt 2008-11-18 11 if (b == 0)
1aad54a99b6ce3 Paul Mundt 2008-11-18 12 return u;
1aad54a99b6ce3 Paul Mundt 2008-11-18 13
1aad54a99b6ce3 Paul Mundt 2008-11-18 14 uu.ll = u;
1aad54a99b6ce3 Paul Mundt 2008-11-18 15 bm = 32 - b;
1aad54a99b6ce3 Paul Mundt 2008-11-18 16
1aad54a99b6ce3 Paul Mundt 2008-11-18 17 if (bm <= 0) {
1aad54a99b6ce3 Paul Mundt 2008-11-18 18 w.s.low = 0;
1aad54a99b6ce3 Paul Mundt 2008-11-18 19 w.s.high = (unsigned int) uu.s.low << -bm;
1aad54a99b6ce3 Paul Mundt 2008-11-18 20 } else {
1aad54a99b6ce3 Paul Mundt 2008-11-18 21 const unsigned int carries = (unsigned int) uu.s.low >> bm;
1aad54a99b6ce3 Paul Mundt 2008-11-18 22
1aad54a99b6ce3 Paul Mundt 2008-11-18 23 w.s.low = (unsigned int) uu.s.low << b;
1aad54a99b6ce3 Paul Mundt 2008-11-18 24 w.s.high = ((unsigned int) uu.s.high << b) | carries;
1aad54a99b6ce3 Paul Mundt 2008-11-18 25 }
1aad54a99b6ce3 Paul Mundt 2008-11-18 26
1aad54a99b6ce3 Paul Mundt 2008-11-18 27 return w.ll;
1aad54a99b6ce3 Paul Mundt 2008-11-18 28 }
1aad54a99b6ce3 Paul Mundt 2008-11-18 29

:::::: The code at line 6 was first introduced by commit
:::::: 1aad54a99b6ce316c851ba99b2efe41998cfd37d sh: Migrate necessary libgcc bits in to arch/sh/lib for SUPERH32.

:::::: TO: Paul Mundt <lethal@xxxxxxxxxxxx>
:::::: CC: Paul Mundt <lethal@xxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip