tree:
https://github.com/bvanassche/linux scsi-for-next
head: 47b28e8732867c0cef71c6fdde6afbc886d488ac
commit: 49cbab92c64076c9137917d56c317650038e4900 [30/37] Introduce struct scsi_status
config: riscv-randconfig-r024-20210413 (attached as .config)
compiler: clang version 13.0.0 (
https://github.com/llvm/llvm-project
9829f5e6b1bca9b61efc629770d28bb9014dec45)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
#
https://github.com/bvanassche/linux/commit/49cbab92c64076c9137917d56c3176...
git remote add bvanassche
https://github.com/bvanassche/linux
git fetch --no-tags bvanassche scsi-for-next
git checkout 49cbab92c64076c9137917d56c317650038e4900
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
> drivers/staging/rts5208/rtsx.c:137:15: error: assigning to
'struct scsi_status' from incompatible type 'int'
srb->result = DID_NO_CONNECT << 16;
^ ~~~~~~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx.c:380:22: error: assigning to 'struct scsi_status'
from incompatible type 'int'
chip->srb->result = DID_ABORT << 16;
^ ~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx.c:391:22: error: assigning to 'struct scsi_status'
from incompatible type 'int'
chip->srb->result = DID_ERROR << 16;
^ ~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx.c:401:22: error: assigning to 'struct scsi_status'
from incompatible type 'int'
chip->srb->result = DID_BAD_TARGET << 16;
^ ~~~~~~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx.c:408:22: error: assigning to 'struct scsi_status'
from incompatible type 'int'
chip->srb->result = DID_BAD_TARGET << 16;
^ ~~~~~~~~~~~~~~~~~~~~
> drivers/staging/rts5208/rtsx.c:425:30: error: invalid operands to
binary expression ('struct scsi_status' and 'int')
else if (chip->srb->result != DID_ABORT << 16) {
~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
^~~~
> drivers/staging/rts5208/rtsx.c:425:30: error: invalid operands to
binary expression ('struct scsi_status' and 'int')
else if (chip->srb->result != DID_ABORT << 16) {
~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
^~~~
> drivers/staging/rts5208/rtsx.c:425:30: error: invalid operands to
binary expression ('struct scsi_status' and 'int')
else if (chip->srb->result != DID_ABORT << 16) {
~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~
include/linux/compiler.h:56:47: note: expanded from macro 'if'
#define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
^~~~
include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) :
__trace_if_value(cond))
^~~~
include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
(cond) ? \
^~~~
drivers/staging/rts5208/rtsx.c:636:21: error: assigning to 'struct scsi_status'
from incompatible type 'int'
chip->srb->result = DID_NO_CONNECT << 16;
^ ~~~~~~~~~~~~~~~~~~~~
9 errors generated.
--
> drivers/staging/rts5208/rtsx_transport.c:163:15: error: assigning
to 'struct scsi_status' from incompatible type 'int'
srb->result = DID_ABORT << 16;
^ ~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx_transport.c:170:15: error: assigning to 'struct
scsi_status' from incompatible type 'int'
srb->result = DID_ERROR << 16;
^ ~~~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx_transport.c:174:14: error: assigning to 'struct
scsi_status' from incompatible type 'int'
srb->result = SAM_STAT_GOOD;
^ ~~~~~~~~~~~~~
drivers/staging/rts5208/rtsx_transport.c:183:15: error: assigning to 'struct
scsi_status' from incompatible type 'int'
srb->result = SAM_STAT_CHECK_CONDITION;
^ ~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
vim +137 drivers/staging/rts5208/rtsx.c
fa590c222fbaa4 Micky Ching 2013-11-12 106
fa590c222fbaa4 Micky Ching 2013-11-12 107
/***********************************************************************
fa590c222fbaa4 Micky Ching 2013-11-12 108 * /proc/scsi/ functions
fa590c222fbaa4 Micky Ching 2013-11-12 109
***********************************************************************/
fa590c222fbaa4 Micky Ching 2013-11-12 110
fa590c222fbaa4 Micky Ching 2013-11-12 111 /* we use this macro to help us write into
the buffer */
fa590c222fbaa4 Micky Ching 2013-11-12 112 #undef SPRINTF
fa590c222fbaa4 Micky Ching 2013-11-12 113 #define SPRINTF(args...) \
7e0ea476edb59f Wayne Porter 2016-10-11 114 do { \
7e0ea476edb59f Wayne Porter 2016-10-11 115 if (pos < buffer + length) \
7e0ea476edb59f Wayne Porter 2016-10-11 116 pos += sprintf(pos, ## args); \
7e0ea476edb59f Wayne Porter 2016-10-11 117 } while (0)
fa590c222fbaa4 Micky Ching 2013-11-12 118
fa590c222fbaa4 Micky Ching 2013-11-12 119 /* queue a command */
fa590c222fbaa4 Micky Ching 2013-11-12 120 /* This is always called with
scsi_lock(host) held */
fa590c222fbaa4 Micky Ching 2013-11-12 121 static int queuecommand_lck(struct
scsi_cmnd *srb,
fa590c222fbaa4 Micky Ching 2013-11-12 122 void (*done)(struct scsi_cmnd *))
fa590c222fbaa4 Micky Ching 2013-11-12 123 {
fa590c222fbaa4 Micky Ching 2013-11-12 124 struct rtsx_dev *dev =
host_to_rtsx(srb->device->host);
fa590c222fbaa4 Micky Ching 2013-11-12 125 struct rtsx_chip *chip = dev->chip;
fa590c222fbaa4 Micky Ching 2013-11-12 126
fa590c222fbaa4 Micky Ching 2013-11-12 127 /* check for state-transition errors */
8bee668de51b7c Sandhya Bankar 2016-09-19 128 if (chip->srb) {
651cd163ba0380 Haneen Mohammed 2015-03-06 129 dev_err(&dev->pci->dev,
"Error: chip->srb = %p\n",
651cd163ba0380 Haneen Mohammed 2015-03-06 130 chip->srb);
fa590c222fbaa4 Micky Ching 2013-11-12 131 return SCSI_MLQUEUE_HOST_BUSY;
fa590c222fbaa4 Micky Ching 2013-11-12 132 }
fa590c222fbaa4 Micky Ching 2013-11-12 133
fa590c222fbaa4 Micky Ching 2013-11-12 134 /* fail the command if we are
disconnecting */
fa590c222fbaa4 Micky Ching 2013-11-12 135 if (rtsx_chk_stat(chip,
RTSX_STAT_DISCONNECT)) {
fa590c222fbaa4 Micky Ching 2013-11-12 136 dev_info(&dev->pci->dev,
"Fail command during disconnect\n");
fa590c222fbaa4 Micky Ching 2013-11-12 @137 srb->result = DID_NO_CONNECT <<
16;
fa590c222fbaa4 Micky Ching 2013-11-12 138 done(srb);
fa590c222fbaa4 Micky Ching 2013-11-12 139 return 0;
fa590c222fbaa4 Micky Ching 2013-11-12 140 }
fa590c222fbaa4 Micky Ching 2013-11-12 141
fa590c222fbaa4 Micky Ching 2013-11-12 142 /* enqueue the command and wake up the
control thread */
fa590c222fbaa4 Micky Ching 2013-11-12 143 srb->scsi_done = done;
fa590c222fbaa4 Micky Ching 2013-11-12 144 chip->srb = srb;
fa590c222fbaa4 Micky Ching 2013-11-12 145 complete(&dev->cmnd_ready);
fa590c222fbaa4 Micky Ching 2013-11-12 146
fa590c222fbaa4 Micky Ching 2013-11-12 147 return 0;
fa590c222fbaa4 Micky Ching 2013-11-12 148 }
fa590c222fbaa4 Micky Ching 2013-11-12 149
:::::: The code at line 137 was first introduced by commit
:::::: fa590c222fbaa428edb2ce2194638906cea1400a staging: rts5208: add support for rts5208
and rts5288
:::::: TO: Micky Ching <micky_ching(a)realsil.com.cn>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org