arch/sh/kernel/traps_32.c:565:5: warning: no previous prototype for 'is_dsp_inst'

kernel test robot
2021-11-16T22:01:31Z

[-- Attachment #1: Type: text/plain, Size: 4565 bytes --]

tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8ab774587903771821b59471cc723bba6d893942
commit: ccbb5239d495923cb24b84a73eb814626c5bfa57 sh: remove -Werror from Makefiles
date: 1 year, 3 months ago
config: sh-randconfig-r031-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=ccbb5239d495923cb24b84a73eb814626c5bfa57
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout ccbb5239d495923cb24b84a73eb814626c5bfa57
# 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@intel.com>

All warnings (new ones prefixed by >>):

>> arch/sh/kernel/traps_32.c:565:5: warning: no previous prototype for 'is_dsp_inst' [-Wmissing-prototypes]
565 | int is_dsp_inst(struct pt_regs *regs)
| ^~~~~~~~~~~
arch/sh/kernel/traps_32.c:729:6: warning: no previous prototype for 'per_cpu_trap_init' [-Wmissing-prototypes]
729 | void per_cpu_trap_init(void)
| ^~~~~~~~~~~~~~~~~

vim +/is_dsp_inst +565 arch/sh/kernel/traps_32.c

^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 560
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 561 #ifdef CONFIG_SH_DSP
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 562 /*
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 563 * SH-DSP support gerg@snapgear.com.
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 564 */
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 @565 int is_dsp_inst(struct pt_regs *regs)
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 566 {
882c12c4e1a95e arch/sh/kernel/traps.c Paul Mundt 2007-05-14 567 unsigned short inst = 0;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 568
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 569 /*
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 570 * Safe guard if DSP mode is already enabled or we're lacking
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 571 * the DSP altogether.
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 572 */
11c1965687b0a4 arch/sh/kernel/traps.c Paul Mundt 2006-12-25 573 if (!(current_cpu_data.flags & CPU_HAS_DSP) || (regs->sr & SR_DSP))
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 574 return 0;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 575
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 576 get_user(inst, ((unsigned short *) regs->pc));
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 577
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 578 inst &= 0xf000;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 579
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 580 /* Check for any type of DSP or support instruction */
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 581 if ((inst == 0xf000) || (inst == 0x4000))
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 582 return 1;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 583
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 584 return 0;
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 585 }
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 586 #else
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 587 #define is_dsp_inst(regs) (0)
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 588 #endif /* CONFIG_SH_DSP */
^1da177e4c3f41 arch/sh/kernel/traps.c Linus Torvalds 2005-04-16 589

:::::: The code at line 565 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds@ppc970.osdl.org>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 26802 bytes --]