drivers/scsi/arm/fas216.c:2013:47: error: use of undeclared identifier 'GOOD'

From: kernel test robot
Date: Sat Jul 10 2021 - 01:27:34 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 50be9417e23af5a8ac860d998e1e3f06b8fd79d7
commit: 3d45cefc8edd7f560e6c97a8d9928ad571f76dec scsi: core: Drop obsolete Linux-specific SCSI status codes
date: 6 weeks ago
config: arm-randconfig-r004-20210705 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 3f9bf9f42a9043e20c6d2a74dd4f47a90a7e2b41)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3d45cefc8edd7f560e6c97a8d9928ad571f76dec
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 3d45cefc8edd7f560e6c97a8d9928ad571f76dec
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=arm SHELL=/bin/bash drivers/scsi/arm/

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

All errors (new ones prefixed by >>):

>> drivers/scsi/arm/fas216.c:2013:47: error: use of undeclared identifier 'GOOD'
if (result != DID_OK || SCpnt->SCp.Status != GOOD)
^
>> drivers/scsi/arm/fas216.c:2013:47: error: use of undeclared identifier 'GOOD'
>> drivers/scsi/arm/fas216.c:2013:47: error: use of undeclared identifier 'GOOD'
3 errors generated.


vim +/GOOD +2013 drivers/scsi/arm/fas216.c

^1da177e4c3f41 Linus Torvalds 2005-04-16 1997
^1da177e4c3f41 Linus Torvalds 2005-04-16 1998 /**
^1da177e4c3f41 Linus Torvalds 2005-04-16 1999 * fas216_rq_sns_done - Finish processing automatic request sense command
^1da177e4c3f41 Linus Torvalds 2005-04-16 2000 * @info: interface that completed
^1da177e4c3f41 Linus Torvalds 2005-04-16 2001 * @SCpnt: command that completed
^1da177e4c3f41 Linus Torvalds 2005-04-16 2002 * @result: driver byte of result
^1da177e4c3f41 Linus Torvalds 2005-04-16 2003 *
^1da177e4c3f41 Linus Torvalds 2005-04-16 2004 * Finish processing automatic request sense command
^1da177e4c3f41 Linus Torvalds 2005-04-16 2005 */
ee0ca6bab394fe Henrik Kretzschmar 2006-10-01 2006 static void fas216_rq_sns_done(FAS216_Info *info, struct scsi_cmnd *SCpnt,
ee0ca6bab394fe Henrik Kretzschmar 2006-10-01 2007 unsigned int result)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2008 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2009 fas216_log_target(info, LOG_CONNECT, SCpnt->device->id,
^1da177e4c3f41 Linus Torvalds 2005-04-16 2010 "request sense complete, result=0x%04x%02x%02x",
^1da177e4c3f41 Linus Torvalds 2005-04-16 2011 result, SCpnt->SCp.Message, SCpnt->SCp.Status);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2012
^1da177e4c3f41 Linus Torvalds 2005-04-16 @2013 if (result != DID_OK || SCpnt->SCp.Status != GOOD)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2014 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2015 * Something went wrong. Make sure that we don't
^1da177e4c3f41 Linus Torvalds 2005-04-16 2016 * have valid data in the sense buffer that could
^1da177e4c3f41 Linus Torvalds 2005-04-16 2017 * confuse the higher levels.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2018 */
96d5eaa9bb74d2 Arnd Bergmann 2018-01-18 2019 memset(SCpnt->sense_buffer, 0, SCSI_SENSE_BUFFERSIZE);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2020 //printk("scsi%d.%c: sense buffer: ", info->host->host_no, '0' + SCpnt->device->id);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2021 //{ int i; for (i = 0; i < 32; i++) printk("%02x ", SCpnt->sense_buffer[i]); printk("\n"); }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2022 /*
^1da177e4c3f41 Linus Torvalds 2005-04-16 2023 * Note that we don't set SCpnt->result, since that should
^1da177e4c3f41 Linus Torvalds 2005-04-16 2024 * reflect the status of the command that we were asked by
^1da177e4c3f41 Linus Torvalds 2005-04-16 2025 * the upper layers to process. This would have been set
^1da177e4c3f41 Linus Torvalds 2005-04-16 2026 * correctly by fas216_std_done.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2027 */
ccf9ea91aba0d3 Boaz Harrosh 2007-09-10 2028 scsi_eh_restore_cmnd(SCpnt, &info->ses);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2029 SCpnt->scsi_done(SCpnt);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2030 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2031

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

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip