arch/powerpc/kernel/traps.c:1160:19: error: unused function '__parse_fpscr'

From: kernel test robot
Date: Thu Feb 18 2021 - 03:33:28 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f40ddce88593482919761f74910f42f4b84c004b
commit: 7d68c89169508064c460a1208f38ed0589d226fa powerpc/32s: Allow deselecting CONFIG_PPC_FPU on mpc832x
date: 3 months ago
config: powerpc-randconfig-r026-20210218 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c9439ca36342fb6013187d0a69aef92736951476)
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
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d68c89169508064c460a1208f38ed0589d226fa
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 7d68c89169508064c460a1208f38ed0589d226fa
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc

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

All errors (new ones prefixed by >>):

>> arch/powerpc/kernel/traps.c:1160:19: error: unused function '__parse_fpscr' [-Werror,-Wunused-function]
static inline int __parse_fpscr(unsigned long fpscr)
^
1 error generated.

Kconfig warnings: (for reference only)
WARNING: unmet direct dependencies detected for LEDS_TRIGGER_DISK
Depends on NEW_LEDS && LEDS_TRIGGERS && (IDE_GD_ATA || ATA
Selected by
- ADB_PMU_LED_DISK && MACINTOSH_DRIVERS && ADB_PMU_LED && LEDS_CLASS


vim +/__parse_fpscr +1160 arch/powerpc/kernel/traps.c

14cf11af6cf608 Paul Mackerras 2005-09-26 1159
5fad293bcbd48d Kumar Gala 2007-02-07 @1160 static inline int __parse_fpscr(unsigned long fpscr)
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1161 {
aeb1c0f6ff18f5 Eric W. Biederman 2018-04-17 1162 int ret = FPE_FLTUNK;
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1163
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1164 /* Invalid operation */
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1165 if ((fpscr & FPSCR_VE) && (fpscr & FPSCR_VX))
5fad293bcbd48d Kumar Gala 2007-02-07 1166 ret = FPE_FLTINV;
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1167
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1168 /* Overflow */
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1169 else if ((fpscr & FPSCR_OE) && (fpscr & FPSCR_OX))
5fad293bcbd48d Kumar Gala 2007-02-07 1170 ret = FPE_FLTOVF;
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1171
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1172 /* Underflow */
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1173 else if ((fpscr & FPSCR_UE) && (fpscr & FPSCR_UX))
5fad293bcbd48d Kumar Gala 2007-02-07 1174 ret = FPE_FLTUND;
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1175
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1176 /* Divide by zero */
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1177 else if ((fpscr & FPSCR_ZE) && (fpscr & FPSCR_ZX))
5fad293bcbd48d Kumar Gala 2007-02-07 1178 ret = FPE_FLTDIV;
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1179
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1180 /* Inexact result */
dc1c1ca3dcd94c Stephen Rothwell 2005-10-01 1181 else if ((fpscr & FPSCR_XE) && (fpscr & FPSCR_XX))
5fad293bcbd48d Kumar Gala 2007-02-07 1182 ret = FPE_FLTRES;
5fad293bcbd48d Kumar Gala 2007-02-07 1183
5fad293bcbd48d Kumar Gala 2007-02-07 1184 return ret;
5fad293bcbd48d Kumar Gala 2007-02-07 1185 }
5fad293bcbd48d Kumar Gala 2007-02-07 1186

:::::: The code at line 1160 was first introduced by commit
:::::: 5fad293bcbd48d9a2370020cf60e4b4a42559b12 [POWERPC] Fixup error handling when emulating a floating point instruction

:::::: TO: Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx>
:::::: CC: Kumar Gala <galak@xxxxxxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip