Re: [PATCH 09/24] scsi: Kill obsolete linux-specific status codes

2019-10-21 Thread kbuild test robot
Hi Hannes,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[cannot apply to v5.4-rc4 next-20191021]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-Revamp-result-values/20191022-004918
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   drivers/scsi/ibmvscsi/ibmvscsi.c: In function 'handle_cmd_rsp':
>> drivers/scsi/ibmvscsi/ibmvscsi.c:989:39: error: 'CHECK_CONDITION' undeclared 
>> (first use in this function); did you mean 'H_MR_CONDITION'?
  if (((cmnd->result >> 1) & 0x1f) == CHECK_CONDITION)
  ^~~
  H_MR_CONDITION
   drivers/scsi/ibmvscsi/ibmvscsi.c:989:39: note: each undeclared identifier is 
reported only once for each function it appears in

vim +989 drivers/scsi/ibmvscsi/ibmvscsi.c

^1da177e4c3f41 Linus Torvalds  2005-04-16   968  
^1da177e4c3f41 Linus Torvalds  2005-04-16   969  /**
^1da177e4c3f41 Linus Torvalds  2005-04-16   970   * handle_cmd_rsp: -  Handle 
responses from commands
^1da177e4c3f41 Linus Torvalds  2005-04-16   971   * @evt_struct:
srp_event_struct to be handled
^1da177e4c3f41 Linus Torvalds  2005-04-16   972   *
^1da177e4c3f41 Linus Torvalds  2005-04-16   973   * Used as a callback by when 
sending scsi cmds.
^1da177e4c3f41 Linus Torvalds  2005-04-16   974   * Gets called by 
ibmvscsi_handle_crq()
^1da177e4c3f41 Linus Torvalds  2005-04-16   975  */
^1da177e4c3f41 Linus Torvalds  2005-04-16   976  static void 
handle_cmd_rsp(struct srp_event_struct *evt_struct)
^1da177e4c3f41 Linus Torvalds  2005-04-16   977  {
^1da177e4c3f41 Linus Torvalds  2005-04-16   978 struct srp_rsp *rsp = 
&evt_struct->xfer_iu->srp.rsp;
^1da177e4c3f41 Linus Torvalds  2005-04-16   979 struct scsi_cmnd *cmnd 
= evt_struct->cmnd;
^1da177e4c3f41 Linus Torvalds  2005-04-16   980  
ef265673434680 FUJITA Tomonori 2006-03-26   981 if 
(unlikely(rsp->opcode != SRP_RSP)) {
^1da177e4c3f41 Linus Torvalds  2005-04-16   982 if 
(printk_ratelimit())
6c0a60ec52042e Brian King  2007-06-13   983 
dev_warn(evt_struct->hostdata->dev,
15c9274699e8b6 Tyrel Datwyler  2016-12-07   984 
 "bad SRP RSP type %#02x\n", rsp->opcode);
^1da177e4c3f41 Linus Torvalds  2005-04-16   985 }
^1da177e4c3f41 Linus Torvalds  2005-04-16   986 
^1da177e4c3f41 Linus Torvalds  2005-04-16   987 if (cmnd) {
c3a3b55ae80a0d Brian King  2008-04-25   988 cmnd->result |= 
rsp->status;
^1da177e4c3f41 Linus Torvalds  2005-04-16  @989 if 
(((cmnd->result >> 1) & 0x1f) == CHECK_CONDITION)
^1da177e4c3f41 Linus Torvalds  2005-04-16   990 
memcpy(cmnd->sense_buffer,
ef265673434680 FUJITA Tomonori 2006-03-26   991
rsp->data,
72264eb6dbb909 Anton Blanchard 2013-09-03   992
be32_to_cpu(rsp->sense_data_len));
^1da177e4c3f41 Linus Torvalds  2005-04-16   993 
unmap_cmd_data(&evt_struct->iu.srp.cmd, 
4dddbc26c3895e James Bottomley 2005-09-06   994
evt_struct, 
^1da177e4c3f41 Linus Torvalds  2005-04-16   995
evt_struct->hostdata->dev);
^1da177e4c3f41 Linus Torvalds  2005-04-16   996  
ef265673434680 FUJITA Tomonori 2006-03-26   997 if (rsp->flags 
& SRP_RSP_FLAG_DOOVER)
72264eb6dbb909 Anton Blanchard 2013-09-03   998 
scsi_set_resid(cmnd,
72264eb6dbb909 Anton Blanchard 2013-09-03   999 
   be32_to_cpu(rsp->data_out_res_cnt));
ef265673434680 FUJITA Tomonori 2006-03-26  1000 else if 
(rsp->flags & SRP_RSP_FLAG_DIOVER)
72264eb6dbb909 Anton Blanchard 2013-09-03  1001 
scsi_set_resid(cmnd, be32_to_cpu(rsp->data_in_res_cnt));
^1da177e4c3f41 Linus Torvalds  2005-04-16  1002 }
^1da177e4c3f41 Linus Torvalds  2005-04-16  1003  
^1da177e4c3f41 Linus Torvalds  2005-04-16  1004 

Re: [PATCH 03/24] wd33c93: use SCSI status

2019-10-21 Thread kbuild test robot
Hi Hannes,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.4-rc4 next-20191021]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-Revamp-result-values/20191022-004918
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: m68k-multi_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=m68k 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   drivers/scsi/wd33c93.c: In function 'wd33c93_intr':
>> drivers/scsi/wd33c93.c:1297:19: warning: passing argument 1 of 
>> 'set_host_byte' makes pointer from integer without a cast [-Wint-conversion]
set_host_byte(cmd->result, DID_ERROR);
  ^~~
   In file included from drivers/scsi/wd33c93.c:79:0:
   include/scsi/scsi_cmnd.h:315:20: note: expected 'struct scsi_cmnd *' but 
argument is of type 'int'
static inline void set_host_byte(struct scsi_cmnd *cmd, char status)
   ^

vim +/set_host_byte +1297 drivers/scsi/wd33c93.c

  1200  
  1201  case CSR_SDP:
  1202  DB(DB_INTR, printk("SDP"))
  1203  hostdata->state = S_RUNNING_LEVEL2;
  1204  write_wd33c93(regs, WD_COMMAND_PHASE, 0x41);
  1205  write_wd33c93_cmd(regs, WD_CMD_SEL_ATN_XFER);
  1206  spin_unlock_irqrestore(&hostdata->lock, flags);
  1207  break;
  1208  
  1209  case CSR_XFER_DONE | PHS_MESS_OUT:
  1210  case CSR_UNEXP | PHS_MESS_OUT:
  1211  case CSR_SRV_REQ | PHS_MESS_OUT:
  1212  DB(DB_INTR, printk("MSG_OUT="))
  1213  
  1214  /* To get here, we've probably requested MESSAGE_OUT and have
  1215   * already put the correct bytes in outgoing_msg[] and filled
  1216   * in outgoing_len. We simply send them out to the SCSI bus.
  1217   * Sometimes we get MESSAGE_OUT phase when we're not expecting
  1218   * it - like when our SDTR message is rejected by a target. Some
  1219   * targets send the REJECT before receiving all of the extended
  1220   * message, and then seem to go back to MESSAGE_OUT for a byte
  1221   * or two. Not sure why, or if I'm doing something wrong to
  1222   * cause this to happen. Regardless, it seems that sending
  1223   * NOP messages in these situations results in no harm and
  1224   * makes everyone happy.
  1225   */
  1226  if (hostdata->outgoing_len == 0) {
  1227  hostdata->outgoing_len = 1;
  1228  hostdata->outgoing_msg[0] = NOP;
  1229  }
  1230  transfer_pio(regs, hostdata->outgoing_msg,
  1231   hostdata->outgoing_len, DATA_OUT_DIR, 
hostdata);
  1232  DB(DB_INTR, printk("%02x", hostdata->outgoing_msg[0]))
  1233  hostdata->outgoing_len = 0;
  1234  hostdata->state = S_CONNECTED;
  1235  spin_unlock_irqrestore(&hostdata->lock, flags);
  1236  break;
  1237  
  1238  case CSR_UNEXP_DISC:
  1239  
  1240  /* I think I've seen this after a request-sense that was in response
  1241   * to an error condition, but not sure. We certainly need to do
  1242   * something when we get this interrupt - the question is 'what?'.
  1243   * Let's think positively, and assume some command has finished
  1244   * in a legal manner (like a command that provokes a request-sense),
  1245   * so we treat it as a normal command-complete-disconnect.
  1246   */
  1247  
  1248  /* Make sure that reselection is enabled at this point - it may
  1249   * have been turned off for the command that just completed.
  1250   */
  1251  
  1252  write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
  1253  if (cmd == NULL) {
  1254  printk(" - Already disconnected! ");
  1255  hostdata->state = S_UNCONNECTED;
  1256  spin_unlock_irqrestore(&hostdata->lock, flags);
  1257  return;
  1258  }
  1259  DB(DB_INTR, printk("UN

Re: [PATCH 09/24] scsi: Kill obsolete linux-specific status codes

2019-10-21 Thread kbuild test robot
Hi Hannes,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[cannot apply to v5.4-rc4 next-20191021]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-Revamp-result-values/20191022-004918
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   drivers/scsi/pcmcia/nsp_cs.c: In function 'nsp_queuecommand_lck':
>> drivers/scsi/pcmcia/nsp_cs.c:226:22: error: 'CHECK_CONDITION' undeclared 
>> (first use in this function); did you mean 'SEC_CONVERSION'?
 SCpnt->SCp.Status = CHECK_CONDITION;
 ^~~
 SEC_CONVERSION
   drivers/scsi/pcmcia/nsp_cs.c:226:22: note: each undeclared identifier is 
reported only once for each function it appears in

vim +226 drivers/scsi/pcmcia/nsp_cs.c

^1da177e4c3f41 Linus Torvalds 2005-04-16  221  
^1da177e4c3f41 Linus Torvalds 2005-04-16  222   show_command(SCpnt);
^1da177e4c3f41 Linus Torvalds 2005-04-16  223  
^1da177e4c3f41 Linus Torvalds 2005-04-16  224   data->CurrentSC = SCpnt;
^1da177e4c3f41 Linus Torvalds 2005-04-16  225  
^1da177e4c3f41 Linus Torvalds 2005-04-16 @226   SCpnt->SCp.Status   = 
CHECK_CONDITION;
^1da177e4c3f41 Linus Torvalds 2005-04-16  227   SCpnt->SCp.Message  = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  228   SCpnt->SCp.have_data_in = 
IO_UNKNOWN;
^1da177e4c3f41 Linus Torvalds 2005-04-16  229   SCpnt->SCp.sent_command = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  230   SCpnt->SCp.phase= 
PH_UNDETERMINED;
040cd23242413a Boaz Harrosh   2007-08-16  231   scsi_set_resid(SCpnt, 
scsi_bufflen(SCpnt));
^1da177e4c3f41 Linus Torvalds 2005-04-16  232  
^1da177e4c3f41 Linus Torvalds 2005-04-16  233   /* setup scratch area
^1da177e4c3f41 Linus Torvalds 2005-04-16  234  SCp.ptr  : 
buffer pointer
^1da177e4c3f41 Linus Torvalds 2005-04-16  235  SCp.this_residual: 
buffer length
^1da177e4c3f41 Linus Torvalds 2005-04-16  236  SCp.buffer   : next 
buffer
^1da177e4c3f41 Linus Torvalds 2005-04-16  237  SCp.buffers_residual : left 
buffers in list
^1da177e4c3f41 Linus Torvalds 2005-04-16  238  SCp.phase: 
current state of the command */
040cd23242413a Boaz Harrosh   2007-08-16  239   if (scsi_bufflen(SCpnt)) {
040cd23242413a Boaz Harrosh   2007-08-16  240   SCpnt->SCp.buffer   
= scsi_sglist(SCpnt);
^1da177e4c3f41 Linus Torvalds 2005-04-16  241   SCpnt->SCp.ptr  
= BUFFER_ADDR;
^1da177e4c3f41 Linus Torvalds 2005-04-16  242   
SCpnt->SCp.this_residual= SCpnt->SCp.buffer->length;
040cd23242413a Boaz Harrosh   2007-08-16  243   
SCpnt->SCp.buffers_residual = scsi_sg_count(SCpnt) - 1;
^1da177e4c3f41 Linus Torvalds 2005-04-16  244   } else {
040cd23242413a Boaz Harrosh   2007-08-16  245   SCpnt->SCp.ptr  
= NULL;
040cd23242413a Boaz Harrosh   2007-08-16  246   
SCpnt->SCp.this_residual= 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  247   SCpnt->SCp.buffer   
= NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16  248   
SCpnt->SCp.buffers_residual = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  249   }
^1da177e4c3f41 Linus Torvalds 2005-04-16  250  
^1da177e4c3f41 Linus Torvalds 2005-04-16  251   if 
(nsphw_start_selection(SCpnt) == FALSE) {
^1da177e4c3f41 Linus Torvalds 2005-04-16  252   
nsp_dbg(NSP_DEBUG_QUEUECOMMAND, "selection fail");
^1da177e4c3f41 Linus Torvalds 2005-04-16  253   SCpnt->result   = 
DID_BUS_BUSY << 16;
^1da177e4c3f41 Linus Torvalds 2005-04-16  254   nsp_scsi_done(SCpnt);
^1da177e4c3f41 Linus Torvalds 2005-04-16  255   return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16  256   }
^1da177e4c3f41 Linus Torvalds 2005-04-16  257  
^1da177e4c3f41 Linus Torvalds 2005-04-16  258  
^1da177e4c3f41 Linus Torvalds 2005-04-16  259   
//nsp_dbg(NSP_DEBUG_QUEUECOMMAND, "out");
^1da177e4c3f41 Linus Torvalds 2005-04-16  260  #ifdef NSP_DEBUG
^1da177e4c3f41 Linus Torvalds 2005-04-16  261   data->CmdId++;
^1da177e4c3f41 Linus Torvalds 2005-04-16  262  #endif
^1da177e4c3f41 Linus Torvalds 2005-04-16  

Re: [PATCH v5 08/13] scsi: scsi_dh_hp_sw: need to check the result of scsi_execute in hp_sw_tur,hp_sw_start_stop

2019-10-21 Thread kbuild test robot
Hi zhengbin,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[cannot apply to v5.4-rc4 next-20191018]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/zhengbin/scsi-core-fix-uninit-value-access-of-variable-sshdr/20191021-160007
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   In file included from drivers/scsi/device_handler/scsi_dh_hp_sw.c:13:0:
   drivers/scsi/device_handler/scsi_dh_hp_sw.c: In function 'hp_sw_start_stop':
>> drivers/scsi/device_handler/scsi_dh_hp_sw.c:132:19: error: 'result' 
>> undeclared (first use in this function); did you mean 'res'?
  if (driver_byte(result) != DRIVER_SENSE ||
  ^
   include/scsi/scsi.h:213:32: note: in definition of macro 'driver_byte'
#define driver_byte(result) (((result) >> 24) & 0xff)
   ^~
   drivers/scsi/device_handler/scsi_dh_hp_sw.c:132:19: note: each undeclared 
identifier is reported only once for each function it appears in
  if (driver_byte(result) != DRIVER_SENSE ||
  ^
   include/scsi/scsi.h:213:32: note: in definition of macro 'driver_byte'
#define driver_byte(result) (((result) >> 24) & 0xff)
   ^~

vim +132 drivers/scsi/device_handler/scsi_dh_hp_sw.c

  > 13  #include 
14  #include 
15  #include 
16  #include 
17  
18  #define HP_SW_NAME  "hp_sw"
19  
20  #define HP_SW_TIMEOUT   (60 * HZ)
21  #define HP_SW_RETRIES   3
22  
23  #define HP_SW_PATH_UNINITIALIZED-1
24  #define HP_SW_PATH_ACTIVE   0
25  #define HP_SW_PATH_PASSIVE  1
26  
27  struct hp_sw_dh_data {
28  int path_state;
29  int retries;
30  int retry_cnt;
31  struct scsi_device *sdev;
32  };
33  
34  static int hp_sw_start_stop(struct hp_sw_dh_data *);
35  
36  /*
37   * tur_done - Handle TEST UNIT READY return status
38   * @sdev: sdev the command has been sent to
39   * @errors: blk error code
40   *
41   * Returns SCSI_DH_DEV_OFFLINED if the sdev is on the passive path
42   */
43  static int tur_done(struct scsi_device *sdev, struct hp_sw_dh_data *h,
44  struct scsi_sense_hdr *sshdr)
45  {
46  int ret = SCSI_DH_IO;
47  
48  switch (sshdr->sense_key) {
49  case UNIT_ATTENTION:
50  ret = SCSI_DH_IMM_RETRY;
51  break;
52  case NOT_READY:
53  if (sshdr->asc == 0x04 && sshdr->ascq == 2) {
54  /*
55   * LUN not ready - Initialization command 
required
56   *
57   * This is the passive path
58   */
59  h->path_state = HP_SW_PATH_PASSIVE;
60  ret = SCSI_DH_OK;
61  break;
62  }
63  /* Fallthrough */
64  default:
65  sdev_printk(KERN_WARNING, sdev,
66 "%s: sending tur failed, sense %x/%x/%x\n",
67 HP_SW_NAME, sshdr->sense_key, sshdr->asc,
68 sshdr->ascq);
69  break;
70  }
71  return ret;
72  }
73  
74  /*
75   * hp_sw_tur - Send TEST UNIT READY
76   * @sdev: sdev command should be sent to
77   *
78   * Use the TEST UNIT READY command to determine
79   * the path state.
80   */
81  static int hp_sw_tur(struct scsi_device *sdev, struct hp_sw_dh_data *h)
82  {
83  unsigned char cmd[6] = { TEST_UNIT_READY };
84  struct scsi_sense_hdr sshdr;
85  int ret = SCSI_DH_OK, res;
86  u64 req_flags = REQ_FAILFAST_DEV | REQ_FAILFAST_TRANSPORT |

Re: [PATCH 6/7] scsi: aacraid: send AIF request post IOP RESET

2019-10-15 Thread kbuild test robot
Hi,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[cannot apply to v5.4-rc3 next-20191014]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/balsundar-p-microsemi-com/scsi-aacraid-updates/20191015-142326
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/aacraid/commsup.c:1467:6: sparse: sparse: symbol 
>> 'aac_schedule_bus_scan' was not declared. Should it be static?
   drivers/scsi/aacraid/commsup.c:2385:5: sparse: sparse: symbol 
'aac_send_safw_hostttime' was not declared. Should it be static?
   drivers/scsi/aacraid/commsup.c:2414:5: sparse: sparse: symbol 
'aac_send_hosttime' was not declared. Should it be static?
   drivers/scsi/aacraid/commsup.c:599:17: sparse: sparse: context imbalance in 
'aac_fib_send' - different lock contexts for basic block
   drivers/scsi/aacraid/commsup.c:754:17: sparse: sparse: context imbalance in 
'aac_hba_send' - different lock contexts for basic block
   drivers/scsi/aacraid/commsup.c:1502:32: sparse: sparse: context imbalance in 
'_aac_reset_adapter' - unexpected unlock

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


[RFC PATCH] scsi: aacraid: aac_schedule_bus_scan() can be static

2019-10-15 Thread kbuild test robot


Fixes: ffcdda7d81b4 ("scsi: aacraid: send AIF request post IOP RESET")
Signed-off-by: kbuild test robot 
---
 commsup.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c
index 1c3beea2b3c57..5a8a999606ea3 100644
--- a/drivers/scsi/aacraid/commsup.c
+++ b/drivers/scsi/aacraid/commsup.c
@@ -1464,7 +1464,7 @@ static void aac_handle_aif(struct aac_dev * dev, struct 
fib * fibptr)
}
 }
 
-void aac_schedule_bus_scan(struct aac_dev *aac)
+static void aac_schedule_bus_scan(struct aac_dev *aac)
 {
if (aac->sa_firmware)
aac_schedule_safw_scan_worker(aac);


Re: [PATCH 1/1] scsi_debug: randomize command duration option + %p

2019-09-26 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[cannot apply to v5.3 next-20190925]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/scsi_debug-randomize-command-duration-option-p/20190927-094954
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: i386-randconfig-f004-201938 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   ld: drivers/scsi/scsi_debug.o: in function `schedule_resp':
>> drivers/scsi/scsi_debug.c:4365: undefined reference to `__udivdi3'

vim +4365 drivers/scsi/scsi_debug.c

  4251  
  4252  /* Complete the processing of the thread that queued a SCSI command to 
this
  4253   * driver. It either completes the command by calling cmnd_done() or
  4254   * schedules a hr timer or work queue then returns 0. Returns
  4255   * SCSI_MLQUEUE_HOST_BUSY if temporarily out of resources.
  4256   */
  4257  static int schedule_resp(struct scsi_cmnd *cmnd, struct sdebug_dev_info 
*devip,
  4258   int scsi_result,
  4259   int (*pfp)(struct scsi_cmnd *,
  4260  struct sdebug_dev_info *),
  4261   int delta_jiff, int ndelay)
  4262  {
  4263  unsigned long iflags;
  4264  int k, num_in_q, qdepth, inject;
  4265  struct sdebug_queue *sqp;
  4266  struct sdebug_queued_cmd *sqcp;
  4267  struct scsi_device *sdp;
  4268  struct sdebug_defer *sd_dp;
  4269  
  4270  if (unlikely(devip == NULL)) {
  4271  if (scsi_result == 0)
  4272  scsi_result = DID_NO_CONNECT << 16;
  4273  goto respond_in_thread;
  4274  }
  4275  sdp = cmnd->device;
  4276  
  4277  if (delta_jiff == 0)
  4278  goto respond_in_thread;
  4279  
  4280  /* schedule the response at a later time if resources permit */
  4281  sqp = get_queue(cmnd);
  4282  spin_lock_irqsave(&sqp->qc_lock, iflags);
  4283  if (unlikely(atomic_read(&sqp->blocked))) {
  4284  spin_unlock_irqrestore(&sqp->qc_lock, iflags);
  4285  return SCSI_MLQUEUE_HOST_BUSY;
  4286  }
  4287  num_in_q = atomic_read(&devip->num_in_q);
  4288  qdepth = cmnd->device->queue_depth;
  4289  inject = 0;
  4290  if (unlikely((qdepth > 0) && (num_in_q >= qdepth))) {
  4291  if (scsi_result) {
  4292  spin_unlock_irqrestore(&sqp->qc_lock, iflags);
  4293  goto respond_in_thread;
  4294  } else
  4295  scsi_result = device_qfull_result;
  4296  } else if (unlikely(sdebug_every_nth &&
  4297  (SDEBUG_OPT_RARE_TSF & sdebug_opts) &&
  4298  (scsi_result == 0))) {
  4299  if ((num_in_q == (qdepth - 1)) &&
  4300  (atomic_inc_return(&sdebug_a_tsf) >=
  4301   abs(sdebug_every_nth))) {
  4302  atomic_set(&sdebug_a_tsf, 0);
  4303  inject = 1;
  4304  scsi_result = device_qfull_result;
  4305  }
  4306  }
  4307  
  4308  k = find_first_zero_bit(sqp->in_use_bm, sdebug_max_queue);
  4309  if (unlikely(k >= sdebug_max_queue)) {
  4310  spin_unlock_irqrestore(&sqp->qc_lock, iflags);
  4311  if (scsi_result)
  4312  goto respond_in_thread;
  4313  else if (SDEBUG_OPT_ALL_TSF & sdebug_opts)
  4314  scsi_result = device_qfull_result;
  4315  if (SDEBUG_OPT_Q_NOISE & sdebug_opts)
  4316  sdev_printk(KERN_INFO, sdp,
  4317  "%s: max_queue=%d exceeded, %s\n",
  4318  __func__, sdebug_max_queue,
  4319  (scsi_result ?  "status: TASK SET 
FULL" :
  4320  "report: host 
busy"));
  4321  if (scsi_result)
  4322  goto respond_in_thread;
  4

Re: [PATCH 1/1] scsi_debug: randomize command duration option + %p

2019-09-26 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[cannot apply to v5.3 next-20190925]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/scsi_debug-randomize-command-duration-option-p/20190927-094954
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: i386-randconfig-e003-201938 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

>> ERROR: "__divdi3" [drivers/scsi/scsi_debug.ko] undefined!
>> ERROR: "__udivdi3" [drivers/scsi/scsi_debug.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v4 07/22] sg: move header to uapi section

2019-08-29 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190828]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20190829-123646
config: x86_64-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   In file included from :32:0:
>> ./usr/include/scsi/sg.h:35:10: fatal error: uapi/linux/bsg.h: No such file 
>> or directory
#include 
 ^~
   compilation terminated.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 2/2] scsi: core: fix dh and multipathing for SCSI hosts without request batching

2019-08-09 Thread kbuild test robot
Hi Steffen,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc3 next-20190808]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Steffen-Maier/scsi-core-fix-missing-cleanup_rq-for-SCSI-hosts-without-request-batching/20190808-052017
config: i386-randconfig-d003-201931 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   drivers/scsi/scsi_lib.c:1824:3: error: 'const struct blk_mq_ops' has no 
member named 'cleanup_rq'; did you mean 'queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
  ^~
  queue_rq
   drivers/scsi/scsi_lib.c:1824:16: error: 'scsi_cleanup_rq' undeclared here 
(not in a function); did you mean 'scsi_queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
   ^~~
   scsi_queue_rq
   In file included from include/linux/export.h:45:0,
from include/linux/linkage.h:7,
from include/linux/fs.h:5,
from include/linux/highmem.h:5,
from include/linux/bio.h:8,
from drivers/scsi/scsi_lib.c:12:
   drivers/scsi/scsi_lib.c: In function 'scsi_device_from_queue':
   drivers/scsi/scsi_lib.c:1881:20: error: 'scsi_mq_ops_no_commit' undeclared 
(first use in this function); did you mean 'scsi_mq_ops'?
 if (q->mq_ops == &scsi_mq_ops_no_commit ||
   ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
   ^~~~
>> drivers/scsi/scsi_lib.c:1881:2: note: in expansion of macro 'if'
 if (q->mq_ops == &scsi_mq_ops_no_commit ||
 ^~
   drivers/scsi/scsi_lib.c:1881:20: note: each undeclared identifier is 
reported only once for each function it appears in
 if (q->mq_ops == &scsi_mq_ops_no_commit ||
   ^
   include/linux/compiler.h:58:52: note: in definition of macro '__trace_if_var'
#define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
   ^~~~
>> drivers/scsi/scsi_lib.c:1881:2: note: in expansion of macro 'if'
 if (q->mq_ops == &scsi_mq_ops_no_commit ||
 ^~

vim +/if +1881 drivers/scsi/scsi_lib.c

  1869  
  1870  /**
  1871   * scsi_device_from_queue - return sdev associated with a request_queue
  1872   * @q: The request queue to return the sdev from
  1873   *
  1874   * Return the sdev associated with a request queue or NULL if the
  1875   * request_queue does not reference a SCSI device.
  1876   */
  1877  struct scsi_device *scsi_device_from_queue(struct request_queue *q)
  1878  {
  1879  struct scsi_device *sdev = NULL;
  1880  
> 1881  if (q->mq_ops == &scsi_mq_ops_no_commit ||
  1882  q->mq_ops == &scsi_mq_ops)
  1883  sdev = q->queuedata;
  1884  if (!sdev || !get_device(&sdev->sdev_gendev))
  1885  sdev = NULL;
  1886  
  1887  return sdev;
  1888  }
  1889  EXPORT_SYMBOL_GPL(scsi_device_from_queue);
  1890  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 1/2] scsi: core: fix missing .cleanup_rq for SCSI hosts without request batching

2019-08-08 Thread kbuild test robot
Hi Steffen,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc3 next-20190808]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Steffen-Maier/scsi-core-fix-missing-cleanup_rq-for-SCSI-hosts-without-request-batching/20190808-052017
config: s390-allmodconfig (attached as .config)
compiler: s390-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=s390 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   drivers//scsi/scsi_lib.c:1824:3: error: 'const struct blk_mq_ops' has no 
member named 'cleanup_rq'; did you mean 'queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
  ^~
  queue_rq
   drivers//scsi/scsi_lib.c:1824:16: error: 'scsi_cleanup_rq' undeclared here 
(not in a function); did you mean 'scsi_queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
   ^~~
   scsi_queue_rq
>> drivers//scsi/scsi_lib.c:1824:16: error: positional initialization of field 
>> in 'struct' declared with 'designated_init' attribute 
>> [-Werror=designated-init]
   drivers//scsi/scsi_lib.c:1824:16: note: (near initialization for 
'scsi_mq_ops')
   cc1: some warnings being treated as errors

vim +1824 drivers//scsi/scsi_lib.c

  1811  
  1812  static const struct blk_mq_ops scsi_mq_ops = {
  1813  .get_budget = scsi_mq_get_budget,
  1814  .put_budget = scsi_mq_put_budget,
  1815  .queue_rq   = scsi_queue_rq,
  1816  .complete   = scsi_softirq_done,
  1817  .timeout= scsi_timeout,
  1818  #ifdef CONFIG_BLK_DEBUG_FS
  1819  .show_rq= scsi_show_rq,
  1820  #endif
  1821  .init_request   = scsi_mq_init_request,
  1822  .exit_request   = scsi_mq_exit_request,
  1823  .initialize_rq_fn = scsi_initialize_rq,
> 1824  .cleanup_rq = scsi_cleanup_rq,
  1825  .busy   = scsi_mq_lld_busy,
  1826  .map_queues = scsi_map_queues,
  1827  };
  1828  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 2/2] scsi: core: fix dh and multipathing for SCSI hosts without request batching

2019-08-07 Thread kbuild test robot
Hi Steffen,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc3 next-20190807]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Steffen-Maier/scsi-core-fix-missing-cleanup_rq-for-SCSI-hosts-without-request-batching/20190808-052017
config: riscv-defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   drivers/scsi/scsi_lib.c:1824:3: error: 'const struct blk_mq_ops' has no 
member named 'cleanup_rq'; did you mean 'queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
  ^~
  queue_rq
   drivers/scsi/scsi_lib.c:1824:16: error: 'scsi_cleanup_rq' undeclared here 
(not in a function); did you mean 'scsi_queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
   ^~~
   scsi_queue_rq
   drivers/scsi/scsi_lib.c: In function 'scsi_device_from_queue':
>> drivers/scsi/scsi_lib.c:1881:20: error: 'scsi_mq_ops_no_commit' undeclared 
>> (first use in this function); did you mean 'scsi_mq_ops'?
 if (q->mq_ops == &scsi_mq_ops_no_commit ||
   ^
   scsi_mq_ops
   drivers/scsi/scsi_lib.c:1881:20: note: each undeclared identifier is 
reported only once for each function it appears in

vim +1881 drivers/scsi/scsi_lib.c

  1811  
  1812  static const struct blk_mq_ops scsi_mq_ops = {
  1813  .get_budget = scsi_mq_get_budget,
  1814  .put_budget = scsi_mq_put_budget,
  1815  .queue_rq   = scsi_queue_rq,
  1816  .complete   = scsi_softirq_done,
  1817  .timeout= scsi_timeout,
  1818  #ifdef CONFIG_BLK_DEBUG_FS
  1819  .show_rq= scsi_show_rq,
  1820  #endif
  1821  .init_request   = scsi_mq_init_request,
  1822  .exit_request   = scsi_mq_exit_request,
  1823  .initialize_rq_fn = scsi_initialize_rq,
> 1824  .cleanup_rq = scsi_cleanup_rq,
  1825  .busy   = scsi_mq_lld_busy,
  1826  .map_queues = scsi_map_queues,
  1827  };
  1828  
  1829  struct request_queue *scsi_mq_alloc_queue(struct scsi_device *sdev)
  1830  {
  1831  sdev->request_queue = blk_mq_init_queue(&sdev->host->tag_set);
  1832  if (IS_ERR(sdev->request_queue))
  1833  return NULL;
  1834  
  1835  sdev->request_queue->queuedata = sdev;
  1836  __scsi_init_queue(sdev->host, sdev->request_queue);
  1837  blk_queue_flag_set(QUEUE_FLAG_SCSI_PASSTHROUGH, 
sdev->request_queue);
  1838  return sdev->request_queue;
  1839  }
  1840  
  1841  int scsi_mq_setup_tags(struct Scsi_Host *shost)
  1842  {
  1843  unsigned int cmd_size, sgl_size;
  1844  
  1845  sgl_size = scsi_mq_inline_sgl_size(shost);
  1846  cmd_size = sizeof(struct scsi_cmnd) + shost->hostt->cmd_size + 
sgl_size;
  1847  if (scsi_host_get_prot(shost))
  1848  cmd_size += sizeof(struct scsi_data_buffer) +
  1849  sizeof(struct scatterlist) * 
SCSI_INLINE_PROT_SG_CNT;
  1850  
  1851  memset(&shost->tag_set, 0, sizeof(shost->tag_set));
  1852  shost->tag_set.ops = &scsi_mq_ops;
  1853  shost->tag_set.nr_hw_queues = shost->nr_hw_queues ? : 1;
  1854  shost->tag_set.queue_depth = shost->can_queue;
  1855  shost->tag_set.cmd_size = cmd_size;
  1856  shost->tag_set.numa_node = NUMA_NO_NODE;
  1857  shost->tag_set.flags = BLK_MQ_F_SHOULD_MERGE;
  1858  shost->tag_set.flags |=
  1859  
BLK_ALLOC_POLICY_TO_MQ_FLAG(shost->hostt->tag_alloc_policy);
  1860  shost->tag_set.driver_data = shost;
  1861  
  1862  return blk_mq_alloc_tag_set(&shost->tag_set);
  1863  }
  1864  
  1865  void scsi_mq_destroy_tags(struct Scsi_Host *shost)
  1866  {
  1867  blk_mq_free_tag_set(&shost->tag_set);
  1868  }
  1869  
  1870  /**
  1871   * scsi_device_from_queue - return sdev associated with a request_queue
  1872   * @q: The request queue to return the sdev from
  1873   *
  1874   * Return the sdev associated with a request queue or NULL if the
  1875   * request_queue does not reference a SCSI device.
  1876   */
  1877  struct scsi_device *scsi_device_from_queue(struct request_queue *q)
  187

Re: [PATCH 1/2] scsi: core: fix missing .cleanup_rq for SCSI hosts without request batching

2019-08-07 Thread kbuild test robot
Hi Steffen,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc3 next-20190807]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Steffen-Maier/scsi-core-fix-missing-cleanup_rq-for-SCSI-hosts-without-request-batching/20190808-052017
config: riscv-defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=riscv 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

>> drivers/scsi/scsi_lib.c:1824:3: error: 'const struct blk_mq_ops' has no 
>> member named 'cleanup_rq'; did you mean 'queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
  ^~
  queue_rq
>> drivers/scsi/scsi_lib.c:1824:16: error: 'scsi_cleanup_rq' undeclared here 
>> (not in a function); did you mean 'scsi_queue_rq'?
 .cleanup_rq = scsi_cleanup_rq,
   ^~~
   scsi_queue_rq

vim +1824 drivers/scsi/scsi_lib.c

  1811  
  1812  static const struct blk_mq_ops scsi_mq_ops = {
  1813  .get_budget = scsi_mq_get_budget,
  1814  .put_budget = scsi_mq_put_budget,
  1815  .queue_rq   = scsi_queue_rq,
  1816  .complete   = scsi_softirq_done,
  1817  .timeout= scsi_timeout,
  1818  #ifdef CONFIG_BLK_DEBUG_FS
  1819  .show_rq= scsi_show_rq,
  1820  #endif
  1821  .init_request   = scsi_mq_init_request,
  1822  .exit_request   = scsi_mq_exit_request,
  1823  .initialize_rq_fn = scsi_initialize_rq,
> 1824  .cleanup_rq = scsi_cleanup_rq,
  1825  .busy   = scsi_mq_lld_busy,
  1826  .map_queues = scsi_map_queues,
  1827  };
  1828  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v2 07/18] sg: move header to uapi section

2019-07-27 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[cannot apply to v5.3-rc1 next-20190726]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20190727-170351
config: i386-randconfig-b002-201929 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-10) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/scsi/sg.h:35:0,
from :0:
>> include/linux/bsg.h:31:10: warning: 'struct device' declared inside 
>> parameter list will not be visible outside of this definition or declaration
  struct device *parent)
 ^~
>> include/linux/bsg.h:30:50: warning: 'struct request_queue' declared inside 
>> parameter list will not be visible outside of this definition or declaration
static inline int bsg_scsi_register_queue(struct request_queue *q,
 ^
   include/linux/bsg.h:35:48: warning: 'struct request_queue' declared inside 
parameter list will not be visible outside of this definition or declaration
static inline void bsg_unregister_queue(struct request_queue *q)
   ^

vim +31 include/linux/bsg.h

3d6392cfbd7dc11 Jens Axboe2007-07-09  24  
17cb960f29c29ee Christoph Hellwig 2018-03-13  25  int bsg_register_queue(struct 
request_queue *q, struct device *parent,
5de815a7eedfacf Christoph Hellwig 2018-05-29  26const char 
*name, const struct bsg_ops *ops);
17cb960f29c29ee Christoph Hellwig 2018-03-13  27  int 
bsg_scsi_register_queue(struct request_queue *q, struct device *parent);
17cb960f29c29ee Christoph Hellwig 2018-03-13  28  void 
bsg_unregister_queue(struct request_queue *q);
3d6392cfbd7dc11 Jens Axboe2007-07-09  29  #else
17cb960f29c29ee Christoph Hellwig 2018-03-13 @30  static inline int 
bsg_scsi_register_queue(struct request_queue *q,
17cb960f29c29ee Christoph Hellwig 2018-03-13 @31struct device 
*parent)
a4ee0df8b3d007f James Bottomley   2007-07-23  32  {
a4ee0df8b3d007f James Bottomley   2007-07-23  33return 0;
a4ee0df8b3d007f James Bottomley   2007-07-23  34  }
97f46ae45c70857 FUJITA Tomonori   2008-04-19  35  static inline void 
bsg_unregister_queue(struct request_queue *q)
a4ee0df8b3d007f James Bottomley   2007-07-23  36  {
a4ee0df8b3d007f James Bottomley   2007-07-23  37  }
17cb960f29c29ee Christoph Hellwig 2018-03-13  38  #endif /* CONFIG_BLK_DEV_BSG 
*/
17cb960f29c29ee Christoph Hellwig 2018-03-13  39  #endif /* _LINUX_BSG_H */

:: The code at line 31 was first introduced by commit
:: 17cb960f29c29ee07bf6848ada3265f4be55972e bsg: split handling of SCSI 
CDBs vs transport requeues

:: TO: Christoph Hellwig 
:: CC: Jens Axboe 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v2 17/18] sg: add sg_iosubmit_v3 and sg_ioreceive_v3 ioctls

2019-07-27 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.3-rc1 next-20190726]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20190727-170351
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   drivers/scsi/sg.c: In function 'sg_v4_receive':
   drivers/scsi/sg.c:1126:18: warning: cast from pointer to integer of 
different size [-Wpointer-to-int-cast]
 h4p->response = (u64)srp->s_hdr4.sbp;
 ^
   drivers/scsi/sg.c: In function 'sg_find_srp_by_id':
   drivers/scsi/sg.c:3052:34: warning: 'bad_sr_st' may be used uninitialized in 
this function [-Wmaybe-uninitialized]
 __maybe_unused enum sg_rq_state bad_sr_st;
 ^
   drivers/scsi/sg.c: In function 'sg_ioctl':
>> drivers/scsi/sg.c:2006:1: warning: the frame size of 2160 bytes is larger 
>> than 2048 bytes [-Wframe-larger-than=]
}
^

vim +2006 drivers/scsi/sg.c

3dd41421 Douglas Gilbert   2019-07-26  1766  
3dd41421 Douglas Gilbert   2019-07-26  1767  static long
3dd41421 Douglas Gilbert   2019-07-26  1768  sg_ioctl(struct file *filp, 
unsigned int cmd_in, unsigned long arg)
3dd41421 Douglas Gilbert   2019-07-26  1769  {
3dd41421 Douglas Gilbert   2019-07-26  1770 bool read_only = O_RDWR != 
(filp->f_flags & O_ACCMODE);
3dd41421 Douglas Gilbert   2019-07-26  1771 bool check_detach = false;
3dd41421 Douglas Gilbert   2019-07-26  1772 int val;
3dd41421 Douglas Gilbert   2019-07-26  1773 int result = 0;
3dd41421 Douglas Gilbert   2019-07-26  1774 void __user *p = uptr64(arg);
3dd41421 Douglas Gilbert   2019-07-26  1775 int __user *ip = p;
3dd41421 Douglas Gilbert   2019-07-26  1776 struct sg_device *sdp;
3dd41421 Douglas Gilbert   2019-07-26  1777 struct sg_fd *sfp;
3dd41421 Douglas Gilbert   2019-07-26  1778 struct sg_request *srp;
3dd41421 Douglas Gilbert   2019-07-26  1779 struct scsi_device *sdev;
3dd41421 Douglas Gilbert   2019-07-26  1780 __maybe_unused const char *pmlp 
= ", pass to mid-level";
3dd41421 Douglas Gilbert   2019-07-26  1781  
3dd41421 Douglas Gilbert   2019-07-26  1782 sfp = filp->private_data;
3dd41421 Douglas Gilbert   2019-07-26  1783 sdp = sfp->parentdp;
3dd41421 Douglas Gilbert   2019-07-26  1784 SG_LOG(6, sfp, "%s: cmd=0x%x, 
O_NONBLOCK=%d\n", __func__, cmd_in,
3dd41421 Douglas Gilbert   2019-07-26  1785!!(filp->f_flags & 
O_NONBLOCK));
3dd41421 Douglas Gilbert   2019-07-26  1786 if (!sdp)
3dd41421 Douglas Gilbert   2019-07-26  1787 return -ENXIO;
3dd41421 Douglas Gilbert   2019-07-26  1788 if 
(unlikely(SG_IS_DETACHING(sdp)))
3dd41421 Douglas Gilbert   2019-07-26  1789 return -ENODEV;
3dd41421 Douglas Gilbert   2019-07-26  1790 sdev = sdp->device;
3dd41421 Douglas Gilbert   2019-07-26  1791  
3dd41421 Douglas Gilbert   2019-07-26  1792 switch (cmd_in) {
3dd41421 Douglas Gilbert   2019-07-26  1793 case SG_IO:
3dd41421 Douglas Gilbert   2019-07-26  1794 return 
sg_ctl_sg_io(filp, sdp, sfp, p);
cf1c1047 Douglas Gilbert   2019-07-26  1795 case SG_IOSUBMIT:
cf1c1047 Douglas Gilbert   2019-07-26  1796 SG_LOG(3, sfp, "%s:
SG_IOSUBMIT\n", __func__);
cf1c1047 Douglas Gilbert   2019-07-26  1797 return 
sg_ctl_iosubmit(filp, sfp, p);
2e815ed4 Douglas Gilbert   2019-07-26  1798 case SG_IOSUBMIT_V3:
2e815ed4 Douglas Gilbert   2019-07-26  1799 SG_LOG(3, sfp, "%s:
SG_IOSUBMIT_V3\n", __func__);
2e815ed4 Douglas Gilbert   2019-07-26  1800 return 
sg_ctl_iosubmit_v3(filp, sfp, p);
cf1c1047 Douglas Gilbert   2019-07-26  1801 case SG_IORECEIVE:
cf1c1047 Douglas Gilbert   2019-07-26  1802 SG_LOG(3, sfp, "%s:
SG_IORECEIVE\n", __func__);
cf1c1047 Douglas Gilbert   2019-07-26  1803 return 
sg_ctl_ioreceive(filp, sfp, p);
2e815ed4 Douglas Gilbert   2019-07-26  1804 case SG_IORECEIVE_V3:
2e815ed4 Douglas Gilbert   2019-07-26  1805 SG_LOG(3, sfp, "%s:
SG_IORECEIVE_V3\n", __func__);
2e815ed4 Douglas Gilbert   2019-07-26  1806 return 
sg_ctl_ioreceive_v3(filp, sfp, p);
3dd41421 Douglas Gilbert   2019-07-26  1807 case SG_GET_SCSI_ID:
3dd41421 Douglas Gil

Re: [PATCH v2 07/18] sg: move header to uapi section

2019-07-27 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v5.3-rc1 next-20190726]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-add-v4-interface/20190727-170351
config: x86_64-randconfig-s1-07261000 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/scsi/sg.h:35:0,
from :0:
>> include/linux/bsg.h:31:10: warning: 'struct device' declared inside 
>> parameter list
  struct device *parent)
 ^
>> include/linux/bsg.h:31:10: warning: its scope is only this definition or 
>> declaration, which is probably not what you want
>> include/linux/bsg.h:31:10: warning: 'struct request_queue' declared inside 
>> parameter list
   include/linux/bsg.h:35:48: warning: 'struct request_queue' declared inside 
parameter list
static inline void bsg_unregister_queue(struct request_queue *q)
   ^

vim +31 include/linux/bsg.h

3d6392cf Jens Axboe2007-07-09  24  
17cb960f Christoph Hellwig 2018-03-13  25  int bsg_register_queue(struct 
request_queue *q, struct device *parent,
5de815a7 Christoph Hellwig 2018-05-29  26   const char *name, const 
struct bsg_ops *ops);
17cb960f Christoph Hellwig 2018-03-13  27  int bsg_scsi_register_queue(struct 
request_queue *q, struct device *parent);
17cb960f Christoph Hellwig 2018-03-13  28  void bsg_unregister_queue(struct 
request_queue *q);
3d6392cf Jens Axboe2007-07-09  29  #else
17cb960f Christoph Hellwig 2018-03-13  30  static inline int 
bsg_scsi_register_queue(struct request_queue *q,
17cb960f Christoph Hellwig 2018-03-13 @31   struct device *parent)

:: The code at line 31 was first introduced by commit
:: 17cb960f29c29ee07bf6848ada3265f4be55972e bsg: split handling of SCSI 
CDBs vs transport requeues

:: TO: Christoph Hellwig 
:: CC: Jens Axboe 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 14/19] sg: tag and more_async

2019-07-23 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.3-rc1 next-20190723]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/mkp/scsi.git 
for-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/sg.c:3193:14: sparse: sparse: incorrect type in assignment 
>> (different base types) @@expected int flgs @@got restricted 
>> blk_mq_req_flaint flgs @@
>> drivers/scsi/sg.c:3193:14: sparse:expected int flgs
>> drivers/scsi/sg.c:3193:14: sparse:got restricted blk_mq_req_flags_t
>> drivers/scsi/sg.c:3196:30: sparse: sparse: incorrect type in argument 3 
>> (different base types) @@expected restricted blk_mq_req_flags_t 
>> [usertype] flags @@got pe] flags @@
>> drivers/scsi/sg.c:3196:30: sparse:expected restricted blk_mq_req_flags_t 
>> [usertype] flags
>> drivers/scsi/sg.c:3196:30: sparse:got int flgs
   drivers/scsi/sg.c:1180:26: sparse: sparse: cast removes address space 
'' of expression
   drivers/scsi/sg.c:3605:20: sparse: sparse: incorrect type in initializer 
(different base types) @@expected int gfp @@got restricted gfp_t 
[usertyint gfp @@
   drivers/scsi/sg.c:3605:20: sparse:expected int gfp
   drivers/scsi/sg.c:3605:20: sparse:got restricted gfp_t [usertype]
   drivers/scsi/sg.c:3608:51: sparse: sparse: restricted gfp_t degrades to 
integer
   drivers/scsi/sg.c:3608:49: sparse: sparse: incorrect type in argument 2 
(different base types) @@expected restricted gfp_t [usertype] flags @@
got  [usertype] flags @@
   drivers/scsi/sg.c:3608:49: sparse:expected restricted gfp_t [usertype] 
flags
   drivers/scsi/sg.c:3608:49: sparse:got unsigned int
   drivers/scsi/sg.c:3610:51: sparse: sparse: restricted gfp_t degrades to 
integer
   drivers/scsi/sg.c:3610:49: sparse: sparse: incorrect type in argument 2 
(different base types) @@expected restricted gfp_t [usertype] flags @@
got  [usertype] flags @@
   drivers/scsi/sg.c:3610:49: sparse:expected restricted gfp_t [usertype] 
flags
   drivers/scsi/sg.c:3610:49: sparse:got unsigned int
   drivers/scsi/sg.c:1722:1: sparse: sparse: context imbalance in 
'sg_ctl_abort' - different lock contexts for basic block
   include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 
'sg_add_request' - different lock contexts for basic block

vim +3193 drivers/scsi/sg.c

  3130  
  3131  static int
  3132  sg_start_req(struct sg_request *srp, struct sg_comm_wr_t *cwrp, int 
dxfer_dir)
  3133  {
  3134  bool reserved, us_xfer;
  3135  int res = 0;
  3136  int dxfer_len = 0;
  3137  int r0w = READ;
  3138  int flgs;
  3139  unsigned int iov_count = 0;
  3140  void __user *up;
  3141  struct request *rq;
  3142  struct scsi_request *scsi_rp;
  3143  struct sg_fd *sfp = cwrp->sfp;
  3144  struct sg_device *sdp;
  3145  struct sg_scatter_hold *req_schp;
  3146  struct request_queue *q;
  3147  struct rq_map_data *md = (void *)srp; /* want any non-NULL 
value */
  3148  u8 *long_cmdp = NULL;
  3149  __maybe_unused const char *cp = "";
  3150  struct rq_map_data map_data;
  3151  
  3152  sdp = sfp->parentdp;
  3153  if (cwrp->cmd_len > BLK_MAX_CDB) {  /* for longer SCSI 
cdb_s */
  3154  long_cmdp = kzalloc(cwrp->cmd_len, GFP_KERNEL);
  3155  if (!long_cmdp)
  3156  return -ENOMEM;
  3157  SG_LOG(5, sdp, "%s: long_cmdp=0x%p ++\n", __func__, 
long_cmdp);
  3158  }
  3159  if (test_bit(SG_FRQ_IS_V4I, srp->frq_bm)) {
  3160  struct sg_io_v4 *h4p = cwrp->h4p;
  3161  
  3162  if (dxfer_dir == SG_DXFER_TO_DEV) {
  3163  r0w = WRITE;
  3164  up = uptr64(h4p->dout_xferp);
  3165  dxfer_len = (int)h4p->dout_xfer_len;
  3166  iov_count = h4p->dout_iovec_count;
  3167  } else if (dxfer_dir == SG_DXFER_FROM_DEV) {
  3168  /* r0w = READ; */
  3169  up = uptr64(h4p->din_xferp);
  3170  

Re: [PATCH 05/19] sg: replace rq array with lists

2019-07-23 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.3-rc1 next-20190723]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://kernel.googlesource.com/pub/scm/linux/kernel/git/mkp/scsi.git 
for-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/sg.c:2808:20: sparse: sparse: incorrect type in initializer 
>> (different base types) @@expected int gfp @@got restricted gfp_t 
>> [usertyint gfp @@
>> drivers/scsi/sg.c:2808:20: sparse:expected int gfp
>> drivers/scsi/sg.c:2808:20: sparse:got restricted gfp_t [usertype]
>> drivers/scsi/sg.c:2811:51: sparse: sparse: restricted gfp_t degrades to 
>> integer
>> drivers/scsi/sg.c:2811:49: sparse: sparse: incorrect type in argument 2 
>> (different base types) @@expected restricted gfp_t [usertype] flags @@   
>>  got  [usertype] flags @@
>> drivers/scsi/sg.c:2811:49: sparse:expected restricted gfp_t [usertype] 
>> flags
>> drivers/scsi/sg.c:2811:49: sparse:got unsigned int
   drivers/scsi/sg.c:2813:51: sparse: sparse: restricted gfp_t degrades to 
integer
   drivers/scsi/sg.c:2813:49: sparse: sparse: incorrect type in argument 2 
(different base types) @@expected restricted gfp_t [usertype] flags @@
got  [usertype] flags @@
   drivers/scsi/sg.c:2813:49: sparse:expected restricted gfp_t [usertype] 
flags
   drivers/scsi/sg.c:2813:49: sparse:got unsigned int
   include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 
'sg_add_request' - different lock contexts for basic block

vim +2808 drivers/scsi/sg.c

  2797  
  2798  /*
  2799   * Makes a new sg_request object. If 'first' is set then use GFP_KERNEL 
which
  2800   * may take time but has improved chance of success, otherwise use 
GFP_ATOMIC.
  2801   * Note that basic initialization is done but srp is not added to 
either sfp
  2802   * list. On error returns twisted negated errno value (not NULL).
  2803   */
  2804  static struct sg_request *
  2805  sg_mk_srp(struct sg_fd *sfp, bool first)
  2806  {
  2807  struct sg_request *srp;
> 2808  int gfp =  __GFP_NOWARN;
  2809  
  2810  if (first)  /* prepared to wait if none already outstanding 
*/
> 2811  srp = kzalloc(sizeof(*srp), gfp | GFP_KERNEL);
  2812  else
  2813  srp = kzalloc(sizeof(*srp), gfp | GFP_ATOMIC);
  2814  if (srp) {
  2815  spin_lock_init(&srp->req_lck);
  2816  atomic_set(&srp->rq_st, SG_RS_INACTIVE);
  2817  srp->parentfp = sfp;
  2818  return srp;
  2819  } else {
  2820  return ERR_PTR(-ENOMEM);
  2821  }
  2822  }
  2823  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


Re: [PATCH 5/6] qla2xxx: Make the code for freeing SRBs more systematic

2019-06-21 Thread kbuild test robot
Hi Bart,

I love your patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v5.2-rc5 next-20190620]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Bart-Van-Assche/qla2xxx-Make-qla2x00_abort_srb-again-decrease-the-sp-reference-count/20190618-094414
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


coccinelle warnings: (new ones prefixed by >>)

>> drivers/scsi/qla2xxx/qla_gs.c:517:1-3: ERROR: test of a variable/field 
>> address
   drivers/scsi/qla2xxx/qla_gs.c:524:1-3: ERROR: test of a variable/field 
address

vim +517 drivers/scsi/qla2xxx/qla_gs.c

   511  
   512  static void qla2x00_async_sns_sp_free(srb_t *sp)
   513  {
   514  struct scsi_qla_host *vha = sp->vha;
   515  struct ct_arg *ctarg = &sp->u.iocb_cmd.u.ctarg;
   516  
 > 517  if (&ctarg->rsp) {
   518  dma_free_coherent(&vha->hw->pdev->dev,
   519ctarg->rsp_allocated_size, ctarg->rsp,
   520ctarg->rsp_dma);
   521  ctarg->rsp = NULL;
   522  }
   523  
   524  if (&ctarg->req) {
   525  dma_free_coherent(&vha->hw->pdev->dev,
   526ctarg->req_allocated_size, ctarg->req,
   527ctarg->req_dma);
   528  ctarg->req = NULL;
   529  }
   530  
   531  qla2x00_sp_free(sp);
   532  }
   533  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


Re: [PATCH 11/18] megaraid_sas: Offload Aero RAID5/6 division calculations to driver

2019-06-18 Thread kbuild test robot
Hi Chandrakanth,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20190618]
[cannot apply to v5.2-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Chandrakanth-Patil/megaraid_sas-driver-updates-to-07-710-06-00-rc1/20190618-174435
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/megaraid/megaraid_sas_fp.c:752:60: sparse: sparse: incorrect 
type in assignment (different base types) @@expected unsigned short 
[usertype] r1_alt_dev_handle @@got short [usertype] r1_alt_dev_handle @@
   drivers/scsi/megaraid/megaraid_sas_fp.c:752:60: sparse:expected unsigned 
short [usertype] r1_alt_dev_handle
   drivers/scsi/megaraid/megaraid_sas_fp.c:752:60: sparse:got restricted 
__le16
   drivers/scsi/megaraid/megaraid_sas_fp.c:194:72: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:199:33: sparse: sparse: cast to 
restricted __le16
   drivers/scsi/megaraid/megaraid_sas_fp.c:207:25: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:208:25: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:210:33: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:211:33: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:214:79: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:215:33: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:223:41: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:224:49: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:226:49: sparse: sparse: cast to 
restricted __le16
   drivers/scsi/megaraid/megaraid_sas_fp.c:232:58: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:233:33: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:242:41: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:243:33: sparse: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_fp.c:868:60: sparse: sparse: incorrect 
type in assignment (different base types) @@expected unsigned short 
[usertype] r1_alt_dev_handle @@got short [usertype] r1_alt_dev_handle @@
   drivers/scsi/megaraid/megaraid_sas_fp.c:868:60: sparse:expected unsigned 
short [usertype] r1_alt_dev_handle
   drivers/scsi/megaraid/megaraid_sas_fp.c:868:60: sparse:got restricted 
__le16
>> drivers/scsi/megaraid/megaraid_sas_fp.c:964:41: sparse: sparse: incorrect 
>> type in assignment (different base types) @@expected unsigned long long 
>> [usertype] reg_lock_row_lba @@got nsigned long long [usertype] 
>> reg_lock_row_lba @@
>> drivers/scsi/megaraid/megaraid_sas_fp.c:964:41: sparse:expected unsigned 
>> long long [usertype] reg_lock_row_lba
   drivers/scsi/megaraid/megaraid_sas_fp.c:964:41: sparse:got restricted 
__le64 [usertype]
   drivers/scsi/megaraid/megaraid_sas_fp.c:1201:28: sparse: sparse: restricted 
__le16 degrades to integer
   drivers/scsi/megaraid/megaraid_sas_fp.c:1392:24: sparse: sparse: incorrect 
type in assignment (different base types) @@expected unsigned short 
[usertype] pd1_dev_handle @@got short [usertype] pd1_dev_handle @@
   drivers/scsi/megaraid/megaraid_sas_fp.c:1392:24: sparse:expected 
unsigned short [usertype] pd1_dev_handle
   drivers/scsi/megaraid/megaraid_sas_fp.c:1392:24: sparse:got restricted 
__le16
   drivers/scsi/megaraid/megaraid_sas_fp.c:1361:4: sparse: sparse: symbol 
'megasas_get_best_arm_pd' was not declared. Should it be static?

vim +964 drivers/scsi/megaraid/megaraid_sas_fp.c

   903  
   904  /*
   905   * mr_get_phy_params_r56_rmw -  Calculate parameters for R56 CTIO write 
operation
   906   * @instance:   Adapter soft state
   907   * @ld: LD index
   908   * @stripNo:Strip Number
   909   * @io_info:IO info structure pointer
   910   * pRAID_Context:   RAID context pointer
   911   * map: RAID map pointer
   912   *
   913   * This routine calculates the logical arm, data Arm, row number and 
parity arm
   914   * for R56 CTIO write operation.
   915   */
   916  static void mr_ge

Re: [PATCH V2 06/15] scsi: pmcraid: use sg helper to operate sgl

2019-06-14 Thread kbuild test robot
Hi Ming,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v5.2-rc4 next-20190613]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Ming-Lei/scsi-use-sg-helper-to-operate-sgl/20190614-134223
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

   drivers//scsi/pmcraid.c: In function 'pmcraid_copy_sglist':
>> drivers//scsi/pmcraid.c:3282:2: error: 'scatterlist' undeclared (first use 
>> in this function)
 scatterlist = sglist->scatterlist;
 ^~~
   drivers//scsi/pmcraid.c:3282:2: note: each undeclared identifier is reported 
only once for each function it appears in

vim +/scatterlist +3282 drivers//scsi/pmcraid.c

89a36810 Anil Ravindranath 2009-08-25  3253  
89a36810 Anil Ravindranath 2009-08-25  3254  /**
89a36810 Anil Ravindranath 2009-08-25  3255   * pmcraid_copy_sglist - Copy user 
buffer to kernel buffer's SG list
89a36810 Anil Ravindranath 2009-08-25  3256   * @sglist: scatter/gather list 
pointer
89a36810 Anil Ravindranath 2009-08-25  3257   * @buffer: buffer pointer
89a36810 Anil Ravindranath 2009-08-25  3258   * @len: buffer length
89a36810 Anil Ravindranath 2009-08-25  3259   * @direction: data transfer 
direction
89a36810 Anil Ravindranath 2009-08-25  3260   *
89a36810 Anil Ravindranath 2009-08-25  3261   * Copy a user buffer into a 
buffer allocated by pmcraid_alloc_sglist
89a36810 Anil Ravindranath 2009-08-25  3262   *
89a36810 Anil Ravindranath 2009-08-25  3263   * Return value:
89a36810 Anil Ravindranath 2009-08-25  3264   * 0 on success / other on failure
89a36810 Anil Ravindranath 2009-08-25  3265   */
89a36810 Anil Ravindranath 2009-08-25  3266  static int pmcraid_copy_sglist(
89a36810 Anil Ravindranath 2009-08-25  3267 struct pmcraid_sglist *sglist,
3397623b Arnd Bergmann 2017-04-20  3268 void __user *buffer,
89a36810 Anil Ravindranath 2009-08-25  3269 u32 len,
89a36810 Anil Ravindranath 2009-08-25  3270 int direction
89a36810 Anil Ravindranath 2009-08-25  3271  )
89a36810 Anil Ravindranath 2009-08-25  3272  {
4555938c Ming Lei  2019-06-13  3273 struct scatterlist *sg;
89a36810 Anil Ravindranath 2009-08-25  3274 void *kaddr;
89a36810 Anil Ravindranath 2009-08-25  3275 int bsize_elem;
89a36810 Anil Ravindranath 2009-08-25  3276 int i;
89a36810 Anil Ravindranath 2009-08-25  3277 int rc = 0;
89a36810 Anil Ravindranath 2009-08-25  3278  
89a36810 Anil Ravindranath 2009-08-25  3279 /* Determine the actual number 
of bytes per element */
89a36810 Anil Ravindranath 2009-08-25  3280 bsize_elem = PAGE_SIZE * (1 << 
sglist->order);
89a36810 Anil Ravindranath 2009-08-25  3281  
89a36810 Anil Ravindranath 2009-08-25 @3282 scatterlist = 
sglist->scatterlist;
89a36810 Anil Ravindranath 2009-08-25  3283  
4555938c Ming Lei  2019-06-13  3284 for (i = 0; i < (len / 
bsize_elem); i++, sg = sg_next(sg), buffer += bsize_elem) {
4555938c Ming Lei  2019-06-13  3285 struct page *page = 
sg_page(sg);
89a36810 Anil Ravindranath 2009-08-25  3286  
89a36810 Anil Ravindranath 2009-08-25  3287 kaddr = kmap(page);
89a36810 Anil Ravindranath 2009-08-25  3288 if (direction == 
DMA_TO_DEVICE)
edb88cef Arnd Bergmann 2017-04-22  3289 rc = 
copy_from_user(kaddr, buffer, bsize_elem);
89a36810 Anil Ravindranath 2009-08-25  3290 else
edb88cef Arnd Bergmann 2017-04-22  3291 rc = 
copy_to_user(buffer, kaddr, bsize_elem);
89a36810 Anil Ravindranath 2009-08-25  3292  
89a36810 Anil Ravindranath 2009-08-25  3293 kunmap(page);
89a36810 Anil Ravindranath 2009-08-25  3294  
89a36810 Anil Ravindranath 2009-08-25  3295 if (rc) {
89a36810 Anil Ravindranath 2009-08-25  3296 
pmcraid_err("failed to copy user data into sg list\n");
89a36810 Anil Ravindranath 2009-08-25  3297 return -EFAULT;
89a36810 Anil Ravindranath 2009-08-25  3298 }
89a36810 Anil Ravindranath 2009-08-25  3299  
4555938c Ming Lei  2019-06-13  3300 sg->length = bsize_elem;
89a36810 Anil Ravindranath 2009-08-25  3301 }
89a36810 Anil Ravindranath 2009-08-25  3302  
89a36810 Anil Ravindranath 2009-08-25  3303 if (len % bsize_elem) {
4555938c Ming Lei   

Re: [PATCH 14/19] sg: tag and more_async

2019-05-25 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20190524]
[cannot apply to v5.2-rc1]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/sg.c:3193:14: sparse: sparse: incorrect type in assignment 
>> (different base types) @@expected int flgs @@got restricted 
>> blk_mq_req_flaint flgs @@
>> drivers/scsi/sg.c:3193:14: sparse:expected int flgs
>> drivers/scsi/sg.c:3193:14: sparse:got restricted blk_mq_req_flags_t
>> drivers/scsi/sg.c:3196:30: sparse: sparse: incorrect type in argument 3 
>> (different base types) @@expected restricted blk_mq_req_flags_t 
>> [usertype] flags @@got pe] flags @@
>> drivers/scsi/sg.c:3196:30: sparse:expected restricted blk_mq_req_flags_t 
>> [usertype] flags
>> drivers/scsi/sg.c:3196:30: sparse:got int flgs
   drivers/scsi/sg.c:1180:26: sparse: sparse: cast removes address space 
'' of expression
   drivers/scsi/sg.c:3605:20: sparse: sparse: incorrect type in initializer 
(different base types) @@expected int gfp @@got restricted gfp_t 
[usertyint gfp @@
   drivers/scsi/sg.c:3605:20: sparse:expected int gfp
   drivers/scsi/sg.c:3605:20: sparse:got restricted gfp_t [usertype]
   drivers/scsi/sg.c:3608:51: sparse: sparse: restricted gfp_t degrades to 
integer
   drivers/scsi/sg.c:3608:49: sparse: sparse: incorrect type in argument 2 
(different base types) @@expected restricted gfp_t [usertype] flags @@
got  [usertype] flags @@
   drivers/scsi/sg.c:3608:49: sparse:expected restricted gfp_t [usertype] 
flags
   drivers/scsi/sg.c:3608:49: sparse:got unsigned int
   drivers/scsi/sg.c:3610:51: sparse: sparse: restricted gfp_t degrades to 
integer
   drivers/scsi/sg.c:3610:49: sparse: sparse: incorrect type in argument 2 
(different base types) @@expected restricted gfp_t [usertype] flags @@
got  [usertype] flags @@
   drivers/scsi/sg.c:3610:49: sparse:expected restricted gfp_t [usertype] 
flags
   drivers/scsi/sg.c:3610:49: sparse:got unsigned int
   drivers/scsi/sg.c:1722:1: sparse: sparse: context imbalance in 
'sg_ctl_abort' - different lock contexts for basic block
   include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 
'sg_add_request' - different lock contexts for basic block

vim +3193 drivers/scsi/sg.c

  3130  
  3131  static int
  3132  sg_start_req(struct sg_request *srp, struct sg_comm_wr_t *cwrp, int 
dxfer_dir)
  3133  {
  3134  bool reserved, us_xfer;
  3135  int res = 0;
  3136  int dxfer_len = 0;
  3137  int r0w = READ;
  3138  int flgs;
  3139  unsigned int iov_count = 0;
  3140  void __user *up;
  3141  struct request *rq;
  3142  struct scsi_request *scsi_rp;
  3143  struct sg_fd *sfp = cwrp->sfp;
  3144  struct sg_device *sdp;
  3145  struct sg_scatter_hold *req_schp;
  3146  struct request_queue *q;
  3147  struct rq_map_data *md = (void *)srp; /* want any non-NULL 
value */
  3148  u8 *long_cmdp = NULL;
  3149  __maybe_unused const char *cp = "";
  3150  struct rq_map_data map_data;
  3151  
  3152  sdp = sfp->parentdp;
  3153  if (cwrp->cmd_len > BLK_MAX_CDB) {  /* for longer SCSI 
cdb_s */
  3154  long_cmdp = kzalloc(cwrp->cmd_len, GFP_KERNEL);
  3155  if (!long_cmdp)
  3156  return -ENOMEM;
  3157  SG_LOG(5, sdp, "%s: long_cmdp=0x%p ++\n", __func__, 
long_cmdp);
  3158  }
  3159  if (test_bit(SG_FRQ_IS_V4I, srp->frq_bm)) {
  3160  struct sg_io_v4 *h4p = cwrp->h4p;
  3161  
  3162  if (dxfer_dir == SG_DXFER_TO_DEV) {
  3163  r0w = WRITE;
  3164  up = uptr64(h4p->dout_xferp);
  3165  dxfer_len = (int)h4p->dout_xfer_len;
  3166  iov_count = h4p->dout_iovec_count;
  3167  } else if (dxfer_dir == SG_DXFER_FROM_DEV) {
  3168  /* r0w = READ; */
  3169  up = uptr64(h4p->din_xferp);
  3170  

Re: [PATCH 05/19] sg: replace rq array with lists

2019-05-25 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20190524]
[cannot apply to v5.2-rc1]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/sg.c:2808:20: sparse: sparse: incorrect type in initializer 
>> (different base types) @@expected int gfp @@got restricted gfp_t 
>> [usertyint gfp @@
>> drivers/scsi/sg.c:2808:20: sparse:expected int gfp
>> drivers/scsi/sg.c:2808:20: sparse:got restricted gfp_t [usertype]
>> drivers/scsi/sg.c:2811:51: sparse: sparse: restricted gfp_t degrades to 
>> integer
>> drivers/scsi/sg.c:2811:49: sparse: sparse: incorrect type in argument 2 
>> (different base types) @@expected restricted gfp_t [usertype] flags @@   
>>  got  [usertype] flags @@
>> drivers/scsi/sg.c:2811:49: sparse:expected restricted gfp_t [usertype] 
>> flags
>> drivers/scsi/sg.c:2811:49: sparse:got unsigned int
   drivers/scsi/sg.c:2813:51: sparse: sparse: restricted gfp_t degrades to 
integer
   drivers/scsi/sg.c:2813:49: sparse: sparse: incorrect type in argument 2 
(different base types) @@expected restricted gfp_t [usertype] flags @@
got  [usertype] flags @@
   drivers/scsi/sg.c:2813:49: sparse:expected restricted gfp_t [usertype] 
flags
   drivers/scsi/sg.c:2813:49: sparse:got unsigned int
   include/linux/spinlock.h:393:9: sparse: sparse: context imbalance in 
'sg_add_request' - different lock contexts for basic block

vim +2808 drivers/scsi/sg.c

  2797  
  2798  /*
  2799   * Makes a new sg_request object. If 'first' is set then use GFP_KERNEL 
which
  2800   * may take time but has improved chance of success, otherwise use 
GFP_ATOMIC.
  2801   * Note that basic initialization is done but srp is not added to 
either sfp
  2802   * list. On error returns twisted negated errno value (not NULL).
  2803   */
  2804  static struct sg_request *
  2805  sg_mk_srp(struct sg_fd *sfp, bool first)
  2806  {
  2807  struct sg_request *srp;
> 2808  int gfp =  __GFP_NOWARN;
  2809  
  2810  if (first)  /* prepared to wait if none already outstanding 
*/
> 2811  srp = kzalloc(sizeof(*srp), gfp | GFP_KERNEL);
  2812  else
  2813  srp = kzalloc(sizeof(*srp), gfp | GFP_ATOMIC);
  2814  if (srp) {
  2815  spin_lock_init(&srp->req_lck);
  2816  atomic_set(&srp->rq_st, SG_RS_INACTIVE);
  2817  srp->parentfp = sfp;
  2818  return srp;
  2819  } else {
  2820  return ERR_PTR(-ENOMEM);
  2821  }
  2822  }
  2823  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


Re: [PATCH 05/19] sg: replace rq array with lists

2019-05-25 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20190524]
[cannot apply to v5.2-rc1]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   drivers/scsi/sg.c: In function 'sg_ioctl':
>> drivers/scsi/sg.c:1698:1: warning: the frame size of 5824 bytes is larger 
>> than 2048 bytes [-Wframe-larger-than=]
}
^

vim +1698 drivers/scsi/sg.c

c5ad643d Douglas Gilbert   2019-05-24  1465  
c5ad643d Douglas Gilbert   2019-05-24  1466  static long
c5ad643d Douglas Gilbert   2019-05-24  1467  sg_ioctl(struct file *filp, 
unsigned int cmd_in, unsigned long arg)
c5ad643d Douglas Gilbert   2019-05-24  1468  {
c5ad643d Douglas Gilbert   2019-05-24  1469 bool read_only = O_RDWR != 
(filp->f_flags & O_ACCMODE);
c5ad643d Douglas Gilbert   2019-05-24  1470 bool check_detach = false;
c5ad643d Douglas Gilbert   2019-05-24  1471 int val;
c5ad643d Douglas Gilbert   2019-05-24  1472 int result = 0;
c5ad643d Douglas Gilbert   2019-05-24  1473 void __user *p = uptr64(arg);
c5ad643d Douglas Gilbert   2019-05-24  1474 int __user *ip = p;
c5ad643d Douglas Gilbert   2019-05-24  1475 struct sg_device *sdp;
c5ad643d Douglas Gilbert   2019-05-24  1476 struct sg_fd *sfp;
c5ad643d Douglas Gilbert   2019-05-24  1477 struct sg_request *srp;
c5ad643d Douglas Gilbert   2019-05-24  1478 struct scsi_device *sdev;
c5ad643d Douglas Gilbert   2019-05-24  1479 __maybe_unused const char *pmlp 
= ", pass to mid-level";
c5ad643d Douglas Gilbert   2019-05-24  1480  
c5ad643d Douglas Gilbert   2019-05-24  1481 sfp = filp->private_data;
c5ad643d Douglas Gilbert   2019-05-24  1482 sdp = sfp->parentdp;
c5ad643d Douglas Gilbert   2019-05-24  1483 SG_LOG(6, sdp, "%s: cmd=0x%x, 
O_NONBLOCK=%d\n", __func__, cmd_in,
c5ad643d Douglas Gilbert   2019-05-24  1484!!(filp->f_flags & 
O_NONBLOCK));
c5ad643d Douglas Gilbert   2019-05-24  1485 if (!sdp)
c5ad643d Douglas Gilbert   2019-05-24  1486 return -ENXIO;
c5ad643d Douglas Gilbert   2019-05-24  1487 if 
(unlikely(atomic_read(&sdp->detaching)))
c5ad643d Douglas Gilbert   2019-05-24  1488 return -ENODEV;
c5ad643d Douglas Gilbert   2019-05-24  1489 sdev = sdp->device;
c5ad643d Douglas Gilbert   2019-05-24  1490  
c5ad643d Douglas Gilbert   2019-05-24  1491 switch (cmd_in) {
c5ad643d Douglas Gilbert   2019-05-24  1492 case SG_IO:
c5ad643d Douglas Gilbert   2019-05-24  1493 return 
sg_ctl_sg_io(filp, sdp, sfp, p);
c5ad643d Douglas Gilbert   2019-05-24  1494 case SG_GET_SCSI_ID:
c5ad643d Douglas Gilbert   2019-05-24  1495 return 
sg_ctl_scsi_id(sdev, sdp, p);
^1da177e Linus Torvalds2005-04-16  1496 case SG_SET_FORCE_PACK_ID:
c5ad643d Douglas Gilbert   2019-05-24  1497 SG_LOG(3, sdp, "%s:
SG_SET_FORCE_PACK_ID\n", __func__);
^1da177e Linus Torvalds2005-04-16  1498 result = get_user(val, 
ip);
^1da177e Linus Torvalds2005-04-16  1499 if (result)
^1da177e Linus Torvalds2005-04-16  1500 return result;
c5ad643d Douglas Gilbert   2019-05-24  1501 
assign_bit(SG_FFD_FORCE_PACKID, sfp->ffd_bm, !!val);
^1da177e Linus Torvalds2005-04-16  1502 return 0;
c5ad643d Douglas Gilbert   2019-05-24  1503 case SG_GET_PACK_ID:/* or 
tag of oldest "read"-able, -1 if none */
c5ad643d Douglas Gilbert   2019-05-24  1504 rcu_read_lock();
c5ad643d Douglas Gilbert   2019-05-24  1505 val = -1;
c5ad643d Douglas Gilbert   2019-05-24  1506 
list_for_each_entry_rcu(srp, &sfp->rq_list, rq_entry) {
c5ad643d Douglas Gilbert   2019-05-24  1507 if 
(SG_RS_AWAIT_READ(srp) &&
c5ad643d Douglas Gilbert   2019-05-24  1508 
!test_bit(SG_FRQ_SYNC_INVOC, srp->frq_bm)) {
c5ad643d Douglas Gilbert   2019-05-24  1509 val = 
srp->pack_id;
c5ad643d Douglas Gilbert   2019-05-24  1510 break;
^1da177e Linus Torvalds2005-04-16  1511  

Re: [PATCH 07/19] sg: add sg v4 interface support

2019-05-25 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20190524]
[cannot apply to v5.2-rc1]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/sg-v4-interface-rq-sharing-multiple-rqs/20190525-161346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 7.4.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=xtensa 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   drivers//scsi/sg.c: In function 'sg_v4_receive':
>> drivers//scsi/sg.c:1125:18: warning: cast from pointer to integer of 
>> different size [-Wpointer-to-int-cast]
 h4p->response = (u64)srp->s_hdr4.sbp;
 ^

vim +1125 drivers//scsi/sg.c

  1091  
  1092  static int
  1093  sg_v4_receive(struct sg_fd *sfp, struct sg_request *srp, void __user *p,
  1094struct sg_io_v4 *h4p)
  1095  {
  1096  int err, err2;
  1097  u32 rq_result = srp->rq_result;
  1098  
  1099  SG_LOG(3, sfp->parentdp, "%s: p=%s, h4p=%s\n", __func__,
  1100 (p ? "given" : "NULL"), (h4p ? "given" : "NULL"));
  1101  err = sg_rec_v3v4_state(sfp, srp, true);
  1102  h4p->guard = 'Q';
  1103  h4p->protocol = 0;
  1104  h4p->subprotocol = 0;
  1105  h4p->device_status = rq_result & 0xff;
  1106  h4p->driver_status = driver_byte(rq_result);
  1107  h4p->transport_status = host_byte(rq_result);
  1108  h4p->response_len = srp->sense_len;
  1109  h4p->info = srp->rq_info;
  1110  h4p->flags = srp->rq_flags;
    h4p->duration = srp->duration;
  1112  switch (srp->s_hdr4.dir) {
  1113  case SG_DXFER_FROM_DEV:
  1114  h4p->din_xfer_len = srp->sgat_h.dlen;
  1115  break;
  1116  case SG_DXFER_TO_DEV:
  1117  h4p->dout_xfer_len = srp->sgat_h.dlen;
  1118  break;
  1119  default:
  1120  break;
  1121  }
  1122  h4p->din_resid = srp->in_resid;
  1123  h4p->dout_resid = srp->s_hdr4.out_resid;
  1124  h4p->usr_ptr = srp->s_hdr4.usr_ptr;
> 1125  h4p->response = (u64)srp->s_hdr4.sbp;
  1126  h4p->request_extra = srp->pack_id;
  1127  if (p) {
  1128  if (copy_to_user(p, h4p, SZ_SG_IO_V4))
  1129  err = err ? err : -EFAULT;
  1130  }
  1131  err2 = sg_rstate_chg(srp, atomic_read(&srp->rq_st), 
SG_RS_DONE_RD);
  1132  if (err2)
  1133  err = err ? err : err2;
  1134  sg_finish_scsi_blk_rq(srp);
  1135  sg_deact_request(sfp, srp);
  1136  return err < 0 ? err : 0;
  1137  }
  1138  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[RFC PATCH] mpt3sas: _base_put_smid_fast_path can be static

2019-05-18 Thread kbuild test robot


Fixes: 0f30229824bc ("mpt3sas: function pointers of request descriptor")
Signed-off-by: kbuild test robot 
---
 mpt3sas_base.c |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c 
b/drivers/scsi/mpt3sas/mpt3sas_base.c
index f8bdb45..ab0392a 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -3535,7 +3535,7 @@ _base_put_smid_scsi_io(struct MPT3SAS_ADAPTER *ioc, u16 
smid, u16 handle)
  * @smid: system request message index
  * @handle: device handle
  */
-void
+static void
 _base_put_smid_fast_path(struct MPT3SAS_ADAPTER *ioc, u16 smid,
u16 handle)
 {
@@ -3558,7 +3558,7 @@ _base_put_smid_fast_path(struct MPT3SAS_ADAPTER *ioc, u16 
smid,
  * @smid: system request message index
  * @msix_task: msix_task will be same as msix of IO incase of task abort else 
0.
  */
-void
+static void
 _base_put_smid_hi_priority(struct MPT3SAS_ADAPTER *ioc, u16 smid,
u16 msix_task)
 {
@@ -3621,7 +3621,7 @@ mpt3sas_base_put_smid_nvme_encap(struct MPT3SAS_ADAPTER 
*ioc, u16 smid)
  * @ioc: per adapter object
  * @smid: system request message index
  */
-void
+static void
 _base_put_smid_default(struct MPT3SAS_ADAPTER *ioc, u16 smid)
 {
Mpi2RequestDescriptorUnion_t descriptor;


Re: [PATCH 01/10] mpt3sas: function pointers of request descriptor

2019-05-18 Thread kbuild test robot
Hi Suganath,

I love your patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v5.1 next-20190517]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Suganath-Prabu-S/mpt3sas-Aero-Sea-HBA-feature-addition/20190518-092803
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/mpt3sas/mpt3sas_base.c:1515:64: sparse: sparse: incorrect type 
in argument 2 (different address spaces) @@expected void volatile [noderef] 
 *addr @@got id volatile [noderef]  *addr @@
   drivers/scsi/mpt3sas/mpt3sas_base.c:1515:64: sparse:expected void 
volatile [noderef]  *addr
   drivers/scsi/mpt3sas/mpt3sas_base.c:1515:64: sparse:got unsigned long 
long [usertype] *
   drivers/scsi/mpt3sas/mpt3sas_base.c:1569:52: sparse: sparse: incorrect type 
in argument 2 (different address spaces) @@expected void volatile [noderef] 
 *addr @@got id volatile [noderef]  *addr @@
   drivers/scsi/mpt3sas/mpt3sas_base.c:1569:52: sparse:expected void 
volatile [noderef]  *addr
   drivers/scsi/mpt3sas/mpt3sas_base.c:1569:52: sparse:got unsigned long 
long [usertype] *
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3539:1: sparse: sparse: symbol 
>> '_base_put_smid_fast_path' was not declared. Should it be static?
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3562:1: sparse: sparse: symbol 
>> '_base_put_smid_hi_priority' was not declared. Should it be static?
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3625:1: sparse: sparse: symbol 
>> '_base_put_smid_default' was not declared. Should it be static?
   drivers/scsi/mpt3sas/mpt3sas_base.c:5317:24: sparse: sparse: incorrect type 
in argument 1 (different base types) @@expected unsigned int val @@got 
restricted __le3unsigned int val @@
   drivers/scsi/mpt3sas/mpt3sas_base.c:5317:24: sparse:expected unsigned 
int val
   drivers/scsi/mpt3sas/mpt3sas_base.c:5317:24: sparse:got restricted 
__le32 [usertype]
   drivers/scsi/mpt3sas/mpt3sas_base.c:5336:20: sparse: sparse: cast to 
restricted __le16
   drivers/scsi/mpt3sas/mpt3sas_base.c:5344:20: sparse: sparse: cast to 
restricted __le16
   drivers/scsi/mpt3sas/mpt3sas_base.c:5357:36: sparse: sparse: cast to 
restricted __le16
   drivers/scsi/mpt3sas/mpt3sas_base.c:6442:55: sparse: sparse: incorrect type 
in argument 2 (different address spaces) @@expected void volatile [noderef] 
 *addr @@got id volatile [noderef]  *addr @@
   drivers/scsi/mpt3sas/mpt3sas_base.c:6442:55: sparse:expected void 
volatile [noderef]  *addr
   drivers/scsi/mpt3sas/mpt3sas_base.c:6442:55: sparse:got unsigned long 
long [usertype] *

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


Re: [PATCH] osst: kill obsolete driver

2019-05-04 Thread kbuild test robot
Hi Hannes,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v5.1-rc7]
[cannot apply to next-20190503]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Hannes-Reinecke/osst-kill-obsolete-driver/20190505-075653
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-kexec (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All errors (new ones prefixed by >>):

>> drivers//scsi/st.c:230:10: fatal error: osst_detect.h: No such file or 
>> directory
#include "osst_detect.h"
 ^~~
   compilation terminated.

vim +230 drivers//scsi/st.c

6c648d95 Jeff Mahoney   2012-08-18  227  
f03a5670 Kai Makisara   2005-08-02  228  
^1da177e Linus Torvalds 2005-04-16  229  
^1da177e Linus Torvalds 2005-04-16 @230  #include "osst_detect.h"
^1da177e Linus Torvalds 2005-04-16  231  #ifndef SIGS_FROM_OSST
^1da177e Linus Torvalds 2005-04-16  232  #define SIGS_FROM_OSST \
^1da177e Linus Torvalds 2005-04-16  233 {"OnStream", "SC-", "", 
"osst"}, \
^1da177e Linus Torvalds 2005-04-16  234 {"OnStream", "DI-", "", 
"osst"}, \
^1da177e Linus Torvalds 2005-04-16  235 {"OnStream", "DP-", "", 
"osst"}, \
^1da177e Linus Torvalds 2005-04-16  236 {"OnStream", "USB", "", 
"osst"}, \
^1da177e Linus Torvalds 2005-04-16  237 {"OnStream", "FW-", "", "osst"}
^1da177e Linus Torvalds 2005-04-16  238  #endif
^1da177e Linus Torvalds 2005-04-16  239  

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

:: TO: Linus Torvalds 
:: CC: Linus Torvalds 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH net-next 02/10] qed: Add llh ppfid interface and 100g support for offload protocols

2019-05-02 Thread kbuild test robot
Hi Michal,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:
https://github.com/0day-ci/linux/commits/Michal-Kalderon/qed-Improve-performance-on-100G-link-for-offload-protocols/20190502-143528
config: x86_64-randconfig-b0-05021924 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 

All warnings (new ones prefixed by >>):

   drivers/net/ethernet/qlogic/qed/qed_dev.c: In function 
'qed_llh_add_mac_filter':
>> drivers/net/ethernet/qlogic/qed/qed_dev.c:981:8: warning: missing braces 
>> around initializer [-Wmissing-braces]
 union qed_llh_filter filter = {0};
   ^
   drivers/net/ethernet/qlogic/qed/qed_dev.c:981:8: warning: (near 
initialization for 'filter.mac') [-Wmissing-braces]
   drivers/net/ethernet/qlogic/qed/qed_dev.c: In function 
'qed_llh_add_protocol_filter':
   drivers/net/ethernet/qlogic/qed/qed_dev.c:1115:8: warning: missing braces 
around initializer [-Wmissing-braces]
 union qed_llh_filter filter = {0};
   ^
   drivers/net/ethernet/qlogic/qed/qed_dev.c:1115:8: warning: (near 
initialization for 'filter.mac') [-Wmissing-braces]
   drivers/net/ethernet/qlogic/qed/qed_dev.c: In function 
'qed_llh_remove_mac_filter':
   drivers/net/ethernet/qlogic/qed/qed_dev.c:1181:8: warning: missing braces 
around initializer [-Wmissing-braces]
 union qed_llh_filter filter = {0};
   ^
   drivers/net/ethernet/qlogic/qed/qed_dev.c:1181:8: warning: (near 
initialization for 'filter.mac') [-Wmissing-braces]
   drivers/net/ethernet/qlogic/qed/qed_dev.c: In function 
'qed_llh_remove_protocol_filter':
   drivers/net/ethernet/qlogic/qed/qed_dev.c:1232:8: warning: missing braces 
around initializer [-Wmissing-braces]
 union qed_llh_filter filter = {0};
   ^
   drivers/net/ethernet/qlogic/qed/qed_dev.c:1232:8: warning: (near 
initialization for 'filter.mac') [-Wmissing-braces]

vim +981 drivers/net/ethernet/qlogic/qed/qed_dev.c

   975  
   976  int qed_llh_add_mac_filter(struct qed_dev *cdev,
   977 u8 ppfid, u8 mac_addr[ETH_ALEN])
   978  {
   979  struct qed_hwfn *p_hwfn = QED_LEADING_HWFN(cdev);
   980  struct qed_ptt *p_ptt = qed_ptt_acquire(p_hwfn);
 > 981  union qed_llh_filter filter = {0};
   982  u8 filter_idx, abs_ppfid;
   983  u32 high, low, ref_cnt;
   984  int rc = 0;
   985  
   986  if (!p_ptt)
   987  return -EAGAIN;
   988  
   989  if (!test_bit(QED_MF_LLH_MAC_CLSS, &cdev->mf_bits))
   990  goto out;
   991  
   992  memcpy(filter.mac.addr, mac_addr, ETH_ALEN);
   993  rc = qed_llh_shadow_add_filter(cdev, ppfid,
   994 QED_LLH_FILTER_TYPE_MAC,
   995 &filter, &filter_idx, &ref_cnt);
   996  if (rc)
   997  goto err;
   998  
   999  /* Configure the LLH only in case of a new the filter */
  1000  if (ref_cnt == 1) {
  1001  rc = qed_llh_abs_ppfid(cdev, ppfid, &abs_ppfid);
  1002  if (rc)
  1003  goto err;
  1004  
  1005  high = mac_addr[1] | (mac_addr[0] << 8);
  1006  low = mac_addr[5] | (mac_addr[4] << 8) | (mac_addr[3] 
<< 16) |
  1007(mac_addr[2] << 24);
  1008  rc = qed_llh_add_filter(p_hwfn, p_ptt, abs_ppfid, 
filter_idx,
  1009  0, high, low);
  1010  if (rc)
  1011  goto err;
  1012  }
  1013  
  1014  DP_VERBOSE(cdev,
  1015 QED_MSG_SP,
  1016 "LLH: Added MAC filter [%pM] to ppfid %hhd [abs 
%hhd] at idx %hhd [ref_cnt %d]\n",
  1017 mac_addr, ppfid, abs_ppfid, filter_idx, ref_cnt);
  1018  
  1019  goto out;
  1020  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[scsi:misc 301/301] drivers/scsi/fdomain.c:442:12: sparse: sparse: context imbalance in 'fdomain_host_reset' - wrong count at exit

2019-04-30 Thread kbuild test robot
Hi Ondrej,

First bad commit (maybe != root cause):

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
head:   9bee24d08c08a08464b97e1da5c37acbc57a67df
commit: 9bee24d08c08a08464b97e1da5c37acbc57a67df [301/301] scsi: fdomain: 
Resurrect driver - PCI support
reproduce:
# apt-get install sparse
git checkout 9bee24d08c08a08464b97e1da5c37acbc57a67df
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/fdomain.c:442:12: sparse: sparse: context imbalance in 
>> 'fdomain_host_reset' - wrong count at exit

vim +/fdomain_host_reset +442 drivers/scsi/fdomain.c

92408047 Ondrej Zary 2019-04-29  441  
92408047 Ondrej Zary 2019-04-29 @442  static int fdomain_host_reset(struct 
scsi_cmnd *cmd)
92408047 Ondrej Zary 2019-04-29  443  {
92408047 Ondrej Zary 2019-04-29  444struct Scsi_Host *sh = 
cmd->device->host;
92408047 Ondrej Zary 2019-04-29  445struct fdomain *fd = shost_priv(sh);
92408047 Ondrej Zary 2019-04-29  446unsigned long flags;
92408047 Ondrej Zary 2019-04-29  447  
92408047 Ondrej Zary 2019-04-29  448spin_lock_irqsave(sh->host_lock, flags);
92408047 Ondrej Zary 2019-04-29  449fdomain_reset(fd->base);
92408047 Ondrej Zary 2019-04-29  450spin_lock_irqsave(sh->host_lock, flags);
92408047 Ondrej Zary 2019-04-29  451return SUCCESS;
92408047 Ondrej Zary 2019-04-29  452  }
92408047 Ondrej Zary 2019-04-29  453  

:: The code at line 442 was first introduced by commit
:: 9240804729fef84f15b018e27e398b9a79ac94d7 scsi: fdomain: Resurrect driver 
- core code

:: TO: Ondrej Zary 
:: CC: Martin K. Petersen 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


Re: [PATCH 11/21] megaraid_sas: Dump system interface regs from sysfs

2019-04-26 Thread kbuild test robot
Hi Shivasharan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.1-rc6 next-20190426]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Shivasharan-S/megaraid_sas-Driver-updates/20190426-182011
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/megaraid/megaraid_sas_base.c:96:5: sparse: symbol 'rdpq_enable' 
was not declared. Should it be static?
   drivers/scsi/megaraid/megaraid_sas_base.c:104:14: sparse: symbol 
'scmd_timeout' was not declared. Should it be static?
   drivers/scsi/megaraid/megaraid_sas_base.c:4418:21: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4418:21:expected restricted 
__le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:4418:21:got int
   drivers/scsi/megaraid/megaraid_sas_base.c:4653:21: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4653:21:expected restricted 
__le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:4653:21:got int
   drivers/scsi/megaraid/megaraid_sas_base.c:6244:21: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:6244:21:expected restricted 
__le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:6244:21:got int
   drivers/scsi/megaraid/megaraid_sas_base.c:4325:21: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4325:21:expected restricted 
__le16 [usertype] flags
   drivers/scsi/megaraid/megaraid_sas_base.c:4325:21:got int
   include/linux/slab.h:664:13: sparse: undefined identifier 
'__builtin_mul_overflow'
   drivers/scsi/megaraid/megaraid_sas_base.c:262:31: sparse: restricted __le16 
degrades to integer
   drivers/scsi/megaraid/megaraid_sas_base.c:268:31: sparse: cast from 
restricted __le16
   drivers/scsi/megaraid/megaraid_sas_base.c:394:29: sparse: cast to restricted 
__le32
   drivers/scsi/megaraid/megaraid_sas_base.c:1183:32: sparse: incorrect type in 
assignment (different base types) @@expected unsigned int [unsigned] 
[usertype] opcode @@got ed int [unsigned] [usertype] opcode @@
   drivers/scsi/megaraid/megaraid_sas_base.c:1183:32:expected unsigned int 
[unsigned] [usertype] opcode
   drivers/scsi/megaraid/megaraid_sas_base.c:1183:32:got restricted __le32 
[usertype] opcode
   drivers/scsi/megaraid/megaraid_sas_base.c:1881:25: sparse: expression using 
sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:1881:25: sparse: expression using 
sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:1969:33: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_base.c:1977:34: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_base.c:1915:27: sparse: expression using 
sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_base.c:2918:24: sparse: cast removes 
address space of expression
>> drivers/scsi/megaraid/megaraid_sas_base.c:2923:41: sparse: incorrect type in 
>> argument 1 (different address spaces) @@expected void const volatile 
>> [noderef] *addr @@got st volatile [noderef] *addr @@
   drivers/scsi/megaraid/megaraid_sas_base.c:2923:41:expected void const 
volatile [noderef] *addr
   drivers/scsi/megaraid/megaraid_sas_base.c:2923:41:got restricted __le32 
[usertype] *
   drivers/scsi/megaraid/megaraid_sas_base.c:2923:41: sparse: cast to 
restricted __le32
   drivers/scsi/megaraid/megaraid_sas_base.c:3275:25: sparse: symbol 
'megaraid_host_attrs' was not declared. Should it be static?
   include/linux/slab.h:664:13: sparse: not a function 
   drivers/scsi/megaraid/megaraid_sas_base.c:4541:21: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4765:21: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_base.c:4886:25: sparse: expression using 
sizeof(void)
   drivers/scsi/m

Re: [PATCH 06/21] megaraid_sas: IRQ poll to avoid CPU hard lockups

2019-04-26 Thread kbuild test robot
Hi Shivasharan,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.1-rc6 next-20190426]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Shivasharan-S/megaraid_sas-Driver-updates/20190426-182011
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/megaraid/megaraid_sas_fusion.c:357:49: sparse: expression using 
sizeof(void)
   include/linux/slab.h:664:13: sparse: undefined identifier 
'__builtin_mul_overflow'
   drivers/scsi/megaraid/megaraid_sas_fusion.c:577:1: sparse: symbol 
'megasas_alloc_request_fusion' was not declared. Should it be static?
   drivers/scsi/megaraid/megaraid_sas_fusion.c:658:1: sparse: symbol 
'megasas_alloc_reply_fusion' was not declared. Should it be static?
   drivers/scsi/megaraid/megaraid_sas_fusion.c:842:70: sparse: incorrect type 
in assignment (different base types) @@expected unsigned long long 
[unsigned] [usertype] RDPQBaseAddress @@got g long [unsigned] [usertype] 
RDPQBaseAddress @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:851:51: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le64 
[usertype] Words @@got __le64 [usertype] Words @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:735:1: sparse: symbol 
'megasas_alloc_rdpq_fusion' was not declared. Should it be static?
   drivers/scsi/megaraid/megaraid_sas_fusion.c:1234:29: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:1237:29: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:1337:21: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:1438:21: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] flags @@got e] flags @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:1986:27: sparse: expression 
using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_fusion.c:2100:31: sparse: expression 
using sizeof(void)
   drivers/scsi/megaraid/megaraid_sas_fusion.c:2168:34: sparse: incorrect type 
in assignment (different base types) @@expected unsigned long long 
[unsigned] [long] [long long] [usertype]  @@got long] [long long] 
[usertype]  @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:2173:26: sparse: incorrect type 
in assignment (different base types) @@expected unsigned long long 
[unsigned] [long] [long long] [usertype]  @@got long] [long long] 
[usertype]  @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3051:60: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] virtual_disk_tgt_id @@got unsignedrestricted __le16 [usertype] 
virtual_disk_tgt_id @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3056:47: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] config_seq_num @@got unsignedrestricted __le16 [usertype] 
config_seq_num @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3057:39: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] DevHandle @@got unsignedrestricted __le16 [usertype] DevHandle @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3264:48: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] DevHandle @@got unsignedrestricted __le16 [usertype] DevHandle @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3265:39: sparse: incorrect type 
in assignment (different base types) @@expected restricted __le16 
[usertype] DevHandle @@got unsignedrestricted __le16 [usertype] DevHandle @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3266:35: sparse: incorrect type 
in assignment (different base types) @@expected unsigned short [unsigned] 
[usertype] r1_alt_dev_handle @@got  short [unsigned] [usertype] 
r1_alt_dev_handle @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3267:70: sparse: incorrect type 
in assignment (different base types) @@expected unsigned short [unsigned] 
[usertype] peer_smid @@got  short [unsigned] [usertype] peer_smid @@
   drivers/scsi/megaraid/megaraid_sas_fusion.c:3269:73: spa

[RFC PATCH] megaraid_sas: megasas_enable_irq_poll() can be static

2019-04-26 Thread kbuild test robot


Fixes: 6fd317c8bbeb ("megaraid_sas: IRQ poll to avoid CPU hard lockups")
Signed-off-by: kbuild test robot 
---
 megaraid_sas_fusion.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c 
b/drivers/scsi/megaraid/megaraid_sas_fusion.c
index 4d90c7ae..51ee643 100644
--- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
+++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
@@ -3597,7 +3597,7 @@ complete_cmd_fusion(struct megasas_instance *instance, 
u32 MSIxIndex,
 /**
  * megasas_enable_irq_poll() - enable irqpoll
  */
-void megasas_enable_irq_poll(struct megasas_instance *instance)
+static void megasas_enable_irq_poll(struct megasas_instance *instance)
 {
u32 count, i;
struct megasas_irq_context *irq_ctx;


[scsi:misc 192/192] drivers/scsi/qla2xxx/tcm_qla2xxx.c:1614:3: error: implicit declaration of function 'vzalloc'; did you mean 'kvzalloc'?

2019-04-09 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
head:   523c106ad4b186f1f869accf24be35c370f5e611
commit: 523c106ad4b186f1f869accf24be35c370f5e611 [192/192] scsi: tcm_qla2xxx: 
Minimize #include directives
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 523c106ad4b186f1f869accf24be35c370f5e611
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=sparc64 

All error/warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/tcm_qla2xxx.c: In function 'tcm_qla2xxx_init_lport':
>> drivers/scsi/qla2xxx/tcm_qla2xxx.c:1614:3: error: implicit declaration of 
>> function 'vzalloc'; did you mean 'kvzalloc'? 
>> [-Werror=implicit-function-declaration]
  vzalloc(array_size(65536,
  ^~~
  kvzalloc
>> drivers/scsi/qla2xxx/tcm_qla2xxx.c:1613:26: warning: assignment makes 
>> pointer from integer without a cast [-Wint-conversion]
 lport->lport_loopid_map =
 ^
   drivers/scsi/qla2xxx/tcm_qla2xxx.c: In function 'tcm_qla2xxx_make_lport':
>> drivers/scsi/qla2xxx/tcm_qla2xxx.c:1677:2: error: implicit declaration of 
>> function 'vfree'; did you mean 'kvfree'? 
>> [-Werror=implicit-function-declaration]
 vfree(lport->lport_loopid_map);
 ^
 kvfree
   cc1: some warnings being treated as errors

vim +1614 drivers/scsi/qla2xxx/tcm_qla2xxx.c

75f8c1f6 Nicholas Bellinger 2012-05-15  1602  
75f8c1f6 Nicholas Bellinger 2012-05-15  1603  static int 
tcm_qla2xxx_init_lport(struct tcm_qla2xxx_lport *lport)
75f8c1f6 Nicholas Bellinger 2012-05-15  1604  {
75f8c1f6 Nicholas Bellinger 2012-05-15  1605int rc;
75f8c1f6 Nicholas Bellinger 2012-05-15  1606  
75f8c1f6 Nicholas Bellinger 2012-05-15  1607rc = 
btree_init32(&lport->lport_fcport_map);
75f8c1f6 Nicholas Bellinger 2012-05-15  1608if (rc) {
75f8c1f6 Nicholas Bellinger 2012-05-15  1609pr_err("Unable to 
initialize lport->lport_fcport_map btree\n");
75f8c1f6 Nicholas Bellinger 2012-05-15  1610return rc;
75f8c1f6 Nicholas Bellinger 2012-05-15  1611}
75f8c1f6 Nicholas Bellinger 2012-05-15  1612  
fad953ce Kees Cook  2018-06-12 @1613lport->lport_loopid_map =
fad953ce Kees Cook  2018-06-12 @1614
vzalloc(array_size(65536,
fad953ce Kees Cook  2018-06-12  1615   
sizeof(struct tcm_qla2xxx_fc_loopid)));
75f8c1f6 Nicholas Bellinger 2012-05-15  1616if (!lport->lport_loopid_map) {
75f8c1f6 Nicholas Bellinger 2012-05-15  1617pr_err("Unable to 
allocate lport->lport_loopid_map of %zu bytes\n",
75f8c1f6 Nicholas Bellinger 2012-05-15  1618sizeof(struct 
tcm_qla2xxx_fc_loopid) * 65536);
75f8c1f6 Nicholas Bellinger 2012-05-15  1619
btree_destroy32(&lport->lport_fcport_map);
75f8c1f6 Nicholas Bellinger 2012-05-15  1620return -ENOMEM;
75f8c1f6 Nicholas Bellinger 2012-05-15  1621}
75f8c1f6 Nicholas Bellinger 2012-05-15  1622pr_debug("qla2xxx: Allocated 
lport_loopid_map of %zu bytes\n",
75f8c1f6 Nicholas Bellinger 2012-05-15  1623   sizeof(struct 
tcm_qla2xxx_fc_loopid) * 65536);
75f8c1f6 Nicholas Bellinger 2012-05-15  1624return 0;
75f8c1f6 Nicholas Bellinger 2012-05-15  1625  }
75f8c1f6 Nicholas Bellinger 2012-05-15  1626  
49a47f2c Nicholas Bellinger 2014-01-14  1627  static int 
tcm_qla2xxx_lport_register_cb(struct scsi_qla_host *vha,
49a47f2c Nicholas Bellinger 2014-01-14  1628
 void *target_lport_ptr,
49a47f2c Nicholas Bellinger 2014-01-14  1629
 u64 npiv_wwpn, u64 npiv_wwnn)
75f8c1f6 Nicholas Bellinger 2012-05-15  1630  {
49a47f2c Nicholas Bellinger 2014-01-14  1631struct qla_hw_data *ha = 
vha->hw;
49a47f2c Nicholas Bellinger 2014-01-14  1632struct tcm_qla2xxx_lport *lport 
=
49a47f2c Nicholas Bellinger 2014-01-14  1633(struct 
tcm_qla2xxx_lport *)target_lport_ptr;
75f8c1f6 Nicholas Bellinger 2012-05-15  1634/*
49a47f2c Nicholas Bellinger 2014-01-14  1635 * Setup tgt_ops, local pointer 
to vha and target_lport_ptr
75f8c1f6 Nicholas Bellinger 2012-05-15  1636 */
49a47f2c Nicholas Bellinger 2014-01-14  1637ha->tgt.tgt_ops = 
&tcm_qla2xxx_template;
49a47f2c Nicholas Bellinger 2014-01-14  1638vha->vha_tgt.target_lport_ptr = 
target_lport_ptr;
75f8c1f6 Nicholas Bellinger 2012-05-15  1639lport->qla_vha = vha;
75f8c1f6 Nicholas Bellinger 2012-05-15  1640  
75f8c1f6 Nicholas Bellinger 2012-05-15  1641return 0;
75f8c1f6 Nicholas Bellinger 2012-05-15  1642  }
75f8c1f6 Nicholas Bellinger 2012-05-15  1643  
75f8c1f6 Nicholas Bellinger 2012-05-15  1644  static struct se_wwn 
*tcm_qla2xxx_make_lport(
75f8c1f6 Nicholas Bellinger 2012-05-15  1645 

Re: [PATCH v2] blk-mq: fix a hung issue when set device state to blocked and restore running

2019-03-21 Thread kbuild test robot
Hi zhengbin,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.1-rc1 next-20190321]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/zhengbin/blk-mq-fix-a-hung-issue-when-set-device-state-to-blocked-and-restore-running/20190321-180603
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-x012-201911 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/scsi/scsi_sysfs.c: In function 'store_state_field':
>> drivers/scsi/scsi_sysfs.c:773:2: warning: ISO C90 forbids mixed declarations 
>> and code [-Wdeclaration-after-statement]
 enum scsi_device_state oldstate = sdev->sdev_state;
 ^~~~

vim +773 drivers/scsi/scsi_sysfs.c

   752  
   753  static ssize_t
   754  store_state_field(struct device *dev, struct device_attribute *attr,
   755const char *buf, size_t count)
   756  {
   757  int i, ret;
   758  struct scsi_device *sdev = to_scsi_device(dev);
   759  enum scsi_device_state state = 0;
   760  
   761  for (i = 0; i < ARRAY_SIZE(sdev_states); i++) {
   762  const int len = strlen(sdev_states[i].name);
   763  if (strncmp(sdev_states[i].name, buf, len) == 0 &&
   764 buf[len] == '\n') {
   765  state = sdev_states[i].value;
   766  break;
   767  }
   768  }
   769  if (!state)
   770  return -EINVAL;
   771  
   772  mutex_lock(&sdev->state_mutex);
 > 773  enum scsi_device_state oldstate = sdev->sdev_state;
   774  ret = scsi_device_set_state(sdev, state);
   775  if (ret == 0) {
   776  /* If device use blk-mq, the device state changes from
   777   * SDEV_BLOCK to SDEV_RUNNING, we need to run hw queue
   778   * to avoid io hung.
   779   */
   780  if ((state == SDEV_RUNNING) && (oldstate == 
SDEV_BLOCK)) {
   781  struct request_queue *q = sdev->request_queue;
   782  
   783  if (q->mq_ops)
   784  blk_mq_run_hw_queues(q, true);
   785  }
   786  }
   787  mutex_unlock(&sdev->state_mutex);
   788  
   789  return ret == 0 ? count : -EINVAL;
   790  }
   791  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 04/26] qedf: Simplify s/g list mapping.

2019-03-17 Thread kbuild test robot
Hi Saurav,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.0 next-20190306]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Saurav-Kashyap/qedf-Misc-fixes-for-the-driver/20190305-205913
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'


sparse warnings: (new ones prefixed by >>)

   include/linux/slab.h:664:13: sparse: undefined identifier 
'__builtin_mul_overflow'
   drivers/scsi/qedf/qedf_io.c:469:42: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] lo @@got 
unsignrestricted __le32 [usertype] lo @@
   drivers/scsi/qedf/qedf_io.c:469:42:expected restricted __le32 [usertype] 
lo
   drivers/scsi/qedf/qedf_io.c:469:42:got unsigned int [unsigned] 
[usertype] 
   drivers/scsi/qedf/qedf_io.c:470:43: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] hi @@got 
unsignrestricted __le32 [usertype] hi @@
   drivers/scsi/qedf/qedf_io.c:470:43:expected restricted __le32 [usertype] 
hi
   drivers/scsi/qedf/qedf_io.c:470:43:got unsigned int [unsigned] 
[usertype] 
>> drivers/scsi/qedf/qedf_io.c:471:38: sparse: incorrect type in assignment 
>> (different base types) @@expected restricted __le32 [usertype] sge_len 
>> @@got unsigned int [unsrestricted __le32 [usertype] sge_len @@
   drivers/scsi/qedf/qedf_io.c:471:38:expected restricted __le32 [usertype] 
sge_len
   drivers/scsi/qedf/qedf_io.c:471:38:got unsigned int [unsigned] 
[assigned] [usertype] sg_len
   drivers/scsi/qedf/qedf_io.c:598:59: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] lo @@got 
unsignrestricted __le32 [usertype] lo @@
   drivers/scsi/qedf/qedf_io.c:598:59:expected restricted __le32 [usertype] 
lo
   drivers/scsi/qedf/qedf_io.c:598:59:got unsigned int [unsigned] 
[usertype] 
   drivers/scsi/qedf/qedf_io.c:600:59: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] hi @@got 
unsignrestricted __le32 [usertype] hi @@
   drivers/scsi/qedf/qedf_io.c:600:59:expected restricted __le32 [usertype] 
hi
   drivers/scsi/qedf/qedf_io.c:600:59:got unsigned int [unsigned] 
[usertype] 
   drivers/scsi/qedf/qedf_io.c:612:40: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] lo @@got 
unsignrestricted __le32 [usertype] lo @@
   drivers/scsi/qedf/qedf_io.c:612:40:expected restricted __le32 [usertype] 
lo
   drivers/scsi/qedf/qedf_io.c:612:40:got unsigned int [unsigned] 
[usertype] 
   drivers/scsi/qedf/qedf_io.c:613:40: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] hi @@got 
unsignrestricted __le32 [usertype] hi @@
   drivers/scsi/qedf/qedf_io.c:613:40:expected restricted __le32 [usertype] 
hi
   drivers/scsi/qedf/qedf_io.c:613:40:got unsigned int [unsigned] 
[usertype] 
   drivers/scsi/qedf/qedf_io.c:621:33: sparse: incorrect type in assignment 
(different base types) @@expected unsigned int [unsigned]  @@
got restrunsigned int [unsigned]  @@
   drivers/scsi/qedf/qedf_io.c:621:33:expected unsigned int [unsigned] 

   drivers/scsi/qedf/qedf_io.c:621:33:got restricted __be32 [usertype] 

   drivers/scsi/qedf/qedf_io.c:677:26: sparse: incorrect type in assignment 
(different base types) @@expected restricted __be16 [usertype] fh_ox_id @@  
  got unsignedrestricted __be16 [usertype] fh_ox_id @@
   drivers/scsi/qedf/qedf_io.c:677:26:expected restricted __be16 [usertype] 
fh_ox_id
   drivers/scsi/qedf/qedf_io.c:677:26:got unsigned short [unsigned] 
[usertype] xid
   drivers/scsi/qedf/qedf_io.c:681:31: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [addressable] 
[usertype] parameter @@got e32 [addressable] [usertype] parameter @@
   drivers/scsi/qedf/qedf_io.c:681:31:expected restricted __le32 
[addressable] [usertype] parameter
   drivers/scsi/qedf/qedf_io.c:681:31:got restricted __be32 [usertype] 
fh_parm_offset
   drivers/scsi/qedf/qedf_io.c:686:27: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le16 [addressable] 
[assigned] [usertype] rx_id @@got sable] [assigned] [usertype] rx_id @@
   drivers/scsi/qedf/qedf_io.c:686:27:expected restricted __le16 
[addressable] [assigned] [usertype] rx_id
   drivers/scsi/qedf/qedf_io.c:686:27:got restricted __be16 [usertype] 
fh_rx_id
   drivers/scsi/qedf/qedf_io.c:687:27: sparse: incorrect type in assignment 
(different bas

Re: [PATCH v3 07/14] qla2xxx: Cleanups for NVRAM/Flash read/write path

2019-03-12 Thread kbuild test robot
Hi Joe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190312-172400
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

All warnings (new ones prefixed by >>):

>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
   drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse:expected restricted 
__le32 [usertype] end_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:284:44: sparse:got unsigned long 
[assigned] [usertype] end
   drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse:expected restricted 
__le32 [usertype] start_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:289:46: sparse:got unsigned long 
[assigned] [usertype] start
   drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse:expected restricted 
__le32 [usertype] end_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:290:44: sparse:got unsigned long 
[assigned] [usertype] end
   drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse:expected restricted 
__le32 [usertype] start_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:296:46: sparse:got unsigned long 
[assigned] [usertype] start
   drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse:expected restricted 
__le32 [usertype] end_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:297:44: sparse:got unsigned long 
[assigned] [usertype] end
   drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse:expected restricted 
__le32 [usertype] start_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:301:46: sparse:got unsigned long 
[assigned] [usertype] start
   drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse:expected restricted 
__le32 [usertype] end_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:302:44: sparse:got unsigned long 
[assigned] [usertype] end
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
   drivers/scsi/qla2xxx/qla_tmpl.c:557:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:558:24: sparse: warning: cast to restricted 
__le32
>> drivers/scsi/qla2xxx/qla_tmpl.c:137:38: sparse: warning: restricted __le32 
>> degrades to integer
   drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse: warning: incorrect type in 
initializer (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse:expected unsigned long 
[usertype] addr
   drivers/scsi/qla2xxx/qla_tmpl.c:578:31: sparse:got restricted __le32 
[usertype] addr
   drivers/scsi

Re: [PATCH v2 07/14] qla2xxx: Cleanups for NVRAM/Flash read/write path

2019-03-08 Thread kbuild test robot
Hi Joe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190309-120215
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   In file included from include/uapi/linux/swab.h:7,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/xtensa/include/uapi/asm/byteorder.h:8,
from arch/xtensa/include/asm/bitops.h:23,
from include/linux/bitops.h:19,
from include/linux/kernel.h:11,
from drivers/scsi/qla2xxx/qla_def.h:10,
from drivers/scsi/qla2xxx/qla_tmpl.c:7:
   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_fwdt_entry_other':
>> arch/xtensa/include/uapi/asm/swab.h:24:5: warning: 'x' is used uninitialized 
>> in this function [-Wuninitialized]
__asm__("ssai 8   \n\t"
^~~
   drivers/scsi/qla2xxx/qla_tmpl.c:781:1: note: 'x' was declared here
qla27xx_fwdt_entry_other(struct scsi_qla_host *vha,
^~~~
   In file included from include/uapi/linux/swab.h:7,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/xtensa/include/uapi/asm/byteorder.h:8,
from arch/xtensa/include/asm/bitops.h:23,
from include/linux/bitops.h:19,
from include/linux/kernel.h:11,
from drivers/scsi/qla2xxx/qla_def.h:10,
from drivers/scsi/qla2xxx/qla_tmpl.c:7:
   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_fwdt_entry_t276':
>> arch/xtensa/include/uapi/asm/swab.h:24:5: warning: 'x' is used uninitialized 
>> in this function [-Wuninitialized]
__asm__("ssai 8   \n\t"
^~~
   drivers/scsi/qla2xxx/qla_tmpl.c:725:1: note: 'x' was declared here
qla27xx_fwdt_entry_t276(struct scsi_qla_host *vha,
^~~
   In file included from include/uapi/linux/swab.h:7,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/xtensa/include/uapi/asm/byteorder.h:8,
from arch/xtensa/include/asm/bitops.h:23,
from include/linux/bitops.h:19,
from include/linux/kernel.h:11,
from drivers/scsi/qla2xxx/qla_def.h:10,
from drivers/scsi/qla2xxx/qla_tmpl.c:7:
>> arch/xtensa/include/uapi/asm/swab.h:24:5: warning: 'x' is used uninitialized 
>> in this function [-Wuninitialized]
__asm__("ssai 8   \n\t"
^~~
   drivers/scsi/qla2xxx/qla_tmpl.c:725:1: note: 'x' was declared here
qla27xx_fwdt_entry_t276(struct scsi_qla_host *vha,
^~~
   In file included from include/uapi/linux/swab.h:7,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from include/linux/byteorder/big_endian.h:5,
from arch/xtensa/include/uapi/asm/byteorder.h:8,
from arch/xtensa/include/asm/bitops.h:23,
from include/linux/bitops.h:19,
from include/linux/kernel.h:11,
from drivers/scsi/qla2xxx/qla_def.h:10,
from drivers/scsi/qla2xxx/qla_tmpl.c:7:
   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_walk_template':
>> arch/xtensa/include/uapi/asm/swab.h:24:5: warning: 'x' is used uninitialized 
>> in this function [-Wuninitialized]
__asm__("ssai 8   \n\t"
^~~
   drivers/scsi/qla2xxx/qla_tmpl.c:839:1: note: 'x' was declared here
qla27xx_walk_template(struct scsi_qla_host *vha,
^
   In file included from include/uapi/linux/swab.h:7,
from include/linux/swab.h:5,
from include/uapi/linux/byteorder/big_endian.h:13,
from in

Re: [PATCH v2 07/14] qla2xxx: Cleanups for NVRAM/Flash read/write path

2019-03-08 Thread kbuild test robot
Hi Joe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190309-120215
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: ia64-allyesconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 8.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=ia64 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_fwdt_entry_other':
   drivers/scsi/qla2xxx/qla_tmpl.c:784:8: warning: 'x' is used uninitialized in 
this function [-Wuninitialized]
 ulong type = le32_to_cpu(*qla_fw_addr32(ent->hdr.type));
   ^~~~
   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_fwdt_entry_t278':
   drivers/scsi/qla2xxx/qla_tmpl.c:769:8: warning: 'x' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 ulong data_addr = le32_to_cpu(*qla_fw_addr32(ent->t278.data_addr));
   ^
   In file included from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/topology.h:33,
from include/linux/gfp.h:9,
from include/linux/umh.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/scsi/qla2xxx/qla_def.h:13,
from drivers/scsi/qla2xxx/qla_tmpl.c:7:
>> arch/ia64/include/asm/io.h:362:42: warning: 'x' may be used uninitialized in 
>> this function [-Wmaybe-uninitialized]
 *(volatile unsigned int __force *) addr = val;
 ^
   drivers/scsi/qla2xxx/qla_tmpl.c:763:1: note: 'x' was declared here
qla27xx_fwdt_entry_t278(struct scsi_qla_host *vha,
^~~
   drivers/scsi/qla2xxx/qla_tmpl.c:767:8: warning: 'x' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 ulong cmd_addr = le32_to_cpu(*qla_fw_addr32(ent->t278.cmd_addr));
   ^~~~
   In file included from arch/ia64/include/asm/smp.h:21,
from include/linux/smp.h:68,
from include/linux/topology.h:33,
from include/linux/gfp.h:9,
from include/linux/umh.h:4,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from drivers/scsi/qla2xxx/qla_def.h:13,
from drivers/scsi/qla2xxx/qla_tmpl.c:7:
>> arch/ia64/include/asm/io.h:362:42: warning: 'x' may be used uninitialized in 
>> this function [-Wmaybe-uninitialized]
 *(volatile unsigned int __force *) addr = val;
 ^
   drivers/scsi/qla2xxx/qla_tmpl.c:763:1: note: 'x' was declared here
qla27xx_fwdt_entry_t278(struct scsi_qla_host *vha,
^~~
   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_fwdt_entry_t277':
   drivers/scsi/qla2xxx/qla_tmpl.c:33:18: warning: 'x' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
  *(__le32 *)buf = cpu_to_le32(value);
   drivers/scsi/qla2xxx/qla_tmpl.c:745:1: note: 'x' was declared here
qla27xx_fwdt_entry_t277(struct scsi_qla_host *vha,
^~~
   drivers/scsi/qla2xxx/qla_tmpl.c:749:8: warning: 'x' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 ulong cmd_addr = le32_to_cpu(*qla_fw_addr32(ent->t277.cmd_addr));
   ^~~~
   drivers/scsi/qla2xxx/qla_tmpl.c:751:8: warning: 'x' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 ulong data_addr = le32_to_cpu(*qla_fw_addr32(ent->t277.data_addr));
   ^
   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_fwdt_entry_t276':
   drivers/scsi/qla2xxx/qla_tmpl.c:728:8: warning: 'x' is used uninitialized in 
this function [-Wuninitialized]
 ulong cond1 = le32_to_cpu(*qla_fw_addr32(ent->t276.cond1));
   ^
   drivers/scsi/qla2xxx/qla_tmpl.c:729:8: warning: 'x' may be used 
uninitialized in this function [-Wmaybe-uninitialized]
 ulong cond2 = le32_to_cpu(*qla_fw_addr32(ent->t276.cond2));
   ^
   drivers/scsi/qla2xxx/qla_tmpl.c: In function 'qla27xx_fwdt_entry_t274':
   drivers/scsi/qla2xxx/qla_tmpl.c:637:8: warning: 'x' is used uninitialized in 
this function [-Wuninitialized]
 ulong type = le32_to_cp

Re: [PATCH v2 08/14] qla2xxx: Add support for multiple fwdump templates/segments

2019-03-08 Thread kbuild test robot
Hi Joe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190309-120215
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 8.2.0-11) 8.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=sparc64 

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_init.c: In function 'qla24xx_load_risc_blob':
>> drivers/scsi/qla2xxx/qla_init.c:7658:42: warning: format '%x' expects 
>> argument of type 'unsigned int', but argument 7 has type 'long int' 
>> [-Wformat=]
   "-> Loading fragment %u: %#x <- %#x (%#lx words)...\n",
   ~~^
   %#lx
   drivers/scsi/qla2xxx/qla_init.c:7660:8:
   fwcode - (typeof(fwcode))blob->fw->data, dlen);
   ~~~
   drivers/scsi/qla2xxx/qla_init.c:7692:38: warning: format '%x' expects 
argument of type 'unsigned int', but argument 6 has type 'long int' [-Wformat=]
  "-> fwdt%u template array at %#x (%#x dwords)\n",
   ~~^
   %#lx
  j, (void *)fwcode - (void *)blob->fw->data, risc_size);
 ~~~

vim +7658 drivers/scsi/qla2xxx/qla_init.c

  7586  
  7587  static int
  7588  qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
  7589  {
  7590  int rval;
  7591  uint templates, segments, fragment;
  7592  uint32_t *dcode;
  7593  ulong dlen;
  7594  uint32_t risc_addr, risc_size, risc_attr = 0;
  7595  ulong i;
  7596  uint j;
  7597  struct fw_blob *blob;
  7598  uint32_t *fwcode;
  7599  struct qla_hw_data *ha = vha->hw;
  7600  struct req_que *req = ha->req_q_map[0];
  7601  struct fwdt *fwdt = ha->fwdt;
  7602  
  7603  ql_dbg(ql_dbg_init, vha, 0x0090,
  7604  "-> FW: Loading via request-firmware.\n");
  7605  
  7606  blob = qla2x00_request_firmware(vha);
  7607  if (!blob) {
  7608  ql_log(ql_log_warn, vha, 0x0092,
  7609  "-> Firmware file not found.\n");
  7610  
  7611  return QLA_FUNCTION_FAILED;
  7612  }
  7613  
  7614  fwcode = (void *)blob->fw->data;
  7615  dcode = fwcode + 4;
  7616  if (qla24xx_risc_firmware_invalid(dcode)) {
  7617  ql_log(ql_log_fatal, vha, 0x0093,
  7618  "Unable to verify integrity of firmware image 
(%zd).\n",
  7619  blob->fw->size);
  7620  return QLA_FUNCTION_FAILED;
  7621  }
  7622  for (i = 0; i < 4; i++)
  7623  dcode[i] = be32_to_cpu(fwcode[i + 4]);
  7624  if ((dcode[0] == 0x && dcode[1] == 0x &&
  7625  dcode[2] == 0x && dcode[3] == 0x) ||
  7626  (dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 &&
  7627  dcode[3] == 0)) {
  7628  ql_log(ql_log_fatal, vha, 0x0094,
  7629  "Unable to verify integrity of firmware image 
(%zd).\n",
  7630  blob->fw->size);
  7631  ql_log(ql_log_fatal, vha, 0x0095,
  7632  "Firmware data: %08x %08x %08x %08x.\n",
  7633  dcode[0], dcode[1], dcode[2], dcode[3]);
  7634  return QLA_FUNCTION_FAILED;
  7635  }
  7636  
  7637  dcode = (void *)req->ring;
  7638  *srisc_addr = 0;
  7639  segments = FA_RISC_CODE_SEGMENTS;
  7640  for (j = 0; j < segments; j++) {
  7641  ql_dbg(ql_dbg_init, vha, 0x0096,
  7642  "-> Loading segment %u...\n", j);
  7643  risc_addr = be32_to_cpu(fwcode[2]);
  7644  risc_size = be32_to_cpu(fwcode[3]);
  7645  
  7646  if (!*srisc_addr) {
  7647  *srisc_addr = risc_addr;
  7648  risc_attr = be32_to_cpu(fwcode[9]);
  7649  }
  7650  
  7651  dlen = ha->fw_transfer_size >> 2;
  7652  for (fragment = 0; risc_size; fragment++) {
  7653  dlen = (uint32_t)(ha->fw_transfer_size >> 2);
  7654  if (dlen > risc_size)
  7655

Re: [PATCH 07/14] qla2xxx: Cleanups for NVRAM/Flash read/write path

2019-03-08 Thread kbuild test robot
Hi Joe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190308-141231
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

All warnings (new ones prefixed by >>):

>> drivers/scsi/qla2xxx/qla_tmpl.c:168:22: sparse: warning: cast to restricted 
>> __le32
>> drivers/scsi/qla2xxx/qla_tmpl.c:170:23: sparse: warning: cast to restricted 
>> __le16
   drivers/scsi/qla2xxx/qla_tmpl.c:185:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:187:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:203:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:204:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:206:22: sparse: warning: cast to restricted 
__le16
   drivers/scsi/qla2xxx/qla_tmpl.c:222:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:224:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:226:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:258:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:272:23: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:273:21: sparse: warning: cast to restricted 
__le32
>> drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse: warning: incorrect type in 
>> assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse:expected unsigned int 
[usertype] end_addr
   drivers/scsi/qla2xxx/qla_tmpl.c:286:44: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_tmpl.c:458:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:559:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:560:24: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:596:23: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:597:24: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:639:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:702:24: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:703:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:730:23: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:731:23: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:751:26: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:752:29: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:753:27: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:769:26: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:770:29: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:771:27: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:772:25: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:786:22: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:845:27: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:846:23: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:852:24: sparse: warning: cast to restricted 
__le32
   drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse:expected unsigned int 
[usertype] capture_timestamp
   drivers/scsi/qla2xxx/qla_tmpl.c:882:32: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse:expected unsigned int
   drivers/scsi/qla2xxx/qla_tmpl.c:893:29: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse:expected unsigned int
   drivers/scsi/qla2xxx/qla_tmpl.c:895:29: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_tmpl.c:896:29: sparse:expected unsigned int
   drivers/scsi/q

Re: [PATCH 09/14] qla2xxx: Update flash read/write routine

2019-03-08 Thread kbuild test robot
Hi Joe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190308-141231
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_sup.c: In function 'qla24xx_write_flash_data':
>> drivers/scsi/qla2xxx/qla_sup.c:1306:42: warning: format '%llx' expects 
>> argument of type 'long long unsigned int', but argument 7 has type 
>> 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
   "Failed burst-write at %x (%p/%#llx)\n",
 ^
 %#x
   drivers/scsi/qla2xxx/qla_sup.c:1308:8:
   optrom_dma);
   ~~ 

vim +1306 drivers/scsi/qla2xxx/qla_sup.c

  1232  
  1233  static int
  1234  qla24xx_write_flash_data(scsi_qla_host_t *vha, uint32_t *dwptr, 
uint32_t faddr,
  1235  uint32_t dwords)
  1236  {
  1237  int ret;
  1238  ulong liter;
  1239  ulong dburst = OPTROM_BURST_DWORDS; /* burst size in dwords */
  1240  uint32_t sec_mask, rest_addr, fdata;
  1241  dma_addr_t optrom_dma;
  1242  void *optrom = NULL;
  1243  struct qla_hw_data *ha = vha->hw;
  1244  
  1245  if (!IS_QLA25XX(ha) && !IS_QLA81XX(ha) && !IS_QLA83XX(ha) &&
  1246  !IS_QLA27XX(ha) && !IS_QLA28XX(ha))
  1247  goto next;
  1248  
  1249  /* Allocate dma buffer for burst write */
  1250  optrom = dma_alloc_coherent(&ha->pdev->dev, OPTROM_BURST_SIZE,
  1251  &optrom_dma, GFP_KERNEL);
  1252  if (!optrom) {
  1253  ql_log(ql_log_warn, vha, 0x7095,
  1254  "Failed allocate burst (%x bytes)\n", 
OPTROM_BURST_SIZE);
  1255  }
  1256  
  1257  next:
  1258  ql_log(ql_log_warn + ql_dbg_verbose, vha, 0x7095,
  1259  "Unprotect flash...\n");
  1260  ret = qla24xx_unprotect_flash(vha);
  1261  if (ret) {
  1262  ql_log(ql_log_warn, vha, 0x7096,
  1263  "Failed to unprotect flash.\n");
  1264  goto done;
  1265  }
  1266  
  1267  rest_addr = (ha->fdt_block_size >> 2) - 1;
  1268  sec_mask = ~rest_addr;
  1269  for (liter = 0; liter < dwords; liter++, faddr++, dwptr++) {
  1270  fdata = (faddr & sec_mask) << 2;
  1271  
  1272  /* Are we at the beginning of a sector? */
  1273  if (!(faddr & rest_addr)) {
  1274  ql_log(ql_log_warn + ql_dbg_verbose, vha, 
0x7095,
  1275  "Erase sector %#x...\n", faddr);
  1276  
  1277  ret = qla24xx_erase_sector(vha, fdata);
  1278  if (ret) {
  1279  ql_dbg(ql_dbg_user, vha, 0x7007,
  1280  "Failed to erase sector %x.\n", 
faddr);
  1281  break;
  1282  }
  1283  }
  1284  
  1285  if (optrom) {
  1286  /* If smaller than a burst remaining */
  1287  if (dwords - liter < dburst)
  1288  dburst = dwords - liter;
  1289  
  1290  /* Copy to dma buffer */
  1291  memcpy(optrom, dwptr, dburst << 2);
  1292  
  1293  /* Burst write */
  1294  ql_log(ql_log_warn + ql_dbg_verbose, vha, 
0x7095,
  1295  "Write burst (%#lx dwords)...\n", dburst);
  1296  ret = qla2x00_load_ram(vha, optrom_dma,
  1297  flash_data_addr(ha, faddr), dburst);
  1298  if (!ret) {
  1299  liter += dburst - 1;
  1300  faddr += dburst - 1;
  1301  dwptr += dburst - 1;
  1302  continue;
  1303  }
  1304  
  1305  ql_log(ql_log_warn, vha, 0x7097,
> 1306  "Failed burst-write at %x (%p/%#llx)\n",
  1307

Re: [PATCH 08/14] qla2xxx: Add support for multiple fwdump templates/segments

2019-03-07 Thread kbuild test robot
Hi Joe,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-support-for-ISP28XX-Gen7-adapter/20190308-141231
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_init.c: In function 'qla24xx_load_risc_blob':
>> drivers/scsi/qla2xxx/qla_init.c:7658:43: warning: format '%lx' expects 
>> argument of type 'long unsigned int', but argument 7 has type 'int' 
>> [-Wformat=]
   "-> Loading fragment %u: %#x <- %#lx (%#lx words)...\n",
   ~~~^
   %#x
   drivers/scsi/qla2xxx/qla_init.c:7660:8:
   fwcode - (typeof(fwcode))blob->fw->data, dlen);
   ~~~
   drivers/scsi/qla2xxx/qla_init.c:7692:39: warning: format '%lx' expects 
argument of type 'long unsigned int', but argument 6 has type 'int' [-Wformat=]
  "-> fwdt%u template array at %#lx (%#x dwords)\n",
   ~~~^
   %#x
  j, (void *)fwcode - (void *)blob->fw->data, risc_size);
 ~~~

vim +7658 drivers/scsi/qla2xxx/qla_init.c

  7586  
  7587  static int
  7588  qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr)
  7589  {
  7590  int rval;
  7591  uint templates, segments, fragment;
  7592  uint32_t *dcode;
  7593  ulong dlen;
  7594  uint32_t risc_addr, risc_size, risc_attr = 0;
  7595  ulong i;
  7596  uint j;
  7597  struct fw_blob *blob;
  7598  uint32_t *fwcode;
  7599  struct qla_hw_data *ha = vha->hw;
  7600  struct req_que *req = ha->req_q_map[0];
  7601  struct fwdt *fwdt = ha->fwdt;
  7602  
  7603  ql_dbg(ql_dbg_init, vha, 0x0090,
  7604  "-> FW: Loading via request-firmware.\n");
  7605  
  7606  blob = qla2x00_request_firmware(vha);
  7607  if (!blob) {
  7608  ql_log(ql_log_warn, vha, 0x0092,
  7609  "-> Firmware file not found.\n");
  7610  
  7611  return QLA_FUNCTION_FAILED;
  7612  }
  7613  
  7614  fwcode = (void *)blob->fw->data;
  7615  dcode = fwcode + 4;
  7616  if (qla24xx_risc_firmware_invalid(dcode)) {
  7617  ql_log(ql_log_fatal, vha, 0x0093,
  7618  "Unable to verify integrity of firmware image 
(%zd).\n",
  7619  blob->fw->size);
  7620  return QLA_FUNCTION_FAILED;
  7621  }
  7622  for (i = 0; i < 4; i++)
  7623  dcode[i] = be32_to_cpu(fwcode[i + 4]);
  7624  if ((dcode[0] == 0x && dcode[1] == 0x &&
  7625  dcode[2] == 0x && dcode[3] == 0x) ||
  7626  (dcode[0] == 0 && dcode[1] == 0 && dcode[2] == 0 &&
  7627  dcode[3] == 0)) {
  7628  ql_log(ql_log_fatal, vha, 0x0094,
  7629  "Unable to verify integrity of firmware image 
(%zd).\n",
  7630  blob->fw->size);
  7631  ql_log(ql_log_fatal, vha, 0x0095,
  7632  "Firmware data: %08x %08x %08x %08x.\n",
  7633  dcode[0], dcode[1], dcode[2], dcode[3]);
  7634  return QLA_FUNCTION_FAILED;
  7635  }
  7636  
  7637  dcode = (void *)req->ring;
  7638  *srisc_addr = 0;
  7639  segments = FA_RISC_CODE_SEGMENTS;
  7640  for (j = 0; j < segments; j++) {
  7641  ql_dbg(ql_dbg_init, vha, 0x0096,
  7642  "-> Loading segment %u...\n", j);
  7643  risc_addr = be32_to_cpu(fwcode[2]);
  7644  risc_size = be32_to_cpu(fwcode[3]);
  7645  
  7646  if (!*srisc_addr) {
  7647  *srisc_addr = risc_addr;
  7648  risc_attr = be32_to_cpu(fwcode[9]);
  7649  }
  7650  
  7651  dlen = ha->fw_transfer_size >> 2;
  7652  for (fragment = 0; risc_size; fragment++) {
  7653  dlen = (uint32_t)(ha->fw_transfer_size >> 2);
  7654  if (

Re: [PATCH v3] fcoe: make use of fip_mode enum complete

2019-02-15 Thread kbuild test robot
Hi Sedat,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v5.0-rc4 next-20190215]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Hannes-Reinecke/fcoe-make-use-of-fip_mode-enum-complete/20190215-175222
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-x017-201906 (attached as .config)
compiler: gcc-8 (Debian 8.2.0-20) 8.2.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/scsi//fcoe/fcoe_ctlr.c: In function 'fcoe_ctlr_link_up':
>> drivers/scsi//fcoe/fcoe_ctlr.c:460:4: error: implicit declaration of 
>> function 'fcoe_ctrl_set_state'; did you mean 'fcoe_ctlr_set_state'? 
>> [-Werror=implicit-function-declaration]
   fcoe_ctrl_set_state(fip, FIP_ST_AUTO);
   ^~~
   fcoe_ctlr_set_state
   cc1: some warnings being treated as errors

vim +460 drivers/scsi//fcoe/fcoe_ctlr.c

   443  
   444  /**
   445   * fcoe_ctlr_link_up() - Start FCoE controller
   446   * @fip: The FCoE controller to start
   447   *
   448   * Called from the LLD when the network link is ready.
   449   */
   450  void fcoe_ctlr_link_up(struct fcoe_ctlr *fip)
   451  {
   452  mutex_lock(&fip->ctlr_mutex);
   453  if (fip->state == FIP_ST_NON_FIP || fip->state == FIP_ST_AUTO) {
   454  mutex_unlock(&fip->ctlr_mutex);
   455  fc_linkup(fip->lp);
   456  } else if (fip->state == FIP_ST_LINK_WAIT) {
   457  if (fip->mode == FIP_MODE_NON_FIP)
   458  fcoe_ctlr_set_state(fip, FIP_ST_NON_FIP);
   459  else
 > 460  fcoe_ctrl_set_state(fip, FIP_ST_AUTO);
   461  switch (fip->mode) {
   462  default:
   463  LIBFCOE_FIP_DBG(fip, "invalid mode %d\n", 
fip->mode);
   464  /* fall-through */
   465  case FIP_MODE_AUTO:
   466  LIBFCOE_FIP_DBG(fip, "%s", "setting AUTO 
mode.\n");
   467  /* fall-through */
   468  case FIP_MODE_FABRIC:
   469  case FIP_MODE_NON_FIP:
   470  mutex_unlock(&fip->ctlr_mutex);
   471  fc_linkup(fip->lp);
   472  fcoe_ctlr_solicit(fip, NULL);
   473  break;
   474  case FIP_MODE_VN2VN:
   475  fcoe_ctlr_vn_start(fip);
   476  mutex_unlock(&fip->ctlr_mutex);
   477  fc_linkup(fip->lp);
   478  break;
   479  }
   480  } else
   481  mutex_unlock(&fip->ctlr_mutex);
   482  }
   483  EXPORT_SYMBOL(fcoe_ctlr_link_up);
   484  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 3/6] mpt3sas: Irq poll to avoid CPU hard lockups.

2019-02-14 Thread kbuild test robot
Hi Suganath,

I love your patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v5.0-rc4 next-20190214]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Suganath-Prabu/Irq-poll-to-address-cpu-lockup/20190214-172626
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "irq_poll_init" [drivers/scsi/mpt3sas/mpt3sas.ko] undefined!
>> ERROR: "irq_poll_enable" [drivers/scsi/mpt3sas/mpt3sas.ko] undefined!
>> ERROR: "irq_poll_sched" [drivers/scsi/mpt3sas/mpt3sas.ko] undefined!
>> ERROR: "irq_poll_disable" [drivers/scsi/mpt3sas/mpt3sas.ko] undefined!
>> ERROR: "irq_poll_complete" [drivers/scsi/mpt3sas/mpt3sas.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 3/4] bfa: fix calls to dma_set_mask_and_coherent()

2019-02-13 Thread kbuild test robot
Hi Hannes,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v5.0-rc4 next-20190212]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-fixup-dma_set_mask_and_coherent-calls/20190214-044535
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.2.0 make.cross ARCH=xtensa 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   drivers/scsi/bfa/bfad.c: In function 'bfad_pci_init':
>> drivers/scsi/bfa/bfad.c:730:6: warning: 'rc' may be used uninitialized in 
>> this function [-Wmaybe-uninitialized]
 int rc;
 ^~

vim +/rc +730 drivers/scsi/bfa/bfad.c

   726  
   727  int
   728  bfad_pci_init(struct pci_dev *pdev, struct bfad_s *bfad)
   729  {
 > 730  int rc;
   731  
   732  if (pci_enable_device(pdev)) {
   733  printk(KERN_ERR "pci_enable_device fail %p\n", pdev);
   734  goto out;
   735  }
   736  
   737  if (pci_request_regions(pdev, BFAD_DRIVER_NAME))
   738  goto out_disable_device;
   739  
   740  pci_set_master(pdev);
   741  
   742  rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
   743  if (rc)
   744  rc = dma_set_mask_and_coherent(&pdev->dev, 
DMA_BIT_MASK(32));
   745  
   746  if (rc) {
   747  printk(KERN_ERR "dma_set_mask_and_coherent fail %p\n", 
pdev);
   748  goto out_release_region;
   749  }
   750  rc = -ENODEV;
   751  
   752  /* Enable PCIE Advanced Error Recovery (AER) if kernel supports 
*/
   753  pci_enable_pcie_error_reporting(pdev);
   754  
   755  bfad->pci_bar0_kva = pci_iomap(pdev, 0, pci_resource_len(pdev, 
0));
   756  bfad->pci_bar2_kva = pci_iomap(pdev, 2, pci_resource_len(pdev, 
2));
   757  
   758  if (bfad->pci_bar0_kva == NULL) {
   759  printk(KERN_ERR "Fail to map bar0\n");
   760  goto out_release_region;
   761  }
   762  
   763  bfad->hal_pcidev.pci_slot = PCI_SLOT(pdev->devfn);
   764  bfad->hal_pcidev.pci_func = PCI_FUNC(pdev->devfn);
   765  bfad->hal_pcidev.pci_bar_kva = bfad->pci_bar0_kva;
   766  bfad->hal_pcidev.device_id = pdev->device;
   767  bfad->hal_pcidev.ssid = pdev->subsystem_device;
   768  bfad->pci_name = pci_name(pdev);
   769  
   770  bfad->pci_attr.vendor_id = pdev->vendor;
   771  bfad->pci_attr.device_id = pdev->device;
   772  bfad->pci_attr.ssid = pdev->subsystem_device;
   773  bfad->pci_attr.ssvid = pdev->subsystem_vendor;
   774  bfad->pci_attr.pcifn = PCI_FUNC(pdev->devfn);
   775  
   776  bfad->pcidev = pdev;
   777  
   778  /* Adjust PCIe Maximum Read Request Size */
   779  if (pci_is_pcie(pdev) && pcie_max_read_reqsz) {
   780  if (pcie_max_read_reqsz >= 128 &&
   781  pcie_max_read_reqsz <= 4096 &&
   782  is_power_of_2(pcie_max_read_reqsz)) {
   783  int max_rq = pcie_get_readrq(pdev);
   784  printk(KERN_WARNING "BFA[%s]: "
   785  "pcie_max_read_request_size is %d, "
   786  "reset to %d\n", bfad->pci_name, max_rq,
   787  pcie_max_read_reqsz);
   788  pcie_set_readrq(pdev, pcie_max_read_reqsz);
   789  } else {
   790  printk(KERN_WARNING "BFA[%s]: invalid "
   791 "pcie_max_read_request_size %d 
ignored\n",
   792 bfad->pci_name, pcie_max_read_reqsz);
   793  }
   794  }
   795  
   796  pci_save_state(pdev);
   797  
   798  return 0;
   799  
   800  out_release_region:
   801  pci_release_regions(pdev);
   802  out_disable_device:
   803  pci_disable_device(pdev);
   804  out:
   805  return rc;
   806  }
   807  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 02/12] qla2xxx: Add First Burst support for FC-NVMe devices

2019-02-13 Thread kbuild test robot
Hi Darren,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20190212]
[cannot apply to v5.0-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Misc-bug-fixes-for-the-driver/20190213-094944
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_nvme.c:361:40: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:361:40: sparse:expected unsigned short 
[usertype] control_flags
   drivers/scsi/qla2xxx/qla_nvme.c:361:40: sparse:got restricted __le16 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:366:40: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:366:40: sparse:expected unsigned short 
[usertype] control_flags
   drivers/scsi/qla2xxx/qla_nvme.c:366:40: sparse:got restricted __le16 
[usertype]
>> drivers/scsi/qla2xxx/qla_nvme.c:374:56: sparse: warning: invalid assignment: 
>> |=
   drivers/scsi/qla2xxx/qla_nvme.c:374:56: sparse:left side has type 
unsigned short
   drivers/scsi/qla2xxx/qla_nvme.c:374:56: sparse:right side has type 
restricted __le16
   drivers/scsi/qla2xxx/qla_nvme.c:384:31: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:384:31: sparse:expected unsigned short 
[usertype] nport_handle
   drivers/scsi/qla2xxx/qla_nvme.c:384:31: sparse:got restricted __le16 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:391:35: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:391:35: sparse:expected unsigned short 
[usertype] nvme_rsp_dsd_len
   drivers/scsi/qla2xxx/qla_nvme.c:391:35: sparse:got restricted __le16 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:392:43: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:392:43: sparse:expected unsigned int
   drivers/scsi/qla2xxx/qla_nvme.c:392:43: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:393:43: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:393:43: sparse:expected unsigned int
   drivers/scsi/qla2xxx/qla_nvme.c:393:43: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:396:37: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:396:37: sparse:expected unsigned short 
[usertype] nvme_cmnd_dseg_len
   drivers/scsi/qla2xxx/qla_nvme.c:396:37: sparse:got restricted __le16 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:397:44: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:397:44: sparse:expected unsigned int
   drivers/scsi/qla2xxx/qla_nvme.c:397:44: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:398:44: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:398:44: sparse:expected unsigned int
   drivers/scsi/qla2xxx/qla_nvme.c:398:44: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:400:29: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:400:29: sparse:expected unsigned short 
[usertype] dseg_count
   drivers/scsi/qla2xxx/qla_nvme.c:400:29: sparse:got restricted __le16 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:401:29: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:401:29: sparse:expected unsigned int 
[usertype] byte_count
   drivers/scsi/qla2xxx/qla_nvme.c:401:29: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:429:64: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:429:64: sparse:expected unsigned int 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:429:64: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:437:28: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:437:28: sparse:expected unsigned int 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:437:28: sparse:got restricted __le32 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:438:28: sparse: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/qla2xxx/qla_nvme.c:438:28: sparse:expected unsigned int 
[usertype]
   drivers/scsi/qla2xxx/qla_nvme.c:438:28:

Re: [PATCH] scsi: add debugfs directories

2019-01-01 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/scsi-add-debugfs-directories/20190101-234113
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-s5-01020141 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "scsi_debugfs_uld" [drivers/scsi/scsi_mod.ko] undefined!
>> ERROR: "scsi_debugfs_root" [drivers/scsi/scsi_mod.ko] undefined!
>> ERROR: "scsi_debugfs_lld" [drivers/scsi/scsi_mod.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] scsi: add debugfs directories

2019-01-01 Thread kbuild test robot
Hi Douglas,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Douglas-Gilbert/scsi-add-debugfs-directories/20190101-234113
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: i386-randconfig-s0-201900 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/scsi/scsi.o: In function `exit_scsi':
>> drivers/scsi/scsi.c:856: undefined reference to `scsi_debugfs_root'
   drivers/scsi/scsi.o: In function `init_scsi':
   drivers/scsi/scsi.c:817: undefined reference to `scsi_debugfs_root'
>> drivers/scsi/scsi.c:820: undefined reference to `scsi_debugfs_uld'
   drivers/scsi/scsi.c:823: undefined reference to `scsi_debugfs_root'
>> drivers/scsi/scsi.c:823: undefined reference to `scsi_debugfs_lld'
   drivers/scsi/scsi.c:833: undefined reference to `scsi_debugfs_root'

vim +856 drivers/scsi/scsi.c

   790  
   791  static int __init init_scsi(void)
   792  {
   793  int error;
   794  
   795  error = scsi_init_queue();
   796  if (error)
   797  return error;
   798  error = scsi_init_procfs();
   799  if (error)
   800  goto cleanup_queue;
   801  error = scsi_init_devinfo();
   802  if (error)
   803  goto cleanup_procfs;
   804  error = scsi_init_hosts();
   805  if (error)
   806  goto cleanup_devlist;
   807  error = scsi_init_sysctl();
   808  if (error)
   809  goto cleanup_hosts;
   810  error = scsi_sysfs_register();
   811  if (error)
   812  goto cleanup_sysctl;
   813  
   814  scsi_netlink_init();
   815  
   816  #ifdef CONFIG_DEBUG_FS
   817  scsi_debugfs_root = debugfs_create_dir("scsi", NULL);
   818  if (!scsi_debugfs_root)
   819  goto cleanup_netlink;
 > 820  scsi_debugfs_uld = debugfs_create_dir("uld", scsi_debugfs_root);
   821  if (!scsi_debugfs_uld)
   822  goto cleanup_debugfs;
 > 823  scsi_debugfs_lld = debugfs_create_dir("lld", scsi_debugfs_root);
   824  if (!scsi_debugfs_lld)
   825  goto cleanup_debugfs;
   826  #endif
   827  
   828  printk(KERN_NOTICE "SCSI subsystem initialized\n");
   829  return 0;
   830  
   831  #ifdef CONFIG_DEBUG_FS
   832  cleanup_debugfs:
   833  debugfs_remove_recursive(scsi_debugfs_root);
   834  cleanup_netlink:
   835  scsi_netlink_exit();
   836  #endif
   837  cleanup_sysctl:
   838  scsi_exit_sysctl();
   839  cleanup_hosts:
   840  scsi_exit_hosts();
   841  cleanup_devlist:
   842  scsi_exit_devinfo();
   843  cleanup_procfs:
   844  scsi_exit_procfs();
   845  cleanup_queue:
   846  scsi_exit_queue();
   847  printk(KERN_ERR "SCSI subsystem failed to initialize, error = 
%d\n",
   848 -error);
   849  return error;
   850  }
   851  
   852  static void __exit exit_scsi(void)
   853  {
   854  
   855  #ifdef CONFIG_DEBUG_FS
 > 856  debugfs_remove_recursive(scsi_debugfs_root);
   857  #endif
   858  scsi_netlink_exit();
   859  scsi_sysfs_unregister();
   860  scsi_exit_sysctl();
   861  scsi_exit_hosts();
   862  scsi_exit_devinfo();
   863  scsi_exit_procfs();
   864  scsi_exit_queue();
   865  async_unregister_domain(&scsi_sd_probe_domain);
   866  }
   867  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread kbuild test robot
Hi Kangjie,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Kangjie-Lu/scsi-avoid-a-double-fetch-and-a-redundant-copy/20181226-042018
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=m68k 

All warnings (new ones prefixed by >>):

   In file included from arch/m68k/include/asm/uaccess.h:5:0,
from include/linux/uaccess.h:14,
from include/linux/poll.h:12,
from drivers/scsi/sg.c:42:
   drivers/scsi/sg.c: In function 'sg_read':
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/m68k/include/asm/uaccess_mm.h:134:19: note: in definition of macro 
'__get_user'
 switch (sizeof(*(ptr))) { \
  ^~~
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/m68k/include/asm/uaccess_mm.h:126:12: note: in definition of macro 
'__get_user_asm'
  : "m" (*(ptr)), "i" (err));\
   ^~~
>> arch/m68k/include/asm/uaccess_mm.h:180:26: note: in expansion of macro 
>> '__get_user'
#define get_user(x, ptr) __get_user(x, ptr)
 ^~
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/m68k/include/asm/uaccess_mm.h:127:26: note: in definition of macro 
'__get_user_asm'
 (x) = (__force typeof(*(ptr)))(__force unsigned long)__gu_val; \
 ^~~
>> arch/m68k/include/asm/uaccess_mm.h:180:26: note: in expansion of macro 
>> '__get_user'
#define get_user(x, ptr) __get_user(x, ptr)
 ^~
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/m68k/include/asm/uaccess_mm.h:126:12: note: in definition of macro 
'__get_user_asm'
  : "m" (*(ptr)), "i" (err));\
   ^~~
>> arch/m68k/include/asm/uaccess_mm.h:180:26: note: in expansion of macro 
>> '__get_user'
#define get_user(x, ptr) __get_user(x, ptr)
 ^~
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/m68k/include/asm/uaccess_mm.h:127:26: note: in definition of macro 
'__get_user_asm'
 (x) = (__force typeof(*(ptr)))(__force unsigned long)__gu_val; \
 ^~~
>> arch/m68k/include/asm/uaccess_mm.h:180:26: note: in expansion of macro 
>> '__get_user'
#define get_user(x, ptr) __get_user(x, ptr)
 ^~
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/m68k/include/asm/uaccess_mm.h:126:12: note: in definition of macro 
'__get_user_asm'
  : "m" (*(ptr)), "i" (err));\
   ^~~
>> arch/m68k/include/asm/uaccess_mm.h:180:26: note: in expansion of macro 
>> '__get_user'
#define get_user(x, ptr) __get_user(x, ptr)
 ^~
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
 

Re: [PATCH] scsi: avoid a double-fetch and a redundant copy

2018-12-25 Thread kbuild test robot
Hi Kangjie,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.20 next-20181224]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Kangjie-Lu/scsi-avoid-a-double-fetch-and-a-redundant-copy/20181226-042018
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: i386-randconfig-x079-201851 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/uaccess.h:14:0,
from include/linux/poll.h:12,
from drivers//scsi/sg.c:42:
   drivers//scsi/sg.c: In function 'sg_read':
>> drivers//scsi/sg.c:450:27: error: request for member 'pack_id' in something 
>> not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/x86/include/asm/uaccess.h:138:41: note: in definition of macro 
'__inttype'
__typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
^
>> drivers//scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
>> arch/x86/include/asm/uaccess.h:138:12: error: first argument to 
>> '__builtin_choose_expr' not a constant
__typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
   ^
>> arch/x86/include/asm/uaccess.h:174:11: note: in expansion of macro 
>> '__inttype'
 register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX);  \
  ^
>> drivers//scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
>> drivers//scsi/sg.c:450:27: error: request for member 'pack_id' in something 
>> not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/x86/include/asm/uaccess.h:180:15: note: in definition of macro 
'get_user'
   : "0" (ptr), "i" (sizeof(*(ptr;  \
  ^~~
>> drivers//scsi/sg.c:450:27: error: request for member 'pack_id' in something 
>> not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/x86/include/asm/uaccess.h:180:35: note: in definition of macro 
'get_user'
   : "0" (ptr), "i" (sizeof(*(ptr;  \
  ^~~
>> drivers//scsi/sg.c:450:27: error: request for member 'pack_id' in something 
>> not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/x86/include/asm/uaccess.h:181:30: note: in definition of macro 
'get_user'
 (x) = (__force __typeof__(*(ptr))) __val_gu;   \
 ^~~
--
   In file included from include/linux/uaccess.h:14:0,
from include/linux/poll.h:12,
from drivers/scsi/sg.c:42:
   drivers/scsi/sg.c: In function 'sg_read':
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/x86/include/asm/uaccess.h:138:41: note: in definition of macro 
'__inttype'
__typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
^
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
>> arch/x86/include/asm/uaccess.h:138:12: error: first argument to 
>> '__builtin_choose_expr' not a constant
__typeof__(__builtin_choose_expr(sizeof(x) > sizeof(0UL), 0ULL, 0UL))
   ^
>> arch/x86/include/asm/uaccess.h:174:11: note: in expansion of macro 
>> '__inttype'
 register __inttype(*(ptr)) __val_gu asm("%"_ASM_DX);  \
  ^
   drivers/scsi/sg.c:449:14: note: in expansion of macro 'get_user'
retval = get_user(req_pack_id,
 ^~~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/x86/include/asm/uaccess.h:180:15: note: in definition of macro 
'get_user'
   : "0" (ptr), "i" (sizeof(*(ptr;  \
  ^~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((sg_io_hdr_t *)buf->pack_id));
  ^
   arch/x86/include/asm/uaccess.h:180:35: note: in definition of macro 
'get_user'
   : "0" (ptr), "i" (sizeof(*(ptr;  \
  ^~~
   drivers/scsi/sg.c:450:27: error: request for member 'pack_id' in something 
not a structure or union
  &((s

[scsi:misc 108/132] drivers/scsi/aha1542.c:328: undefined reference to `__udivdi3'

2018-11-29 Thread kbuild test robot
Hi Christoph,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
head:   9167f0dcc523735d5df7c6e27b58c05740433657
commit: 1794ef2b150dd502bc31cb50ad36c901337b4d0e [108/132] scsi: aha1542: 
convert to DMA mapping API
config: i386-randconfig-c0-11300951 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 1794ef2b150dd502bc31cb50ad36c901337b4d0e
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   ./usr/include/linux/v4l2-controls.h:1105: found __[us]{8,16,32,64} type 
without #include 
   drivers/scsi/aha1542.o: In function `aha1542_interrupt':
>> drivers/scsi/aha1542.c:328: undefined reference to `__udivdi3'
   make[1]: *** [vmlinux] Error 1
   make[1]: Target '_all' not remade because of errors.

vim +328 drivers/scsi/aha1542.c

   257  
   258  static irqreturn_t aha1542_interrupt(int irq, void *dev_id)
   259  {
   260  struct Scsi_Host *sh = dev_id;
   261  struct aha1542_hostdata *aha1542 = shost_priv(sh);
   262  void (*my_done)(struct scsi_cmnd *) = NULL;
   263  int errstatus, mbi, mbo, mbistatus;
   264  int number_serviced;
   265  unsigned long flags;
   266  struct scsi_cmnd *tmp_cmd;
   267  int flag;
   268  struct mailbox *mb = aha1542->mb;
   269  struct ccb *ccb = aha1542->ccb;
   270  
   271  #ifdef DEBUG
   272  {
   273  flag = inb(INTRFLAGS(sh->io_port));
   274  shost_printk(KERN_DEBUG, sh, "aha1542_intr_handle: ");
   275  if (!(flag & ANYINTR))
   276  printk("no interrupt?");
   277  if (flag & MBIF)
   278  printk("MBIF ");
   279  if (flag & MBOA)
   280  printk("MBOF ");
   281  if (flag & HACC)
   282  printk("HACC ");
   283  if (flag & SCRD)
   284  printk("SCRD ");
   285  printk("status %02x\n", inb(STATUS(sh->io_port)));
   286  };
   287  #endif
   288  number_serviced = 0;
   289  
   290  spin_lock_irqsave(sh->host_lock, flags);
   291  while (1) {
   292  flag = inb(INTRFLAGS(sh->io_port));
   293  
   294  /* Check for unusual interrupts.  If any of these 
happen, we should
   295 probably do something special, but for now just 
printing a message
   296 is sufficient.  A SCSI reset detected is something 
that we really
   297 need to deal with in some way. */
   298  if (flag & ~MBIF) {
   299  if (flag & MBOA)
   300  printk("MBOF ");
   301  if (flag & HACC)
   302  printk("HACC ");
   303  if (flag & SCRD)
   304  printk("SCRD ");
   305  }
   306  aha1542_intr_reset(sh->io_port);
   307  
   308  mbi = aha1542->aha1542_last_mbi_used + 1;
   309  if (mbi >= 2 * AHA1542_MAILBOXES)
   310  mbi = AHA1542_MAILBOXES;
   311  
   312  do {
   313  if (mb[mbi].status != 0)
   314  break;
   315  mbi++;
   316  if (mbi >= 2 * AHA1542_MAILBOXES)
   317  mbi = AHA1542_MAILBOXES;
   318  } while (mbi != aha1542->aha1542_last_mbi_used);
   319  
   320  if (mb[mbi].status == 0) {
   321  spin_unlock_irqrestore(sh->host_lock, flags);
   322  /* Hmm, no mail.  Must have read it the last 
time around */
   323  if (!number_serviced)
   324  shost_printk(KERN_WARNING, sh, 
"interrupt received, but no mail.\n");
   325  return IRQ_HANDLED;
   326  };
   327  
 > 328  mbo = (scsi2int(mb[mbi].ccbptr) - aha1542->ccb_handle) 
 > / sizeof(struct ccb);
   329  mbistatus = mb[mbi].status;
   330  mb[mbi].status = 0;
   331  aha1542->aha1542_last_mbi_used = mbi;
   332  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 4/4] scsi: hisi_sas: Add support for DIF/DIX feature for v3 hw

2018-11-24 Thread kbuild test robot
Hi Xiang,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20181123]
[cannot apply to v4.20-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/John-Garry/hisi_sas-DIF-DIX-support/20181123-202805
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: incorrect type in 
argument 1 (different base types)
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26:expected unsigned long 
long [unsigned] [usertype] val
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26:got restricted __le64 
[usertype] sas_addr
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:26: warning: cast from restricted 
__le64
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:24: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:24:expected restricted __le64 
[usertype] sas_addr
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:694:24:got unsigned long long
>> drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1165:26: warning: invalid assignment: 
>> |=
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1165:26:left side has type 
restricted __le32
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1165:26:right side has type int
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1166:26: warning: invalid assignment: 
|=
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1166:26:left side has type 
restricted __le32
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1166:26:right side has type int
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1759:37: warning: incorrect type in 
initializer (different base types)
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1759:37:expected unsigned int 
[unsigned] [usertype] dma_rx_err_type
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1759:37:got restricted __le32 
[usertype] dma_rx_err_type
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1760:40: warning: incorrect type in 
initializer (different base types)
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1760:40:expected unsigned int 
[unsigned] [usertype] trans_tx_fail_type
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1760:40:got restricted __le32 
[usertype] trans_tx_fail_type
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1767:40: warning: restricted __le32 
degrades to integer
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1781:40: warning: restricted __le32 
degrades to integer
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1840:30: warning: restricted __le32 
degrades to integer
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1864:26: warning: restricted __le32 
degrades to integer
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:1976:37: warning: restricted __le32 
degrades to integer
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2372:25: warning: symbol 
'host_attrs_v3_hw' was not declared. Should it be static?
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2858:22: warning: incorrect type in 
assignment (different base types)
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2858:22:expected unsigned int 
[unsigned] [usertype] device_state
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2858:22:got restricted pci_power_t
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2863:35: warning: incorrect type in 
argument 2 (different base types)
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2863:35:expected restricted 
pci_power_t [usertype] state
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2863:35:got unsigned int 
[unsigned] [usertype] device_state
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2878:32: warning: incorrect type in 
initializer (different base types)
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2878:32:expected unsigned int 
[unsigned] [usertype] device_state
   drivers/scsi/hisi_sas/hisi_sas_v3_hw.c:2878:32:got restricted 
pci_power_t [usertype] current_state

vim +1165 drivers/scsi/hisi_sas/hisi_sas_v3_hw.c

  1072  
  1073  static void prep_ssp_v3_hw(struct hisi_hba *hisi_hba,
  1074 

Re: [PATCH 7/8] qedi: Move LL2 producer index processing in BH.

2018-11-20 Thread kbuild test robot
Hi Manish,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.20-rc3 next-20181120]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Nilesh-Javali/qedi-bug-fixes/20181121-022440
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-x012-201846 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/scsi//qedi/qedi_main.c: In function 'qedi_ll2_process_skb':
>> drivers/scsi//qedi/qedi_main.c:752:31: error: 'qedi_ll2_buf_size' undeclared 
>> (first use in this function); did you mean 'qedi_ll2_free_skbs'?
 pkt = udev->rx_pkt + (prod * qedi_ll2_buf_size);
  ^
  qedi_ll2_free_skbs
   drivers/scsi//qedi/qedi_main.c:752:31: note: each undeclared identifier is 
reported only once for each function it appears in

vim +752 drivers/scsi//qedi/qedi_main.c

   727  
   728  /* map this skb to iscsiuio mmaped region */
   729  static int qedi_ll2_process_skb(struct qedi_ctx *qedi, struct sk_buff 
*skb,
   730  u16 vlan_id)
   731  {
   732  struct qedi_uio_dev *udev = NULL;
   733  struct qedi_uio_ctrl *uctrl = NULL;
   734  struct qedi_rx_bd rxbd;
   735  struct qedi_rx_bd *p_rxbd;
   736  u32 rx_bd_prod;
   737  void *pkt;
   738  int len = 0;
   739  u32 prod;
   740  
   741  if (!qedi) {
   742  QEDI_ERR(NULL, "qedi is NULL\n");
   743  return -1;
   744  }
   745  
   746  udev = qedi->udev;
   747  uctrl = udev->uctrl;
   748  
   749  ++uctrl->hw_rx_prod_cnt;
   750  prod = (uctrl->hw_rx_prod + 1) % RX_RING;
   751  
 > 752  pkt = udev->rx_pkt + (prod * qedi_ll2_buf_size);
   753  len = min_t(u32, skb->len, (u32)LL2_SINGLE_BUF_SIZE);
   754  memcpy(pkt, skb->data, len);
   755  
   756  memset(&rxbd, 0, sizeof(rxbd));
   757  rxbd.rx_pkt_index = prod;
   758  rxbd.rx_pkt_len = len;
   759  rxbd.vlan_id = vlan_id;
   760  
   761  uctrl->hw_rx_bd_prod = (uctrl->hw_rx_bd_prod + 1) % 
QEDI_NUM_RX_BD;
   762  rx_bd_prod = uctrl->hw_rx_bd_prod;
   763  p_rxbd = (struct qedi_rx_bd *)udev->ll2_ring;
   764  p_rxbd += rx_bd_prod;
   765  
   766  memcpy(p_rxbd, &rxbd, sizeof(rxbd));
   767  
   768  QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_LL2,
   769"hw_rx_prod [%d] prod [%d] hw_rx_bd_prod [%d] 
rx_pkt_idx [%d] rx_len [%d].\n",
   770uctrl->hw_rx_prod, prod, uctrl->hw_rx_bd_prod,
   771rxbd.rx_pkt_index, rxbd.rx_pkt_len);
   772  QEDI_INFO(&qedi->dbg_ctx, QEDI_LOG_LL2,
   773"host_rx_cons [%d] hw_rx_bd_cons [%d].\n",
   774uctrl->host_rx_cons, uctrl->host_rx_bd_cons);
   775  
   776  uctrl->hw_rx_prod = prod;
   777  
   778  /* notify the iscsiuio about new packet */
   779  uio_event_notify(&udev->qedi_uinfo);
   780  
   781  return 0;
   782  }
   783  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[PATCH] scsi: ufs: fix platform_no_drv_owner.cocci warnings

2018-11-15 Thread kbuild test robot
From: kbuild test robot 

drivers/scsi/ufs/cdns-pltfrm.c:138:3-8: No need to set .owner here. The core 
will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: d90996dae8e4 ("scsi: ufs: Add UFS platform driver for Cadence UFS")
CC: Janek Kotas 
Signed-off-by: kbuild test robot 
---

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git queue
head:   399b6c8bc9f705c8fc718ddeb1671f88174da051
commit: d90996dae8e48e042bd9fbfc11c73504a19a6e68 [54/101] scsi: ufs: Add UFS 
platform driver for Cadence UFS

 cdns-pltfrm.c |1 -
 1 file changed, 1 deletion(-)

--- a/drivers/scsi/ufs/cdns-pltfrm.c
+++ b/drivers/scsi/ufs/cdns-pltfrm.c
@@ -135,7 +135,6 @@ static struct platform_driver cdns_ufs_p
.remove = cdns_ufs_pltfrm_remove,
.driver = {
.name   = "cdns-ufshcd",
-   .owner  = THIS_MODULE,
.pm = &cdns_ufs_dev_pm_ops,
.of_match_table = cdns_ufs_of_match,
},


Re: [PATCH v3 8/8] sg: user controls for q_at_head, read_value

2018-10-26 Thread kbuild test robot
Hi linux-scsi-owner,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.19 next-20181019]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/linux-scsi-owner-vger-kernel-org/sg-types-and-naming-cleanup/20181026-220008
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-r0-10262157 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:14:0,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/scsi/sg.c:22:
   drivers/scsi/sg.c: In function 'init_sg':
>> drivers/scsi/sg.c:2277:3: error: 'sg_version_date' undeclared (first use in 
>> this function)
  sg_version_date);
  ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 ^~~
   drivers/scsi/sg.c:2277:3: note: each undeclared identifier is reported only 
once for each function it appears in
  sg_version_date);
  ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 ^~~
   drivers/scsi/sg.c: At top level:
   drivers/scsi/sg.c:246:20: warning: 'sg_rq_state_str' used but never defined
static const char *sg_rq_state_str(enum sg_rq_state rq_state, bool 
long_str);
   ^~~

vim +/sg_version_date +2277 drivers/scsi/sg.c

  2256  
  2257  static int __init
  2258  init_sg(void)
  2259  {
  2260  int rc;
  2261  
  2262  if (scatter_elem_sz < PAGE_SIZE) {
  2263  scatter_elem_sz = PAGE_SIZE;
  2264  scatter_elem_sz_prev = scatter_elem_sz;
  2265  }
  2266  if (def_reserved_size >= 0)
  2267  sg_big_buff = def_reserved_size;
  2268  else
  2269  def_reserved_size = sg_big_buff;
  2270  
  2271  rc = register_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0), 
  2272  SG_MAX_DEVS, "sg");
  2273  if (rc)
  2274  return rc;
  2275  pr_info("Registered %s[char major=0x%x], version: %s, date: 
%s\n",
  2276  "sg device ", SCSI_GENERIC_MAJOR, SG_VERSION_STR,
> 2277  sg_version_date);
  2278  sg_sysfs_class = class_create(THIS_MODULE, "scsi_generic");
  2279  if ( IS_ERR(sg_sysfs_class) ) {
  2280  rc = PTR_ERR(sg_sysfs_class);
  2281  goto err_out;
  2282  }
  2283  sg_sysfs_valid = 1;
  2284  rc = scsi_register_interface(&sg_interface);
  2285  if (0 == rc) {
  2286  #ifdef CONFIG_SCSI_PROC_FS
  2287  sg_proc_init();
  2288  #endif  /* CONFIG_SCSI_PROC_FS */
  2289  return 0;
  2290  }
  2291  class_destroy(sg_sysfs_class);
  2292  err_out:
  2293  unregister_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0), 
SG_MAX_DEVS);
  2294  return rc;
  2295  }
  2296  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v3 8/8] sg: user controls for q_at_head, read_value

2018-10-26 Thread kbuild test robot
Hi linux-scsi-owner,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.19 next-20181019]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/linux-scsi-owner-vger-kernel-org/sg-types-and-naming-cleanup/20181026-220008
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-x014-201842 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/kernel.h:14:0,
from include/linux/list.h:9,
from include/linux/module.h:9,
from drivers/scsi/sg.c:22:
   drivers/scsi/sg.c: In function 'init_sg':
>> drivers/scsi/sg.c:2277:3: error: 'sg_version_date' undeclared (first use in 
>> this function); did you mean 'sg_version_num'?
  sg_version_date);
  ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 ^~~
   drivers/scsi/sg.c:2277:3: note: each undeclared identifier is reported only 
once for each function it appears in
  sg_version_date);
  ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 ^~~
   drivers/scsi/sg.c: At top level:
   drivers/scsi/sg.c:246:20: warning: 'sg_rq_state_str' used but never defined
static const char *sg_rq_state_str(enum sg_rq_state rq_state, bool 
long_str);
   ^~~

vim +2277 drivers/scsi/sg.c

  2256  
  2257  static int __init
  2258  init_sg(void)
  2259  {
  2260  int rc;
  2261  
  2262  if (scatter_elem_sz < PAGE_SIZE) {
  2263  scatter_elem_sz = PAGE_SIZE;
  2264  scatter_elem_sz_prev = scatter_elem_sz;
  2265  }
  2266  if (def_reserved_size >= 0)
  2267  sg_big_buff = def_reserved_size;
  2268  else
  2269  def_reserved_size = sg_big_buff;
  2270  
  2271  rc = register_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0), 
  2272  SG_MAX_DEVS, "sg");
  2273  if (rc)
  2274  return rc;
  2275  pr_info("Registered %s[char major=0x%x], version: %s, date: 
%s\n",
  2276  "sg device ", SCSI_GENERIC_MAJOR, SG_VERSION_STR,
> 2277  sg_version_date);
  2278  sg_sysfs_class = class_create(THIS_MODULE, "scsi_generic");
  2279  if ( IS_ERR(sg_sysfs_class) ) {
  2280  rc = PTR_ERR(sg_sysfs_class);
  2281  goto err_out;
  2282  }
  2283  sg_sysfs_valid = 1;
  2284  rc = scsi_register_interface(&sg_interface);
  2285  if (0 == rc) {
  2286  #ifdef CONFIG_SCSI_PROC_FS
  2287  sg_proc_init();
  2288  #endif  /* CONFIG_SCSI_PROC_FS */
  2289  return 0;
  2290  }
  2291  class_destroy(sg_sysfs_class);
  2292  err_out:
  2293  unregister_chrdev_region(MKDEV(SCSI_GENERIC_MAJOR, 0), 
SG_MAX_DEVS);
  2294  return rc;
  2295  }
  2296  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 1/2] mpt3sas: Update MPI headers to support Aero controllers.

2018-10-25 Thread kbuild test robot
Hi Suganath,

I love your patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.19 next-20181019]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Suganath-Prabu/mpt3sas-Update-MPI-headers-to-support-Aero-controllers/20181025-181347
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: x86_64-randconfig-x014-201842 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

Note: the 
linux-review/Suganath-Prabu/mpt3sas-Update-MPI-headers-to-support-Aero-controllers/20181025-181347
 HEAD 0d477ec5db33da0ceaa200504780c2962def87db builds fine.
  It only hurts bisectibility.

All error/warnings (new ones prefixed by >>):

   drivers/scsi/mpt3sas/mpt3sas_base.c: In function 
'_base_display_fwpkg_version':
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3761:2: error: unknown type name 
>> 'Mpi2FWImageHeader_t'; did you mean 'Mpi2ConfigPageHeader_t'?
 Mpi2FWImageHeader_t *FWImgHdr;
 ^~~
 Mpi2ConfigPageHeader_t
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3777:23: error: 'Mpi2FWImageHeader_t' 
>> undeclared (first use in this function); did you mean 
>> 'Mpi2ConfigPageHeader_t'?
 data_length = sizeof(Mpi2FWImageHeader_t);
  ^~~
  Mpi2ConfigPageHeader_t
   drivers/scsi/mpt3sas/mpt3sas_base.c:3777:23: note: each undeclared 
identifier is reported only once for each function it appears in
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3821:38: error: expected expression 
>> before ')' token
FWImgHdr = (Mpi2FWImageHeader_t *)fwpkg_data;
 ^
   In file included from include/linux/export.h:45:0,
from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from drivers/scsi/mpt3sas/mpt3sas_base.c:46:
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:17: error: request for member 
>> 'PackageVersion' in something not a structure or union
if (FWImgHdr->PackageVersion.Word) {
^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:5: note: in expansion of macro 'if'
if (FWImgHdr->PackageVersion.Word) {
^~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:17: error: request for member 
>> 'PackageVersion' in something not a structure or union
if (FWImgHdr->PackageVersion.Word) {
^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:5: note: in expansion of macro 'if'
if (FWImgHdr->PackageVersion.Word) {
^~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:17: error: request for member 
>> 'PackageVersion' in something not a structure or union
if (FWImgHdr->PackageVersion.Word) {
^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
  __r = !!(cond); \
   ^~~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3822:5: note: in expansion of macro 'if'
if (FWImgHdr->PackageVersion.Word) {
^~
   In file included from include/linux/kernel.h:14:0,
from drivers/scsi/mpt3sas/mpt3sas_base.c:46:
   drivers/scsi/mpt3sas/mpt3sas_base.c:3824:16: error: request for member 
'PackageVersion' in something not a structure or union
   FWImgHdr->PackageVersion.Struct.Major,
   ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 ^~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3823:6: note: in expansion of macro 
>> 'ioc_info'
 ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n",
 ^~~~
   drivers/scsi/mpt3sas/mpt3sas_base.c:3825:16: error: request for member 
'PackageVersion' in something not a structure or union
   FWImgHdr->PackageVersion.Struct.Minor,
   ^
   include/linux/printk.h:315:34: note: in definition of macro 'pr_info'
 printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
 ^~~
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3823:6: note: in expansion of macro 
>> 'ioc_info'
 ioc_info(ioc, "FW Package Version (%02d.%02d.%02d.%02d)\n",
 ^~~~
   drivers/scsi/mpt3sas/mpt3sas_base.c:3826:16: error: request for member 
'PackageVersion' in something not a structure or union
   FWImgHdr->PackageVersion.Struct.Unit,
   ^
   

Re: [PATCH] scsi/ata: Use unsigned int for cmd's type in ioctls in scsi_host_template

2018-10-19 Thread kbuild test robot
Hi Nathan,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on scsi/for-next]
[also build test ERROR on v4.19-rc8 next-20181019]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Nathan-Chancellor/scsi-ata-Use-unsigned-int-for-cmd-s-type-in-ioctls-in-scsi_host_template/20181020-120416
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: powerpc-allmodconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=powerpc 

All errors (new ones prefixed by >>):

>> drivers/scsi//cxlflash/main.c:3170:11: error: initialization from 
>> incompatible pointer type [-Werror=incompatible-pointer-types]
 .ioctl = cxlflash_ioctl,
  ^~
   drivers/scsi//cxlflash/main.c:3170:11: note: (near initialization for 
'driver_template.ioctl')
   cc1: some warnings being treated as errors
--
>> drivers/scsi//cxlflash/superpipe.c:2099:5: error: conflicting types for 
>> 'cxlflash_ioctl'
int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd, void __user 
*arg)
^~
   In file included from drivers/scsi//cxlflash/superpipe.c:29:0:
   drivers/scsi//cxlflash/common.h:337:5: note: previous declaration of 
'cxlflash_ioctl' was here
int cxlflash_ioctl(struct scsi_device *sdev, int cmd, void __user *arg);
^~

vim +/cxlflash_ioctl +2099 drivers/scsi//cxlflash/superpipe.c

  2082  
  2083  /**
  2084   * cxlflash_ioctl() - IOCTL handler for driver
  2085   * @sdev:   SCSI device associated with LUN.
  2086   * @cmd:IOCTL command.
  2087   * @arg:Userspace ioctl data structure.
  2088   *
  2089   * A read/write semaphore is used to implement a 'drain' of currently
  2090   * running ioctls. The read semaphore is taken at the beginning of each
  2091   * ioctl thread and released upon concluding execution. Additionally the
  2092   * semaphore should be released and then reacquired in any ioctl 
execution
  2093   * path which will wait for an event to occur that is outside the scope 
of
  2094   * the ioctl (i.e. an adapter reset). To drain the ioctls currently 
running,
  2095   * a thread simply needs to acquire the write semaphore.
  2096   *
  2097   * Return: 0 on success, -errno on failure
  2098   */
> 2099  int cxlflash_ioctl(struct scsi_device *sdev, unsigned int cmd, void 
> __user *arg)

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread kbuild test robot
Hi linux-scsi-owner,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.19-rc8 next-20181019]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/linux-scsi-owner-vger-kernel-org/sg-major-cleanup-remove-max_queue-limit/20181019-183809
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-i1-201841 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/scsi/sg.o: In function `sg_rq_end_io_usercontext':
>> drivers/scsi/sg.c:1494: undefined reference to `sg_rq_state_str'
>> drivers/scsi/sg.c:1494: undefined reference to `sg_rq_state_str'

vim +1494 drivers/scsi/sg.c

  1470  
  1471  /*
  1472   * This user context function is needed to clean up a request that has 
been
  1473   * interrupted (e.g. by control-C at keyboard). That leads to a request
  1474   * being an 'orphan' and will be cleared here unless the 'keep_orphan' 
flag
  1475   * has been set on the owning file descriptor. In that case the user is
  1476   * expected to call read() or ioctl(SG_IORECEIVE) to receive the 
response
  1477   * and free resources held by the interrupted request.
  1478   */
  1479  static void
  1480  sg_rq_end_io_usercontext(struct work_struct *work)
  1481  {
  1482  struct sg_request *srp = container_of(work, struct sg_request, 
ew.work);
  1483  struct sg_fd *sfp;
  1484  
  1485  if (!srp) {
  1486  WARN_ONCE("s: srp unexpectedly NULL\n", __func__);
  1487  return;
  1488  }
  1489  sfp = srp->parentfp;
  1490  if (!sfp) {
  1491  WARN_ONCE(1, "%s: sfp unexpectedly NULL\n", __func__);
  1492  return;
  1493  }
> 1494  SG_LOG(3, sfp->parentdp, "%s: clean srp=0x%p, rq_state: %s\n",
  1495 __func__, srp, sg_rq_state_str(srp->rq_state, true));
  1496  sg_finish_scsi_blk_rq(srp);
  1497  sg_remove_request(sfp, srp);
  1498  kref_put(&sfp->f_ref, sg_remove_sfp);
  1499  }
  1500  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 6/8] sg: complete locking changes on ioctl+debug

2018-10-19 Thread kbuild test robot
Hi linux-scsi-owner,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.19-rc8 next-20181019]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/linux-scsi-owner-vger-kernel-org/sg-major-cleanup-remove-max_queue-limit/20181019-183809
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: arm-multi_v5_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> ERROR: "sg_rq_state_str" [drivers/scsi/sg.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 5/8] sg: add free list, rework locking

2018-10-19 Thread kbuild test robot
Hi linux-scsi-owner,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.19-rc8 next-20181019]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/linux-scsi-owner-vger-kernel-org/sg-major-cleanup-remove-max_queue-limit/20181019-183809
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-x078-201841 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

>> drivers//scsi/sg.c:240:20: warning: 'sg_rq_state_str' used but never defined
static const char *sg_rq_state_str(u8 rq_state, bool long_str);
   ^~~
   drivers//scsi/sg.c:933:1: warning: 'sg_fill_request_table' defined but not 
used [-Wunused-function]
sg_fill_request_table(struct sg_fd *sfp, struct sg_req_info *rinfo,
^
   drivers//scsi/sg.c:19:12: warning: 'sg_version_num' defined but not used 
[-Wunused-variable]
static int sg_version_num = 30901; /* 2 digits for each component */
   ^~

vim +/sg_rq_state_str +240 drivers//scsi/sg.c

   212  
   213  /* tasklet or soft irq callback */
   214  static void sg_rq_end_io(struct request *rq, blk_status_t status);
   215  static int sg_start_req(struct sg_request *srp, u8 *cmd);
   216  static void sg_finish_scsi_blk_rq(struct sg_request *srp);
   217  static int sg_mk_sgat_dlen(struct sg_request *srp, struct sg_fd *sfp,
   218 int dlen);
   219  static ssize_t sg_new_read(struct sg_fd *sfp, char __user *buf, size_t 
count,
   220 struct sg_request *srp);
   221  static ssize_t sg_v3_write(struct sg_fd *sfp, struct file *file,
   222 const char __user *buf, size_t count,
   223 bool read_only, bool sync,
   224 struct sg_request **o_srp);
   225  static struct sg_request *sg_common_write(struct sg_fd *sfp,
   226const struct sg_io_hdr *hp,
   227struct sg_io_v4 *h4p, u8 
*cmnd,
   228bool sync, int timeout);
   229  static int sg_read_oxfer(struct sg_request *srp, char __user *outp,
   230   int num_xfer);
   231  static void sg_remove_sgat(struct sg_request *srp);
   232  static struct sg_fd *sg_add_sfp(struct sg_device *sdp);
   233  static void sg_remove_sfp(struct kref *);
   234  static struct sg_request *sg_get_rq_pack_id(struct sg_fd *sfp, int 
pack_id);
   235  static struct sg_request *sg_add_request(struct sg_fd *sfp, int 
dxfr_len,
   236   bool sync);
   237  static void sg_remove_request(struct sg_fd *sfp, struct sg_request 
*srp);
   238  static struct sg_device *sg_get_dev(int min_dev);
   239  static void sg_device_destroy(struct kref *kref);
 > 240  static const char *sg_rq_state_str(u8 rq_state, bool long_str);
   241  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[scsi:misc 194/233] ERROR: "__aeabi_uldivmod" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
head:   4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d
commit: 77266186397c6c782a3f670d32808a9671806ec5 [194/233] scsi: myrs: Add 
Mylex RAID controller (SCSI interface)
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 77266186397c6c782a3f670d32808a9671806ec5
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=arm 

All errors (new ones prefixed by >>):

>> ERROR: "__aeabi_uldivmod" [drivers/scsi/myrs.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[scsi:misc 194/233] ERROR: "__udivdi3" [drivers/scsi/myrs.ko] undefined!

2018-10-18 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
head:   4d5b4ac1eae471bcd0fa381ab4099cc33e94e15d
commit: 77266186397c6c782a3f670d32808a9671806ec5 [194/233] scsi: myrs: Add 
Mylex RAID controller (SCSI interface)
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
git checkout 77266186397c6c782a3f670d32808a9671806ec5
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

>> ERROR: "__udivdi3" [drivers/scsi/myrs.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v3] target: split out helper for cxn timeout error stashing

2018-10-14 Thread kbuild test robot
Hi David,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on target/master]
[also build test ERROR on v4.19-rc7 next-20181012]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/David-Disseldorp/target-split-out-helper-for-cxn-timeout-error-stashing/20181014-111810
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
master
config: i386-randconfig-s1-201841 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/target/iscsi/iscsi_target_util.c: In function 
'iscsit_handle_nopin_response_timeout':
>> drivers/target/iscsi/iscsi_target_util.c:902:36: error: 'sess' undeclared 
>> (first use in this function)
 iscsit_fill_cxn_timeout_err_stats(sess);
   ^~~~
   drivers/target/iscsi/iscsi_target_util.c:902:36: note: each undeclared 
identifier is reported only once for each function it appears in

vim +/sess +902 drivers/target/iscsi/iscsi_target_util.c

   882  
   883  static void iscsit_handle_nopin_response_timeout(unsigned long data)
   884  {
   885  struct iscsi_conn *conn = (struct iscsi_conn *) data;
   886  
   887  iscsit_inc_conn_usage_count(conn);
   888  
   889  spin_lock_bh(&conn->nopin_timer_lock);
   890  if (conn->nopin_response_timer_flags & ISCSI_TF_STOP) {
   891  spin_unlock_bh(&conn->nopin_timer_lock);
   892  iscsit_dec_conn_usage_count(conn);
   893  return;
   894  }
   895  
   896  pr_debug("Did not receive response to NOPIN on CID: %hu on"
   897  " SID: %u, failing connection.\n", conn->cid,
   898  conn->sess->sid);
   899  conn->nopin_response_timer_flags &= ~ISCSI_TF_RUNNING;
   900  spin_unlock_bh(&conn->nopin_timer_lock);
   901  
 > 902  iscsit_fill_cxn_timeout_err_stats(sess);
   903  iscsit_cause_connection_reinstatement(conn, 0);
   904  iscsit_dec_conn_usage_count(conn);
   905  }
   906  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v3] target: split out helper for cxn timeout error stashing

2018-10-13 Thread kbuild test robot
Hi David,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on target/master]
[also build test ERROR on v4.19-rc7 next-20181012]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/David-Disseldorp/target-split-out-helper-for-cxn-timeout-error-stashing/20181014-111810
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
master
config: x86_64-randconfig-x007-201841 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers/target/iscsi/iscsi_target_util.c: In function 
'iscsit_handle_nopin_response_timeout':
>> drivers/target/iscsi/iscsi_target_util.c:902:36: error: 'sess' undeclared 
>> (first use in this function); did you mean 'sem'?
 iscsit_fill_cxn_timeout_err_stats(sess);
   ^~~~
   sem
   drivers/target/iscsi/iscsi_target_util.c:902:36: note: each undeclared 
identifier is reported only once for each function it appears in

vim +902 drivers/target/iscsi/iscsi_target_util.c

   882  
   883  static void iscsit_handle_nopin_response_timeout(unsigned long data)
   884  {
   885  struct iscsi_conn *conn = (struct iscsi_conn *) data;
   886  
   887  iscsit_inc_conn_usage_count(conn);
   888  
   889  spin_lock_bh(&conn->nopin_timer_lock);
   890  if (conn->nopin_response_timer_flags & ISCSI_TF_STOP) {
   891  spin_unlock_bh(&conn->nopin_timer_lock);
   892  iscsit_dec_conn_usage_count(conn);
   893  return;
   894  }
   895  
   896  pr_debug("Did not receive response to NOPIN on CID: %hu on"
   897  " SID: %u, failing connection.\n", conn->cid,
   898  conn->sess->sid);
   899  conn->nopin_response_timer_flags &= ~ISCSI_TF_RUNNING;
   900  spin_unlock_bh(&conn->nopin_timer_lock);
   901  
 > 902  iscsit_fill_cxn_timeout_err_stats(sess);
   903  iscsit_cause_connection_reinstatement(conn, 0);
   904  iscsit_dec_conn_usage_count(conn);
   905  }
   906  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 09/11] block: Expose queue nr_zones in sysfs

2018-10-10 Thread kbuild test robot
Hi Damien,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v4.19-rc7 next-20181010]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Damien-Le-Moal/Zoned-block-device-support-improvements/20181010-190504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git 
for-next
config: i386-randconfig-x0-10102333 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   block/blk-sysfs.c: In function 'queue_nr_zones_show':
>> block/blk-sysfs.c:305:25: error: 'struct request_queue' has no member named 
>> 'nr_zones'
 return queue_var_show(q->nr_zones, page);
^
   block/blk-sysfs.c:306:1: warning: control reaches end of non-void function 
[-Wreturn-type]
}
^

vim +305 block/blk-sysfs.c

   302  
   303  static ssize_t queue_nr_zones_show(struct request_queue *q, char *page)
   304  {
 > 305  return queue_var_show(q->nr_zones, page);
   306  }
   307  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 10/11] block: add a report_zones method

2018-10-10 Thread kbuild test robot
Hi Christoph,

I love your patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v4.19-rc7]
[cannot apply to next-20181010]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Damien-Le-Moal/Zoned-block-device-support-improvements/20181010-190504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git 
for-next
config: x86_64-randconfig-e2-10081527 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> drivers/block/null_blk_main.c:1509:18: error: initialization from 
>> incompatible pointer type [-Werror=incompatible-pointer-types]
 .report_zones = null_zone_report,
 ^~~~
   drivers/block/null_blk_main.c:1509:18: note: (near initialization for 
'null_fops.report_zones')
   cc1: some warnings being treated as errors

vim +1509 drivers/block/null_blk_main.c

  1504  
  1505  static const struct block_device_operations null_fops = {
  1506  .owner =THIS_MODULE,
  1507  .open = null_open,
  1508  .release =  null_release,
> 1509  .report_zones = null_zone_report,
  1510  };
  1511  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 10/11] block: add a report_zones method

2018-10-10 Thread kbuild test robot
Hi Christoph,

I love your patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v4.19-rc7]
[cannot apply to next-20181010]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Damien-Le-Moal/Zoned-block-device-support-improvements/20181010-190504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git 
for-next
config: x86_64-randconfig-x000-201840 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//md/dm-linear.c: In function 'linear_report_zones':
>> drivers//md/dm-linear.c:146:8: error: implicit declaration of function 
>> 'blkdev_report_zones'; did you mean 'linear_report_zones'? 
>> [-Werror=implicit-function-declaration]
 ret = blkdev_report_zones(lc->dev->bdev, linear_map_sector(ti, sector),
   ^~~
   linear_report_zones
   cc1: some warnings being treated as errors
--
   drivers//md/dm-flakey.c: In function 'flakey_report_zones':
>> drivers//md/dm-flakey.c:459:8: error: implicit declaration of function 
>> 'blkdev_report_zones'; did you mean 'flakey_report_zones'? 
>> [-Werror=implicit-function-declaration]
 ret = blkdev_report_zones(fc->dev->bdev, flakey_map_sector(ti, sector),
   ^~~
   flakey_report_zones
   cc1: some warnings being treated as errors

vim +146 drivers//md/dm-linear.c

   137  
   138  static int linear_report_zones(struct dm_target *ti, sector_t sector,
   139 struct blk_zone *zones, unsigned int 
*nr_zones,
   140 gfp_t gfp_mask)
   141  {
   142  struct linear_c *lc = (struct linear_c *) ti->private;
   143  int ret;
   144  
   145  /* Do report and remap it */
 > 146  ret = blkdev_report_zones(lc->dev->bdev, linear_map_sector(ti, 
 > sector),
   147zones, nr_zones, gfp_mask);
   148  if (ret != 0)
   149  return ret;
   150  
   151  if (*nr_zones)
   152  dm_remap_zone_report(ti, lc->start, zones, nr_zones);
   153  return 0;
   154  }
   155  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 09/11] block: Expose queue nr_zones in sysfs

2018-10-10 Thread kbuild test robot
Hi Damien,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on block/for-next]
[also build test ERROR on v4.19-rc7 next-20181010]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Damien-Le-Moal/Zoned-block-device-support-improvements/20181010-190504
base:   https://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux-block.git 
for-next
config: x86_64-randconfig-x000-201840 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All error/warnings (new ones prefixed by >>):

   block/blk-sysfs.c: In function 'queue_nr_zones_show':
>> block/blk-sysfs.c:305:27: error: 'struct request_queue' has no member named 
>> 'nr_zones'; did you mean 'nr_rqs'?
 return queue_var_show(q->nr_zones, page);
  ^~~~
  nr_rqs
>> block/blk-sysfs.c:306:1: warning: control reaches end of non-void function 
>> [-Wreturn-type]
}
^

vim +305 block/blk-sysfs.c

   302  
   303  static ssize_t queue_nr_zones_show(struct request_queue *q, char *page)
   304  {
 > 305  return queue_var_show(q->nr_zones, page);
 > 306  }
   307  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v2 1/5] qla2xxx_nvmet: Add files for FC-NVMe Target support

2018-09-26 Thread kbuild test robot
Hi Anil,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.19-rc5 next-20180926]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-FC-NVMe-Target-support/20180926-132955
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-s0-09270145 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

Note: the 
linux-review/Himanshu-Madhani/qla2xxx-Add-FC-NVMe-Target-support/20180926-132955
 HEAD ac552b3775986d6ba46be8dfa15cc47511c2e47c builds fine.
  It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from drivers/scsi//qla2xxx/qla_nvmet.c:14:0:
   drivers/scsi//qla2xxx/qla_nvmet.h:30:25: error: field 'nvme_cmd_iu' has 
incomplete type
 struct atio7_nvme_cmnd nvme_cmd_iu;
^~~
   drivers/scsi//qla2xxx/qla_nvmet.c: In function 'qlt_nvmet_ls_done':
   drivers/scsi//qla2xxx/qla_nvmet.c:48:46: error: 'struct ' has no 
member named 'cmd'
 struct qla_nvmet_cmd *tgt_cmd = nvme->u.nvme.cmd;
 ^
   drivers/scsi//qla2xxx/qla_nvmet.c:58:47: error: 'struct ' has no 
member named 'cmd'
  sp, sp->vha, nvme->u.nvme.desc, nvme->u.nvme.cmd);
  ^
   drivers/scsi//qla2xxx/qla_nvmet.c: In function 'qla_nvmet_ls_rsp':
>> drivers/scsi//qla2xxx/qla_nvmet.c:95:13: error: 'SRB_NVMET_LS' undeclared 
>> (first use in this function)
 sp->type = SRB_NVMET_LS;
^~~~
   drivers/scsi//qla2xxx/qla_nvmet.c:95:13: note: each undeclared identifier is 
reported only once for each function it appears in
   drivers/scsi//qla2xxx/qla_nvmet.c:103:14: error: 'struct ' has no 
member named 'exchange_address'
 nvme->u.nvme.exchange_address = tgt_cmd->atio.u.pt_ls4.exchange_address;
 ^
   drivers/scsi//qla2xxx/qla_nvmet.c:103:49: error: 'union ' has no 
member named 'pt_ls4'
 nvme->u.nvme.exchange_address = tgt_cmd->atio.u.pt_ls4.exchange_address;
^
   drivers/scsi//qla2xxx/qla_nvmet.c:104:14: error: 'struct ' has no 
member named 'nport_handle'
 nvme->u.nvme.nport_handle = tgt_cmd->atio.u.pt_ls4.nport_handle;
 ^
   drivers/scsi//qla2xxx/qla_nvmet.c:104:45: error: 'union ' has no 
member named 'pt_ls4'
 nvme->u.nvme.nport_handle = tgt_cmd->atio.u.pt_ls4.nport_handle;
^
   drivers/scsi//qla2xxx/qla_nvmet.c:105:14: error: 'struct ' has no 
member named 'vp_index'
 nvme->u.nvme.vp_index = tgt_cmd->atio.u.pt_ls4.vp_index;
 ^
   drivers/scsi//qla2xxx/qla_nvmet.c:105:41: error: 'union ' has no 
member named 'pt_ls4'
 nvme->u.nvme.vp_index = tgt_cmd->atio.u.pt_ls4.vp_index;
^
   drivers/scsi//qla2xxx/qla_nvmet.c:107:14: error: 'struct ' has no 
member named 'cmd'
 nvme->u.nvme.cmd = tgt_cmd; /* To be freed */
 ^
   drivers/scsi//qla2xxx/qla_nvmet.c: In function 'qla_nvmet_fcp_abort':
>> drivers/scsi//qla2xxx/qla_nvmet.c:178:13: error: 'SRB_NVMET_SEND_ABTS' 
>> undeclared (first use in this function)
 sp->type = SRB_NVMET_SEND_ABTS;
^~~
   drivers/scsi//qla2xxx/qla_nvmet.c: In function 'qla_nvmet_create_targetport':
>> drivers/scsi//qla2xxx/qla_nvmet.c:240:9: error: 'ql_dbg_nvme' undeclared 
>> (first use in this function)
 ql_dbg(ql_dbg_nvme, vha, 0xe081,
^~~
   drivers/scsi//qla2xxx/qla_nvmet.c:250:10: error: 'struct scsi_qla_host' has 
no member named 'targetport'
 &vha->targetport);
 ^~
   drivers/scsi//qla2xxx/qla_nvmet.c:257:41: error: 'struct scsi_qla_host' has 
no member named 'targetport'
 tport = (struct qla_nvmet_tgtport *)vha->targetport->private;
^~
   drivers/scsi//qla2xxx/qla_nvmet.c: In function 'qla_nvmet_delete':
   drivers/scsi//qla2xxx/qla_nvmet.c:276:17: error: 'volatile struct 
' has no member named 'nvmet_enabled'; did you mean 'nvme_enabled'?
 if (!vha->flags.nvmet_enabled)
^
   drivers/scsi//qla2xxx/qla_nvmet.c:278:9: error: 'struct scsi_qla_host' has 
no member named 'targetport'
 if (vha->targetport) {
^~
   drivers/scsi//qla2xxx/qla_nvmet.c:279:42: error: 'struct scsi_qla_host' has 
no member named 'targetport'
  tport = (struct qla_nvmet_tgtport *)vha->targetport->private;
 ^~
   drivers/scsi//qla2xxx/qla_nvmet.c:281:10: error: 'ql_dbg_nvme' undeclared 
(first use in this function)
  ql_dbg(ql_dbg_nvme, vha, 0xe083,
 ^~~~

Re: [PATCH v2 1/5] qla2xxx_nvmet: Add files for FC-NVMe Target support

2018-09-26 Thread kbuild test robot
Hi Anil,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.19-rc5 next-20180926]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-FC-NVMe-Target-support/20180926-132955
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: powerpc-pseries_defconfig (attached as .config)
compiler: powerpc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.2.0 make.cross ARCH=powerpc 

Note: the 
linux-review/Himanshu-Madhani/qla2xxx-Add-FC-NVMe-Target-support/20180926-132955
 HEAD ac552b3775986d6ba46be8dfa15cc47511c2e47c builds fine.
  It only hurts bisectibility.

All errors (new ones prefixed by >>):

   In file included from drivers/scsi/qla2xxx/qla_nvmet.c:14:0:
>> drivers/scsi/qla2xxx/qla_nvmet.h:30:25: error: field 'nvme_cmd_iu' has 
>> incomplete type
 struct atio7_nvme_cmnd nvme_cmd_iu;
^~~
   drivers/scsi/qla2xxx/qla_nvmet.c: In function 'qlt_nvmet_ls_done':
>> drivers/scsi/qla2xxx/qla_nvmet.c:48:46: error: 'struct ' has no 
>> member named 'cmd'
 struct qla_nvmet_cmd *tgt_cmd = nvme->u.nvme.cmd;
 ^
   drivers/scsi/qla2xxx/qla_nvmet.c:58:47: error: 'struct ' has no 
member named 'cmd'
  sp, sp->vha, nvme->u.nvme.desc, nvme->u.nvme.cmd);
  ^
   drivers/scsi/qla2xxx/qla_nvmet.c: In function 'qla_nvmet_ls_rsp':
>> drivers/scsi/qla2xxx/qla_nvmet.c:95:13: error: 'SRB_NVMET_LS' undeclared 
>> (first use in this function); did you mean 'SRB_NVME_LS'?
 sp->type = SRB_NVMET_LS;
^~~~
SRB_NVME_LS
   drivers/scsi/qla2xxx/qla_nvmet.c:95:13: note: each undeclared identifier is 
reported only once for each function it appears in
>> drivers/scsi/qla2xxx/qla_nvmet.c:103:14: error: 'struct ' has no 
>> member named 'exchange_address'
 nvme->u.nvme.exchange_address = tgt_cmd->atio.u.pt_ls4.exchange_address;
 ^
>> drivers/scsi/qla2xxx/qla_nvmet.c:103:49: error: 'union ' has no 
>> member named 'pt_ls4'
 nvme->u.nvme.exchange_address = tgt_cmd->atio.u.pt_ls4.exchange_address;
^
>> drivers/scsi/qla2xxx/qla_nvmet.c:104:14: error: 'struct ' has no 
>> member named 'nport_handle'
 nvme->u.nvme.nport_handle = tgt_cmd->atio.u.pt_ls4.nport_handle;
 ^
   drivers/scsi/qla2xxx/qla_nvmet.c:104:45: error: 'union ' has no 
member named 'pt_ls4'
 nvme->u.nvme.nport_handle = tgt_cmd->atio.u.pt_ls4.nport_handle;
^
>> drivers/scsi/qla2xxx/qla_nvmet.c:105:14: error: 'struct ' has no 
>> member named 'vp_index'
 nvme->u.nvme.vp_index = tgt_cmd->atio.u.pt_ls4.vp_index;
 ^
   drivers/scsi/qla2xxx/qla_nvmet.c:105:41: error: 'union ' has no 
member named 'pt_ls4'
 nvme->u.nvme.vp_index = tgt_cmd->atio.u.pt_ls4.vp_index;
^
   drivers/scsi/qla2xxx/qla_nvmet.c:107:14: error: 'struct ' has no 
member named 'cmd'
 nvme->u.nvme.cmd = tgt_cmd; /* To be freed */
 ^
   drivers/scsi/qla2xxx/qla_nvmet.c: In function 'qla_nvmet_fcp_abort':
   drivers/scsi/qla2xxx/qla_nvmet.c:178:13: error: 'SRB_NVMET_SEND_ABTS' 
undeclared (first use in this function); did you mean 'CF_NVME_ENABLE'?
 sp->type = SRB_NVMET_SEND_ABTS;
^~~
CF_NVME_ENABLE
   drivers/scsi/qla2xxx/qla_nvmet.c: In function 'qla_nvmet_create_targetport':
>> drivers/scsi/qla2xxx/qla_nvmet.c:240:9: error: 'ql_dbg_nvme' undeclared 
>> (first use in this function); did you mean 'ql_dbg_timer'?
 ql_dbg(ql_dbg_nvme, vha, 0xe081,
^~~
ql_dbg_timer
>> drivers/scsi/qla2xxx/qla_nvmet.c:250:10: error: 'struct scsi_qla_host' has 
>> no member named 'targetport'
 &vha->targetport);
 ^~
   drivers/scsi/qla2xxx/qla_nvmet.c:257:41: error: 'struct scsi_qla_host' has 
no member named 'targetport'
 tport = (struct qla_nvmet_tgtport *)vha->targetport->private;
^~
   drivers/scsi/qla2xxx/qla_nvmet.c: In function 'qla_nvmet_delete':
>> drivers/scsi/qla2xxx/qla_nvmet.c:276:18: error: 'volatile struct 
>> ' has no member named 'nvmet_enabled'; did you mean 
>> 'nvme_enabled'?
 if (!vha->flags.nvmet_enabled)
 ^
 nvme_enabled
   drivers/scsi/qla2xxx/qla_nvmet.c:278:9: error: 'struct scsi_qla_host' has no 
member named 'targetport'
 if (vha->targetport) {
   

Re: [PATCH 4/6] qla2xxx_nvmet: Add FC-NVMe Target handling

2018-09-15 Thread kbuild test robot
Hi Anil,

I love your patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on next-20180913]
[cannot apply to v4.19-rc3]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Add-FC-NVMe-Target-support/20180916-090108
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
config: xtensa-allmodconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 8.1.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=8.1.0 make.cross ARCH=xtensa 

All warnings (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_target.c: In function 'qlt_send_plogi_resp':
>> drivers/scsi/qla2xxx/qla_target.c:480:63: warning: format '%llx' expects 
>> argument of type 'long long unsigned int', but argument 8 has type 
>> 'dma_addr_t' {aka 'unsigned int'} [-Wformat=]
 "sp: %p, vha: %p, plogi_ack_buf: %p, plogi_ack_udma: %#llx\n",
  ^
  %#x
 sp, vha, plogi_ack_buf, plogi_ack_udma);
 ~~
   drivers/scsi/qla2xxx/qla_target.c: In function 'qlt_process_logo':
   drivers/scsi/qla2xxx/qla_target.c:693:60: warning: format '%llx' expects 
argument of type 'long long unsigned int', but argument 8 has type 'dma_addr_t' 
{aka 'unsigned int'} [-Wformat=]
 "sp: %p, vha: %p, logo_ack_buf: %p, logo_ack_buf: %#llx\n",
   ^
   %#x
 sp, vha, logo_ack_buf, logo_ack_udma);
~   

vim +480 drivers/scsi/qla2xxx/qla_target.c

   456  
   457  static int qlt_send_plogi_resp(struct scsi_qla_host *vha, uint8_t 
op_code,
   458  struct purex_entry_24xx *purex, struct fc_port *fcport)
   459  {
   460  int ret, rval, i;
   461  dma_addr_t plogi_ack_udma = vha->vha_tgt.qla_tgt->nvme_els_rsp;
   462  void *plogi_ack_buf = vha->vha_tgt.qla_tgt->nvme_els_ptr;
   463  uint8_t *tmp;
   464  uint32_t *opcode;
   465  srb_t *sp;
   466  
   467  /* Alloc SRB structure */
   468  sp = qla2x00_get_sp(vha, fcport, GFP_KERNEL);
   469  if (!sp) {
   470  ql_log(ql_log_info, vha, 0x11033,
   471  "Failed to allocate SRB\n");
   472  return -ENOMEM;
   473  }
   474  
   475  sp->type = SRB_NVME_ELS_RSP;
   476  sp->done = qlt_nvme_els_done;
   477  sp->vha = vha;
   478  
   479  ql_log(ql_log_info, vha, 0x11034,
 > 480  "sp: %p, vha: %p, plogi_ack_buf: %p, plogi_ack_udma: 
 > %#llx\n",
   481  sp, vha, plogi_ack_buf, plogi_ack_udma);
   482  
   483  sp->u.snvme_els.dma_addr = plogi_ack_udma;
   484  sp->u.snvme_els.dma_ptr = plogi_ack_buf;
   485  sp->gen1 = 116;
   486  sp->gen2 = ELS_ACC;
   487  sp->u.snvme_els.ptr = (struct purex_entry_24xx *)purex;
   488  sp->cmd_type = ELS_PLOGI;
   489  
   490  tmp = (uint8_t *)plogi_ack_udma;
   491  
   492  tmp += 4;   /* fw doesn't return 1st 4 bytes where opcode 
goes */
   493  
   494  ret = qla2x00_get_plogi_template(vha, (dma_addr_t)tmp, (116/4 - 
1));
   495  if (ret) {
   496  ql_log(ql_log_warn, vha, 0x11035,
   497  "Failed to get plogi template\n");
   498  return -ENOMEM;
   499  }
   500  
   501  opcode = (uint32_t *) plogi_ack_buf;
   502  *opcode = cpu_to_be32(ELS_ACC << 24);
   503  
   504  for (i = 0; i < 0x1c; i++) {
   505  ++opcode;
   506  *opcode = cpu_to_be32(*opcode);
   507  }
   508  
   509  ql_dbg(ql_dbg_disc + ql_dbg_verbose, vha, 0xfff3,
   510  "Dumping the PLOGI from fw\n");
   511  ql_dump_buffer(ql_dbg_disc + ql_dbg_verbose, vha, 0x70cf,
   512  (uint8_t *)plogi_ack_buf, 116);
   513  
   514  rval = qla2x00_start_sp(sp);
   515  if (rval != QLA_SUCCESS)
   516  qla2x00_rel_sp(sp);
   517  
   518  return 0;
   519  }
   520  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH V3 17/17] block: enable runtime PM for blk-mq

2018-09-14 Thread kbuild test robot
Hi Ming,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.19-rc3 next-20180913]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Ming-Lei/blk-mq-allow-to-pass-default-queue-flags-for-creating-initializing-queue/20180914-162946
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-u0-09150658 (attached as .config)
compiler: gcc-5 (Debian 5.5.0-3) 5.4.1 20171010
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   In file included from include/linux/export.h:45:0,
from include/linux/linkage.h:7,
from include/linux/kernel.h:7,
from block/blk-mq.c:7:
   block/blk-mq.c: In function '__blk_mq_free_request':
   block/blk-mq.c:508:7: error: 'struct request_queue' has no member named 'dev'
 if (q->dev)
  ^
   include/linux/compiler.h:58:30: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^
>> block/blk-mq.c:508:2: note: in expansion of macro 'if'
 if (q->dev)
 ^
   block/blk-mq.c:508:7: error: 'struct request_queue' has no member named 'dev'
 if (q->dev)
  ^
   include/linux/compiler.h:58:42: note: in definition of macro '__trace_if'
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^
>> block/blk-mq.c:508:2: note: in expansion of macro 'if'
 if (q->dev)
 ^
   block/blk-mq.c:508:7: error: 'struct request_queue' has no member named 'dev'
 if (q->dev)
  ^
   include/linux/compiler.h:69:16: note: in definition of macro '__trace_if'
  __r = !!(cond); \
   ^
>> block/blk-mq.c:508:2: note: in expansion of macro 'if'
 if (q->dev)
 ^
   block/blk-mq.c:509:30: error: 'struct request_queue' has no member named 
'dev'
  pm_runtime_mark_last_busy(q->dev);
 ^

vim +/if +508 block/blk-mq.c

   493  
   494  static void __blk_mq_free_request(struct request *rq)
   495  {
   496  struct request_queue *q = rq->q;
   497  struct blk_mq_ctx *ctx = rq->mq_ctx;
   498  struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, ctx->cpu);
   499  const int sched_tag = rq->internal_tag;
   500  
   501  if (rq->tag != -1)
   502  blk_mq_put_tag(hctx, hctx->tags, ctx, rq->tag);
   503  if (sched_tag != -1)
   504  blk_mq_put_tag(hctx, hctx->sched_tags, ctx, sched_tag);
   505  blk_mq_sched_restart(hctx);
   506  blk_queue_exit(q);
   507  
 > 508  if (q->dev)
   509  pm_runtime_mark_last_busy(q->dev);
   510  }
   511  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH V3 17/17] block: enable runtime PM for blk-mq

2018-09-14 Thread kbuild test robot
Hi Ming,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.19-rc3 next-20180913]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Ming-Lei/blk-mq-allow-to-pass-default-queue-flags-for-creating-initializing-queue/20180914-162946
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-x003-201836 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   block/blk-mq.c: In function '__blk_mq_free_request':
>> block/blk-mq.c:508:7: error: 'struct request_queue' has no member named 'dev'
 if (q->dev)
  ^~
   block/blk-mq.c:509:30: error: 'struct request_queue' has no member named 
'dev'
  pm_runtime_mark_last_busy(q->dev);
 ^~

vim +508 block/blk-mq.c

   493  
   494  static void __blk_mq_free_request(struct request *rq)
   495  {
   496  struct request_queue *q = rq->q;
   497  struct blk_mq_ctx *ctx = rq->mq_ctx;
   498  struct blk_mq_hw_ctx *hctx = blk_mq_map_queue(q, ctx->cpu);
   499  const int sched_tag = rq->internal_tag;
   500  
   501  if (rq->tag != -1)
   502  blk_mq_put_tag(hctx, hctx->tags, ctx, rq->tag);
   503  if (sched_tag != -1)
   504  blk_mq_put_tag(hctx, hctx->sched_tags, ctx, sched_tag);
   505  blk_mq_sched_restart(hctx);
   506  blk_queue_exit(q);
   507  
 > 508  if (q->dev)
   509  pm_runtime_mark_last_busy(q->dev);
   510  }
   511  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v3] target/iblock: split T10 PI SGL across command bios

2018-08-31 Thread kbuild test robot
Hi Greg,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on target/for-next]
[also build test WARNING on v4.19-rc1 next-20180831]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Greg-Edwards/target-iblock-split-T10-PI-SGL-across-command-bios/20180831-204618
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
for-next
config: i386-randconfig-h1-09010405 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   drivers//target/target_core_iblock.c: In function 'iblock_alloc_bip':
   drivers//target/target_core_iblock.c:663:2: error: implicit declaration of 
function 'bio_integrity_bytes' [-Werror=implicit-function-declaration]
 bip->bip_iter.bi_size = bio_integrity_bytes(bi, bio_sectors(bio));
 ^
   In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:14,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from drivers//target/target_core_iblock.c:29:
>> include/linux/dynamic_debug.h:75:16: warning: format '%lu' expects argument 
>> of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat=]
 static struct _ddebug  __aligned(8)   \
   ^
   include/linux/dynamic_debug.h:111:2: note: in expansion of macro 
'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
 DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
 ^
   include/linux/dynamic_debug.h:125:2: note: in expansion of macro 
'DEFINE_DYNAMIC_DEBUG_METADATA'
 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
 ^
   include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug'
 dynamic_pr_debug(fmt, ##__VA_ARGS__)
 ^
   drivers//target/target_core_iblock.c:681:3: note: in expansion of macro 
'pr_debug'
  pr_debug("Added bio integrity page: %p length: %lu offset: %lu\n",
  ^
   cc1: some warnings being treated as errors
--
   drivers/target/target_core_iblock.c: In function 'iblock_alloc_bip':
   drivers/target/target_core_iblock.c:663:2: error: implicit declaration of 
function 'bio_integrity_bytes' [-Werror=implicit-function-declaration]
 bip->bip_iter.bi_size = bio_integrity_bytes(bi, bio_sectors(bio));
 ^
   In file included from include/linux/printk.h:329:0,
from include/linux/kernel.h:14,
from include/linux/list.h:9,
from include/linux/timer.h:5,
from drivers/target/target_core_iblock.c:29:
>> include/linux/dynamic_debug.h:75:16: warning: format '%lu' expects argument 
>> of type 'long unsigned int', but argument 4 has type 'size_t' [-Wformat=]
 static struct _ddebug  __aligned(8)   \
   ^
   include/linux/dynamic_debug.h:111:2: note: in expansion of macro 
'DEFINE_DYNAMIC_DEBUG_METADATA_KEY'
 DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, 0, 0)
 ^
   include/linux/dynamic_debug.h:125:2: note: in expansion of macro 
'DEFINE_DYNAMIC_DEBUG_METADATA'
 DEFINE_DYNAMIC_DEBUG_METADATA(descriptor, fmt);  \
 ^
   include/linux/printk.h:333:2: note: in expansion of macro 'dynamic_pr_debug'
 dynamic_pr_debug(fmt, ##__VA_ARGS__)
 ^
   drivers/target/target_core_iblock.c:681:3: note: in expansion of macro 
'pr_debug'
  pr_debug("Added bio integrity page: %p length: %lu offset: %lu\n",
  ^
   cc1: some warnings being treated as errors

vim +75 include/linux/dynamic_debug.h

ffa10cb4 Jason Baron 2011-08-11  68  
b9075fa9 Joe Perches 2011-10-31  69  extern __printf(3, 4)
906d2015 Joe Perches 2014-09-24  70  void __dynamic_netdev_dbg(struct _ddebug 
*descriptor,
ffa10cb4 Jason Baron 2011-08-11  71   const struct 
net_device *dev,
b9075fa9 Joe Perches 2011-10-31  72   const char *fmt, ...);
ffa10cb4 Jason Baron 2011-08-11  73  
9049fc74 Jason Baron 2016-08-03  74  #define 
DEFINE_DYNAMIC_DEBUG_METADATA_KEY(name, fmt, key, init)\
c0d2af63 Joe Perches 2012-10-18 @75 static struct _ddebug  __aligned(8) 
\
07613b0b Jason Baron 2011-10-04  76 __attribute__((section("__verbose"))) 
name = {  \
07613b0b Jason Baron 2011-10-04  77 .modname = KBUILD_MODNAME,  
\
07613b0b Jason Baron 2011-10-04  78 .function = __func__,   
\
07613b0b Jason Baron 2011-10-04  79 .filename = __FILE__,   
\
07613b0b Jason Baron 2011-10-04  80 .format = (fmt),
\
07613b0b Jason Baron 2011-10-04  81 .lineno = __LINE__, 
\
07613b0b Jason Baron 2011-10-04  82 .flags = 
_DPRINTK_FLAGS_DEFAULT,\
9049

Re: [PATCH 03/14] qla2xxx: Use correct qpair for ABTS/CMD

2018-08-31 Thread kbuild test robot
Hi Quinn,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on scsi/for-next]
[also build test WARNING on v4.19-rc1 next-20180831]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Driver-updates-for-scsi-misc/20180831-205814
base:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

   drivers/scsi/qla2xxx/qla_init.c:4921:22: sparse: expression using 
sizeof(void)
   drivers/scsi/qla2xxx/qla_init.c:4928:37: sparse: incorrect type in 
assignment (different base types) @@expected unsigned int [unsigned] 
[usertype]  @@got ed int [unsigned] [usertype]  @@
   drivers/scsi/qla2xxx/qla_init.c:4928:37:expected unsigned int [unsigned] 
[usertype] 
   drivers/scsi/qla2xxx/qla_init.c:4928:37:got restricted __be32 [usertype] 

   drivers/scsi/qla2xxx/qla_init.c:4981:35: sparse: cast to restricted __le16
   include/linux/slab.h:631:13: sparse: undefined identifier 
'__builtin_mul_overflow'
   drivers/scsi/qla2xxx/qla_init.c:422:5: sparse: symbol 
'qla_post_els_plogi_work' was not declared. Should it be static?
   drivers/scsi/qla2xxx/qla_init.c:796:39: sparse: restricted __le16 degrades 
to integer
   drivers/scsi/qla2xxx/qla_init.c:798:47: sparse: restricted __le16 degrades 
to integer
   drivers/scsi/qla2xxx/qla_init.c:800:28: sparse: incorrect type in assignment 
(different base types) @@expected unsigned short [unsigned] [short] 
 @@got unsigned] [short]  @@
   drivers/scsi/qla2xxx/qla_init.c:800:28:expected unsigned short 
[unsigned] [short] 
   drivers/scsi/qla2xxx/qla_init.c:800:28:got restricted __le16 
   drivers/scsi/qla2xxx/qla_init.c:918:12: sparse: incorrect type in assignment 
(different base types) @@expected unsigned short [usertype] *mb @@got  
short [usertype] *mb @@
   drivers/scsi/qla2xxx/qla_init.c:918:12:expected unsigned short 
[usertype] *mb
   drivers/scsi/qla2xxx/qla_init.c:918:12:got restricted __le16 *
   drivers/scsi/qla2xxx/qla_init.c:967:19: sparse: incorrect type in 
initializer (different base types) @@expected unsigned short [usertype] *mb 
@@got  short [usertype] *mb @@
   drivers/scsi/qla2xxx/qla_init.c:967:19:expected unsigned short 
[usertype] *mb
   drivers/scsi/qla2xxx/qla_init.c:967:19:got restricted __le16 *
   drivers/scsi/qla2xxx/qla_init.c:1136:12: sparse: incorrect type in 
assignment (different base types) @@expected unsigned short [usertype] *mb 
@@got  short [usertype] *mb @@
   drivers/scsi/qla2xxx/qla_init.c:1136:12:expected unsigned short 
[usertype] *mb
   drivers/scsi/qla2xxx/qla_init.c:1136:12:got restricted __le16 *
   drivers/scsi/qla2xxx/qla_init.c:1525:6: sparse: symbol 
'qla_handle_els_plogi_done' was not declared. Should it be static?
   drivers/scsi/qla2xxx/qla_init.c:1649:32: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
comp_status @@got e] comp_status @@
   drivers/scsi/qla2xxx/qla_init.c:1649:32:expected restricted __le16 
[usertype] comp_status
   drivers/scsi/qla2xxx/qla_init.c:1649:32:got int
   drivers/scsi/qla2xxx/qla_init.c:1729:32: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
comp_status @@got e] comp_status @@
   drivers/scsi/qla2xxx/qla_init.c:1729:32:expected restricted __le16 
[usertype] comp_status
   drivers/scsi/qla2xxx/qla_init.c:1729:32:got int
>> drivers/scsi/qla2xxx/qla_init.c:1771:36: sparse: incorrect type in 
>> assignment (different base types) @@expected restricted __le16 
>> [usertype] req_que_no @@got unsignedrestricted __le16 [usertype] 
>> req_que_no @@
   drivers/scsi/qla2xxx/qla_init.c:1771:36:expected restricted __le16 
[usertype] req_que_no
   drivers/scsi/qla2xxx/qla_init.c:1771:36:got unsigned short [unsigned] 
[usertype] id
   drivers/scsi/qla2xxx/qla_init.c:3221:46: sparse: incorrect type in 
assignment (different base types) @@expected unsigned int [unsigned] 
[usertype] version @@got ed int [unsigned] [usertype] version @@
   drivers/scsi/qla2xxx/qla_init.c:3221:46:expected unsigned int [unsigned] 
[usertype] version
   drivers/scsi/qla2xxx/qla_init.c:3221:46:got restricted __be32 [usertype] 

   drivers/scsi/qla2xxx/qla_init.c:3223:49: sparse: incorrect type in 
assignment (different base types) @@expected unsigned int [unsigned] 
[usertype] fixed_size @@got ed int [unsigned] [usertype] fixed_size @@
   drivers/scsi/qla2xxx/qla_init.c:3223:49:expected unsigned int [unsigned] 
[usertype] fixed_size
   drivers/scsi/qla2xxx/qla_init.c:3223:49:got restricted __be32 [usertype] 

   drivers/scsi/qla2xxx/qla_init.c:

Re: [PATCH V4 3/3] scsi: ufs: Add configfs support for ufs provisioning

2018-06-25 Thread kbuild test robot
Hi Sayali,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.18-rc2 next-20180625]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Sayali-Lokhande/Add-ufs-provisioning-support-in-driver/20180626-120644
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-kexec (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "ufshcd_configfs_init" [drivers/scsi/ufs/ufshcd-core.ko] undefined!
>> ERROR: "ufshcd_configfs_exit" [drivers/scsi/ufs/ufshcd-core.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [RESEND] TCMUser: add read length support

2018-05-26 Thread kbuild test robot
Hi Bodo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17-rc6]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Bodo-Stroesser/TCMUser-add-read-length-support/20180526-231412
config: x86_64-randconfig-x003-201820 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//target/target_core_user.c: In function 'tcmu_handle_completion':
>> drivers//target/target_core_user.c:1077:28: error: 
>> 'SCF_TREAT_READ_AS_NORMAL' undeclared (first use in this function)
   se_cmd->se_cmd_flags |= SCF_TREAT_READ_AS_NORMAL;
   ^~~~
   drivers//target/target_core_user.c:1077:28: note: each undeclared identifier 
is reported only once for each function it appears in

vim +/SCF_TREAT_READ_AS_NORMAL +1077 drivers//target/target_core_user.c

  1041  
  1042  static void tcmu_handle_completion(struct tcmu_cmd *cmd, struct 
tcmu_cmd_entry *entry)
  1043  {
  1044  struct se_cmd *se_cmd = cmd->se_cmd;
  1045  struct tcmu_dev *udev = cmd->tcmu_dev;
  1046  bool read_len_valid = false;
  1047  uint32_t read_len = se_cmd->data_length;
  1048  
  1049  /*
  1050   * cmd has been completed already from timeout, just reclaim
  1051   * data area space and free cmd
  1052   */
  1053  if (test_bit(TCMU_CMD_BIT_EXPIRED, &cmd->flags))
  1054  goto out;
  1055  
  1056  tcmu_cmd_reset_dbi_cur(cmd);
  1057  
  1058  if (entry->hdr.uflags & TCMU_UFLAG_UNKNOWN_OP) {
  1059  pr_warn("TCMU: Userspace set UNKNOWN_OP flag on se_cmd 
%p\n",
  1060  cmd->se_cmd);
  1061  entry->rsp.scsi_status = SAM_STAT_CHECK_CONDITION;
  1062  goto done;
  1063  }
  1064  
  1065  if (se_cmd->data_direction == DMA_FROM_DEVICE &&
  1066  (entry->hdr.uflags & TCMU_UFLAG_READ_LEN) && 
entry->rsp.read_len) {
  1067  read_len_valid = true;
  1068  if (entry->rsp.read_len < read_len)
  1069  read_len = entry->rsp.read_len;
  1070  }
  1071  
  1072  if (entry->rsp.scsi_status == SAM_STAT_CHECK_CONDITION) {
  1073  transport_copy_sense_to_cmd(se_cmd, 
entry->rsp.sense_buffer);
  1074  if (!read_len_valid )
  1075  goto done;
  1076  else
> 1077  se_cmd->se_cmd_flags |= 
> SCF_TREAT_READ_AS_NORMAL;
  1078  }
  1079  if (se_cmd->se_cmd_flags & SCF_BIDI) {
  1080  /* Get Data-In buffer before clean up */
  1081  gather_data_area(udev, cmd, true, read_len);
  1082  } else if (se_cmd->data_direction == DMA_FROM_DEVICE) {
  1083  gather_data_area(udev, cmd, false, read_len);
  1084  } else if (se_cmd->data_direction == DMA_TO_DEVICE) {
  1085  /* TODO: */
  1086  } else if (se_cmd->data_direction != DMA_NONE) {
  1087  pr_warn("TCMU: data direction was %d!\n",
  1088  se_cmd->data_direction);
  1089  }
  1090  
  1091  done:
  1092  if (read_len_valid) {
  1093  pr_debug("read_len = %d\n", read_len);
  1094  target_complete_cmd_with_length(cmd->se_cmd,
  1095  entry->rsp.scsi_status, 
read_len);
  1096  } else
  1097  target_complete_cmd(cmd->se_cmd, 
entry->rsp.scsi_status);
  1098  
  1099  out:
  1100  cmd->se_cmd = NULL;
  1101  tcmu_cmd_free_data(cmd, cmd->dbi_cnt);
  1102  tcmu_free_cmd(cmd);
  1103  }
  1104  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 1/2] Convert target drivers to use sbitmap

2018-05-16 Thread kbuild test robot
Hi Matthew,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on v4.17-rc5 next-20180516]
[cannot apply to target/master]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Matthew-Wilcox/Use-sbitmap-instead-of-percpu_ida/20180516-143658
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/target/iscsi/iscsi_target_util.c:150:5: sparse: symbol 
>> 'iscsit_wait_for_tag' was not declared. Should it be static?
   drivers/target/iscsi/iscsi_target_util.c:1174:31: sparse: expression using 
sizeof(void)
   drivers/target/iscsi/iscsi_target_util.c:1174:31: sparse: expression using 
sizeof(void)

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


[RFC PATCH] iscsit_wait_for_tag() can be static

2018-05-16 Thread kbuild test robot

Fixes: 5aff7a710f13 ("Convert target drivers to use sbitmap")
Signed-off-by: Fengguang Wu 
---
 iscsi_target_util.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/target/iscsi/iscsi_target_util.c 
b/drivers/target/iscsi/iscsi_target_util.c
index 28bcffa..e147aef 100644
--- a/drivers/target/iscsi/iscsi_target_util.c
+++ b/drivers/target/iscsi/iscsi_target_util.c
@@ -147,7 +147,7 @@ void iscsit_free_r2ts_from_list(struct iscsi_cmd *cmd)
spin_unlock_bh(&cmd->r2t_lock);
 }
 
-int iscsit_wait_for_tag(struct se_session *se_sess, int state, int *cpup)
+static int iscsit_wait_for_tag(struct se_session *se_sess, int state, int 
*cpup)
 {
int tag = -1;
DEFINE_WAIT(wait);


Re: [PATCH-next] scsi: libsas: dynamically allocate and free ata host

2018-05-07 Thread kbuild test robot
Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on next-20180504]
[cannot apply to v4.17-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/linux-kernel-owner-vger-kernel-org/scsi-libsas-dynamically-allocate-and-free-ata-host/20180507-105656
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-federa-25 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

>> ERROR: "ata_host_put" [drivers/scsi/libsas/libsas.ko] undefined!

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] qlogic_stub: Fixup NULL argument to host_reset()

2018-05-05 Thread kbuild test robot
Hi Hannes,

I love your patch! Yet something to improve:

[auto build test ERROR on mkp-scsi/for-next]
[also build test ERROR on v4.17-rc3 next-20180504]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Hannes-Reinecke/qlogic_stub-Fixup-NULL-argument-to-host_reset/20180505-172602
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: parisc-allmodconfig (attached as .config)
compiler: hppa-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=parisc 

All errors (new ones prefixed by >>):

   drivers/scsi/pcmcia/qlogic_stub.c: In function 'qlogic_resume':
>> drivers/scsi/pcmcia/qlogic_stub.c:270:6: error: invalid type argument of 
>> '->' (have 'struct scsi_cmnd')
 scmd->device = &sdev;
 ^~
>> drivers/scsi/pcmcia/qlogic_stub.c:272:26: error: incompatible type for 
>> argument 1 of 'qlogicfas408_host_reset'
 qlogicfas408_host_reset(scmd);
 ^~~~
   In file included from drivers/scsi/pcmcia/qlogic_stub.c:49:0:
   drivers/scsi/pcmcia/../qlogicfas408.h:112:12: note: expected 'struct 
scsi_cmnd *' but argument is of type 'struct scsi_cmnd'
extern int qlogicfas408_host_reset(struct scsi_cmnd *cmd);
   ^~~

vim +270 drivers/scsi/pcmcia/qlogic_stub.c

   253  
   254  static int qlogic_resume(struct pcmcia_device *link)
   255  {
   256  scsi_info_t *info = link->priv;
   257  /* Dummy command for host_reset function */
   258  struct scsi_cmnd scmd;
   259  struct scsi_device sdev;
   260  
   261  pcmcia_enable_device(link);
   262  if ((info->manf_id == MANFID_MACNICA) ||
   263  (info->manf_id == MANFID_PIONEER) ||
   264  (info->manf_id == 0x0098)) {
   265  outb(0x80, link->resource[0]->start + 0xd);
   266  outb(0x24, link->resource[0]->start + 0x9);
   267  outb(0x04, link->resource[0]->start + 0xd);
   268  }
   269  sdev.host = info->host;
 > 270  scmd->device = &sdev;
   271  
 > 272  qlogicfas408_host_reset(scmd);
   273  
   274  return 0;
   275  }
   276  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 07/21] qedf: Add dcbx_not_wait module parameter so we won't wait for DCBX convergence to start discovery.

2018-04-26 Thread kbuild test robot
Hi Chad,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.17-rc2 next-20180426]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Chad-Dupuis/qedf-Update-driver-to-8-33-16-20/20180427-062801
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/qedf/qedf_main.c:92:6: sparse: symbol 'qedf_dcbx_no_wait' was 
>> not declared. Should it be static?
   drivers/scsi/qedf/qedf_main.c:1878:18: sparse: incorrect type in assignment 
(different base types) @@expected unsigned short [unsigned] [usertype] 
prod_idx @@got igned] [usertype] prod_idx @@
   drivers/scsi/qedf/qedf_main.c:1878:18:expected unsigned short [unsigned] 
[usertype] prod_idx
   drivers/scsi/qedf/qedf_main.c:1878:18:got restricted __le16 
   drivers/scsi/qedf/qedf_main.c:1908:18: sparse: incorrect type in assignment 
(different base types) @@expected unsigned short [unsigned] [usertype] 
prod_idx @@got igned] [usertype] prod_idx @@
   drivers/scsi/qedf/qedf_main.c:1908:18:expected unsigned short [unsigned] 
[usertype] prod_idx
   drivers/scsi/qedf/qedf_main.c:1908:18:got restricted __le16 
   drivers/scsi/qedf/qedf_main.c:1926:33: sparse: restricted __le32 degrades to 
integer
   drivers/scsi/qedf/qedf_main.c:1944:26: sparse: restricted __le32 degrades to 
integer
   include/linux/qed/qed_if.h:988:33: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] 
sb_id_and_flags @@got  [usertype] sb_id_and_flags @@
   include/linux/qed/qed_if.h:988:33:expected restricted __le32 [usertype] 
sb_id_and_flags
   include/linux/qed/qed_if.h:988:33:got unsigned int
   include/linux/qed/qed_if.h:995:9: sparse: cast from restricted __le32
   include/linux/qed/qed_if.h:988:33: sparse: incorrect type in assignment 
(different base types) @@expected restricted __le32 [usertype] 
sb_id_and_flags @@got  [usertype] sb_id_and_flags @@
   include/linux/qed/qed_if.h:988:33:expected restricted __le32 [usertype] 
sb_id_and_flags
   include/linux/qed/qed_if.h:988:33:got unsigned int
   include/linux/qed/qed_if.h:995:9: sparse: cast from restricted __le32
   drivers/scsi/qedf/qedf_main.c:2160:20: sparse: incorrect type in assignment 
(different base types) @@expected unsigned int [unsigned] [usertype] fr_crc 
@@got restrictunsigned int [unsigned] [usertype] fr_crc @@
   drivers/scsi/qedf/qedf_main.c:2160:20:expected unsigned int [unsigned] 
[usertype] fr_crc
   drivers/scsi/qedf/qedf_main.c:2160:20:got restricted __le32 
[addressable] [usertype] fcoe_crc32
   drivers/scsi/qedf/qedf_main.c:2346:34: sparse: restricted __le32 degrades to 
integer
   drivers/scsi/qedf/qedf_main.c:2456:25: sparse: restricted __le32 degrades to 
integer
   drivers/scsi/qedf/qedf_main.c:2459:18: sparse: restricted __le32 degrades to 
integer
   drivers/scsi/qedf/qedf_main.c:2808:28: sparse: expression using sizeof(void)
   drivers/scsi/qedf/qedf_main.c:2808:28: sparse: expression using sizeof(void)
   include/scsi/fc/fc_fcoe.h:101:36: sparse: cast truncates bits from constant 
value (efc becomes fc)
   include/scsi/fc/fc_fcoe.h:102:23: sparse: cast truncates bits from constant 
value (efc00 becomes 0)

Please review and possibly fold the followup patch.

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


[RFC PATCH] qedf: qedf_dcbx_no_wait can be static

2018-04-26 Thread kbuild test robot

Fixes: d9867ecbae88 ("qedf: Add dcbx_not_wait module parameter so we won't wait 
for DCBX convergence to start discovery.")
Signed-off-by: Fengguang Wu 
---
 qedf_main.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/qedf/qedf_main.c b/drivers/scsi/qedf/qedf_main.c
index 8df151e..b96c928 100644
--- a/drivers/scsi/qedf/qedf_main.c
+++ b/drivers/scsi/qedf/qedf_main.c
@@ -89,7 +89,7 @@ module_param_named(retry_delay, qedf_retry_delay, bool, 
S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(retry_delay, " Enable/disable handling of FCP_RSP IU retry "
"delay handling (default off).");
 
-bool qedf_dcbx_no_wait;
+static bool qedf_dcbx_no_wait;
 module_param_named(dcbx_no_wait, qedf_dcbx_no_wait, bool, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(dcbx_no_wait, " Do not wait for DCBX convergence to start "
"sending FIP VLAN requests on link up (Default: off).");


Re: [PATCH] target: prefer dbroot of /etc/target over /var/target

2018-04-06 Thread kbuild test robot
Hi Lee,

I love your patch! Yet something to improve:

[auto build test ERROR on target/for-next]
[also build test ERROR on v4.16 next-20180406]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Lee-Duncan/target-prefer-dbroot-of-etc-target-over-var-target/20180406-234105
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
for-next
config: i386-randconfig-a0-201813 (attached as .config)
compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/target/target_core_configfs.c: In function 'target_init_dbroot':
>> drivers/target/target_core_configfs.c:3222:39: error: 'DB_ROOT_PREFERRED' 
>> undeclared (first use in this function)
 snprintf(db_root_stage, DB_ROOT_LEN, DB_ROOT_PREFERRED);
  ^
   drivers/target/target_core_configfs.c:3222:39: note: each undeclared 
identifier is reported only once for each function it appears in

vim +/DB_ROOT_PREFERRED +3222 drivers/target/target_core_configfs.c

  3217  
  3218  static void target_init_dbroot(void)
  3219  {
  3220  struct file *fp;
  3221  
> 3222  snprintf(db_root_stage, DB_ROOT_LEN, DB_ROOT_PREFERRED);
  3223  fp = filp_open(db_root_stage, O_RDONLY, 0);
  3224  if (IS_ERR(fp)) {
  3225  pr_err("db_root: cannot open: %s\n", db_root_stage);
  3226  return;
  3227  }
  3228  if (!S_ISDIR(file_inode(fp)->i_mode)) {
  3229  filp_close(fp, NULL);
  3230  pr_err("db_root: not a valid directory: %s\n", 
db_root_stage);
  3231  return;
  3232  }
  3233  filp_close(fp, NULL);
  3234  
  3235  strncpy(db_root, db_root_stage, DB_ROOT_LEN);
  3236  pr_debug("Target_Core_ConfigFS: db_root set to %s\n", db_root);
  3237  }
  3238  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] target: prefer dbroot of /etc/target over /var/target

2018-04-06 Thread kbuild test robot
Hi Lee,

I love your patch! Yet something to improve:

[auto build test ERROR on target/for-next]
[also build test ERROR on v4.16 next-20180406]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Lee-Duncan/target-prefer-dbroot-of-etc-target-over-var-target/20180406-234105
base:   https://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending.git 
for-next
config: i386-randconfig-x016-201813 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/target/target_core_configfs.c: In function 'target_init_dbroot':
>> drivers/target/target_core_configfs.c:3222:39: error: 'DB_ROOT_PREFERRED' 
>> undeclared (first use in this function); did you mean 'DB_ROOT_DEFAULT'?
 snprintf(db_root_stage, DB_ROOT_LEN, DB_ROOT_PREFERRED);
  ^
  DB_ROOT_DEFAULT
   drivers/target/target_core_configfs.c:3222:39: note: each undeclared 
identifier is reported only once for each function it appears in

vim +3222 drivers/target/target_core_configfs.c

  3217  
  3218  static void target_init_dbroot(void)
  3219  {
  3220  struct file *fp;
  3221  
> 3222  snprintf(db_root_stage, DB_ROOT_LEN, DB_ROOT_PREFERRED);
  3223  fp = filp_open(db_root_stage, O_RDONLY, 0);
  3224  if (IS_ERR(fp)) {
  3225  pr_err("db_root: cannot open: %s\n", db_root_stage);
  3226  return;
  3227  }
  3228  if (!S_ISDIR(file_inode(fp)->i_mode)) {
  3229  filp_close(fp, NULL);
  3230  pr_err("db_root: not a valid directory: %s\n", 
db_root_stage);
  3231  return;
  3232  }
  3233  filp_close(fp, NULL);
  3234  
  3235  strncpy(db_root, db_root_stage, DB_ROOT_LEN);
  3236  pr_debug("Target_Core_ConfigFS: db_root set to %s\n", db_root);
  3237  }
  3238  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 1/1] scsi: mvsas:fix memory leak

2018-04-04 Thread kbuild test robot
Hi Xidong,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.16 next-20180403]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Xidong-Wang/scsi-mvsas-fix-memory-leak/20180404-182132
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: x86_64-randconfig-x010-201813 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers/scsi//mvsas/mv_init.c: In function 'mvs_pci_alloc':
>> drivers/scsi//mvsas/mv_init.c:373:2: warning: this 'if' clause does not 
>> guard... [-Wmisleading-indentation]
 if (!mvi)
 ^~
   drivers/scsi//mvsas/mv_init.c:375:3: note: ...this statement, but the latter 
is misleadingly indented as if it were guarded by the 'if'
  return NULL;
  ^~
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:test_and_set_bit
   Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64
   Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64
   Cyclomatic Complexity 1 include/linux/mem_encrypt.h:sme_get_me_mask
   Cyclomatic Complexity 1 include/asm-generic/getorder.h:__get_order
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags
   Cyclomatic Complexity 1 
arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
   Cyclomatic Complexity 1 include/linux/device.h:dev_get_drvdata
   Cyclomatic Complexity 1 include/linux/device.h:dev_set_drvdata
   Cyclomatic Complexity 1 include/linux/dma-debug.h:debug_dma_free_coherent
   Cyclomatic Complexity 1 arch/x86/include/asm/dma-mapping.h:get_arch_dma_ops
   Cyclomatic Complexity 4 include/linux/dma-mapping.h:get_dma_ops
   Cyclomatic Complexity 1 include/linux/kasan.h:kasan_kmalloc
   Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index
   Cyclomatic Complexity 1 include/linux/slab.h:kmem_cache_alloc_trace
   Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_order_trace
   Cyclomatic Complexity 68 include/linux/slab.h:kmalloc_large
   Cyclomatic Complexity 5 include/linux/slab.h:kmalloc
   Cyclomatic Complexity 1 include/linux/slab.h:kzalloc
   Cyclomatic Complexity 1 include/linux/pci.h:pci_get_drvdata
   Cyclomatic Complexity 1 include/linux/pci.h:pci_set_drvdata
   Cyclomatic Complexity 5 drivers/scsi//mvsas/mv_init.c:mvs_post_sas_ha_init
   Cyclomatic Complexity 8 
drivers/scsi//mvsas/mv_init.c:mvs_store_interrupt_coalescing
   Cyclomatic Complexity 1 
drivers/scsi//mvsas/mv_init.c:mvs_show_interrupt_coalescing
   Cyclomatic Complexity 1 drivers/scsi//mvsas/mv_init.c:mvs_show_driver_version
   Cyclomatic Complexity 1 arch/x86/include/asm/io.h:ioremap
   Cyclomatic Complexity 1 drivers/scsi//mvsas/mv_init.c:mvs_exit
   Cyclomatic Complexity 2 drivers/scsi//mvsas/mv_init.c:mvs_pci_alloc
   Cyclomatic Complexity 4 include/linux/dma-mapping.h:dma_free_attrs
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_free_coherent
   Cyclomatic Complexity 13 drivers/scsi//mvsas/mv_init.c:mvs_free
   Cyclomatic Complexity 2 drivers/scsi//mvsas/mv_init.c:mvs_pci_remove
   Cyclomatic Complexity 3 drivers/scsi//mvsas/mv_init.c:mvs_tasklet
   Cyclomatic Complexity 2 include/linux/interrupt.h:tasklet_schedule
   Cyclomatic Complexity 3 drivers/scsi//mvsas/mv_init.c:mvs_interrupt
   Cyclomatic Complexity 4 include/linux/dma-mapping.h:dma_supported
   Cyclomatic Complexity 3 include/linux/dma-mapping.h:dma_check_mask
   Cyclomatic Complexity 3 include/linux/dma-mapping.h:dma_set_mask
   Cyclomatic Complexity 1 include/linux/pci-dma-compat.h:pci_set_dma_mask
   Cyclomatic Complexity 2 include/linux/dma-mapping.h:dma_set_coherent_mask
   Cyclomatic Complexity 1 
include/linux/pci-dma-compat.h:pci_set_consistent_dma_mask
   Cyclomatic Complexity 6 drivers/scsi//mvsas/mv_init.c:pci_go_64
   Cyclomatic Complexity 5 include/linux/slab.h:kmalloc_array
   Cyclomatic Complexity 1 include/linux/slab.h:kcalloc
   Cyclomatic Complexity 3 drivers/scsi//mvsas/mv_init.c:mvs_prep_sas_ha_init
   Cyclomatic Complexity 2 drivers/scsi//mvsas/mv_init.c:mvs_init_sas_add
   Cyclomatic Complexity 1 include/scsi/scsi_host.h:scsi_add_host
   Cyclomatic Complexity 1 include/linux/interrupt.h:request_irq
   Cyclomatic Complexity 13 drivers/scsi//mvsas/mv_init.c:mvs_pci_init
   Cyclomatic Complexity 3 drivers/scsi//mvsas/mv_init.c:mvs_init
   Cyclomatic Complexity 13 drivers/scsi//mvsas/mv_init.c:mvs_ioremap
   Cyclomatic Complexity 1 drivers/scsi//mvsas/mv_init.c:mvs_iounmap

vim +/if +373 drivers/scsi//mvsas/mv_init.c

20b09c29 Andy Yan   2009-05-08  362  
6f039790 Greg Kroah-Hartman 2012-12-21  363  static struct mvs_info 
*mvs_pci_alloc(struct pci_dev *pdev,
20b09c29 Andy Yan   2009-05-08  364 const 
struct pci_device_id *ent,

Re: [PATCH 1/1] scsi: mvsas:fix memory leak

2018-04-04 Thread kbuild test robot
Hi Xidong,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on v4.16 next-20180403]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Xidong-Wang/scsi-mvsas-fix-memory-leak/20180404-182132
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: i386-randconfig-x016-201813 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All warnings (new ones prefixed by >>):

   In file included from include/linux/kernel.h:10:0,
from drivers/scsi/mvsas/mv_sas.h:29,
from drivers/scsi/mvsas/mv_init.c:27:
   drivers/scsi/mvsas/mv_init.c: In function 'mvs_pci_alloc':
   include/linux/compiler.h:58:2: warning: this 'if' clause does not guard... 
[-Wmisleading-indentation]
 if (__builtin_constant_p(!!(cond)) ? !!(cond) :   \
 ^
   include/linux/compiler.h:56:23: note: in expansion of macro '__trace_if'
#define if(cond, ...) __trace_if( (cond , ## __VA_ARGS__) )
  ^~
>> drivers/scsi/mvsas/mv_init.c:373:2: note: in expansion of macro 'if'
 if (!mvi)
 ^~
   drivers/scsi/mvsas/mv_init.c:375:3: note: ...this statement, but the latter 
is misleadingly indented as if it were guarded by the 'if'
  return NULL;
  ^~

vim +/if +373 drivers/scsi/mvsas/mv_init.c

20b09c29 Andy Yan   2009-05-08  362  
6f039790 Greg Kroah-Hartman 2012-12-21  363  static struct mvs_info 
*mvs_pci_alloc(struct pci_dev *pdev,
20b09c29 Andy Yan   2009-05-08  364 const 
struct pci_device_id *ent,
20b09c29 Andy Yan   2009-05-08  365 struct 
Scsi_Host *shost, unsigned int id)
20b09c29 Andy Yan   2009-05-08  366  {
84fbd0ce Xiangliang Yu  2011-05-24  367 struct mvs_info *mvi = NULL;
20b09c29 Andy Yan   2009-05-08  368 struct sas_ha_struct *sha = 
SHOST_TO_SAS_HA(shost);
20b09c29 Andy Yan   2009-05-08  369  
b89e8f53 Xiangliang Yu  2011-05-24  370 mvi = kzalloc(sizeof(*mvi) +
b89e8f53 Xiangliang Yu  2011-05-24  371 (1L << 
mvs_chips[ent->driver_data].slot_width) *
b89e8f53 Xiangliang Yu  2011-05-24  372 sizeof(struct 
mvs_slot_info), GFP_KERNEL);
20b09c29 Andy Yan   2009-05-08 @373 if (!mvi)
549079d1 Xidong Wang2018-04-04  374 scsi_host_put(shost);
20b09c29 Andy Yan   2009-05-08  375 return NULL;
dd4969a8 Jeff Garzik2009-05-08  376  
20b09c29 Andy Yan   2009-05-08  377 mvi->pdev = pdev;
20b09c29 Andy Yan   2009-05-08  378 mvi->dev = &pdev->dev;
20b09c29 Andy Yan   2009-05-08  379 mvi->chip_id = ent->driver_data;
20b09c29 Andy Yan   2009-05-08  380 mvi->chip = 
&mvs_chips[mvi->chip_id];
20b09c29 Andy Yan   2009-05-08  381 INIT_LIST_HEAD(&mvi->wq_list);
20b09c29 Andy Yan   2009-05-08  382  
20b09c29 Andy Yan   2009-05-08  383 ((struct mvs_prv_info 
*)sha->lldd_ha)->mvi[id] = mvi;
20b09c29 Andy Yan   2009-05-08  384 ((struct mvs_prv_info 
*)sha->lldd_ha)->n_phy = mvi->chip->n_phy;
20b09c29 Andy Yan   2009-05-08  385  
20b09c29 Andy Yan   2009-05-08  386 mvi->id = id;
20b09c29 Andy Yan   2009-05-08  387 mvi->sas = sha;
20b09c29 Andy Yan   2009-05-08  388 mvi->shost = shost;
20b09c29 Andy Yan   2009-05-08  389  
b89e8f53 Xiangliang Yu  2011-05-24  390 mvi->tags = 
kzalloc(MVS_CHIP_SLOT_SZ>>3, GFP_KERNEL);
b89e8f53 Xiangliang Yu  2011-05-24  391 if (!mvi->tags)
b89e8f53 Xiangliang Yu  2011-05-24  392 goto err_out;
b89e8f53 Xiangliang Yu  2011-05-24  393  
20b09c29 Andy Yan   2009-05-08  394 if 
(MVS_CHIP_DISP->chip_ioremap(mvi))
20b09c29 Andy Yan   2009-05-08  395 goto err_out;
20b09c29 Andy Yan   2009-05-08  396 if (!mvs_alloc(mvi, shost))
20b09c29 Andy Yan   2009-05-08  397 return mvi;
dd4969a8 Jeff Garzik2009-05-08  398  err_out:
dd4969a8 Jeff Garzik2009-05-08  399 mvs_free(mvi);
dd4969a8 Jeff Garzik2009-05-08  400 return NULL;
dd4969a8 Jeff Garzik2009-05-08  401  }
dd4969a8 Jeff Garzik2009-05-08  402  

:: The code at line 373 was first introduced by commit
:: 20b09c2992fefbe78f8cede7b404fb143a413c52 [SCSI] mvsas: add support for 
94xx; layout change; bug fixes

:: TO: Andy Yan 
:: CC: James Bottomley 

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH 11/15] mpt3sas: Report Firmware Package Version from HBA Driver.

2018-03-31 Thread kbuild test robot
Hi Chaitra,

I love your patch! Perhaps something to improve:

[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on next-20180329]
[cannot apply to scsi/for-next v4.16-rc7]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Chaitra-P-B/mpt3sas-Enhancements-and-Defect-fixes/20180331-123801
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/mpt3sas/mpt3sas_base.c:3878:32: sparse: incorrect type in 
>> assignment (different base types) @@expected restricted __le32 
>> [usertype] ImageSize @@got unsigned long [unsrestricted __le32 
>> [usertype] ImageSize @@
   drivers/scsi/mpt3sas/mpt3sas_base.c:3878:32:expected restricted __le32 
[usertype] ImageSize
   drivers/scsi/mpt3sas/mpt3sas_base.c:3878:32:got unsigned long [unsigned] 
[assigned] [usertype] data_length
>> drivers/scsi/mpt3sas/mpt3sas_base.c:3903:63: sparse: incorrect type in 
>> assignment (different base types) @@expected restricted __le32 
>> [usertype] Word @@got unsignrestricted __le32 [usertype] Word @@
   drivers/scsi/mpt3sas/mpt3sas_base.c:3903:63:expected restricted __le32 
[usertype] Word
   drivers/scsi/mpt3sas/mpt3sas_base.c:3903:63:got unsigned int [unsigned] 
[usertype] 
   drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: sparse: restricted __le32 
degrades to integer
   drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: sparse: restricted __le32 
degrades to integer
   drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: sparse: restricted __le32 
degrades to integer
   drivers/scsi/mpt3sas/mpt3sas_base.c:3906:41: sparse: restricted __le32 
degrades to integer

vim +3878 drivers/scsi/mpt3sas/mpt3sas_base.c

  3826  
  3827  /**
  3828   * _base_display_fwpkg_version - sends FWUpload request to pull FWPkg
  3829   *  version from FW Image Header.
  3830   * @ioc: per adapter object
  3831   *
  3832   * Returns 0 for success, non-zero for failure.
  3833   */
  3834  static int
  3835  _base_display_fwpkg_version(struct MPT3SAS_ADAPTER *ioc)
  3836  {
  3837  Mpi2FWImageHeader_t *FWImgHdr;
  3838  Mpi25FWUploadRequest_t *mpi_request;
  3839  Mpi2FWUploadReply_t mpi_reply;
  3840  int r = 0;
  3841  void *fwpkg_data = NULL;
  3842  dma_addr_t fwpkg_data_dma;
  3843  u16 smid, ioc_status;
  3844  size_t data_length;
  3845  
  3846  dinitprintk(ioc, pr_info(MPT3SAS_FMT "%s\n", ioc->name,
  3847  __func__));
  3848  
  3849  if (ioc->base_cmds.status & MPT3_CMD_PENDING) {
  3850  pr_err(MPT3SAS_FMT "%s: internal command already in 
use\n",
  3851  ioc->name, __func__);
  3852  return -EAGAIN;
  3853  }
  3854  
  3855  data_length = sizeof(Mpi2FWImageHeader_t);
  3856  fwpkg_data = pci_alloc_consistent(ioc->pdev, data_length,
  3857  &fwpkg_data_dma);
  3858  if (!fwpkg_data) {
  3859  pr_err(MPT3SAS_FMT "failure at %s:%d/%s()!\n",
  3860  ioc->name, __FILE__, __LINE__, 
__func__);
  3861  return -ENOMEM;
  3862  }
  3863  
  3864  smid = mpt3sas_base_get_smid(ioc, ioc->base_cb_idx);
  3865  if (!smid) {
  3866  pr_err(MPT3SAS_FMT "%s: failed obtaining a smid\n",
  3867  ioc->name, __func__);
  3868  r = -EAGAIN;
  3869  goto out;
  3870  }
  3871  
  3872  ioc->base_cmds.status = MPT3_CMD_PENDING;
  3873  mpi_request = mpt3sas_base_get_msg_frame(ioc, smid);
  3874  ioc->base_cmds.smid = smid;
  3875  memset(mpi_request, 0, sizeof(Mpi25FWUploadRequest_t));
  3876  mpi_request->Function = MPI2_FUNCTION_FW_UPLOAD;
  3877  mpi_request->ImageType = MPI2_FW_UPLOAD_ITYPE_FW_FLASH;
> 3878  mpi_request->ImageSize = data_length;
  3879  ioc->build_sg(ioc, &mpi_request->SGL, 0, 0, fwpkg_data_dma,
  3880  data_length);
  3881  init_completion(&ioc->base_cmds.done);
  3882  mpt3sas_base_put_smid_default(ioc, smid);
  3883  /* Wait for 15 seconds */
  3884  wait_for_completion_timeout(&ioc->base_cmds.done,
  3885  FW_IMG_HDR_READ_TIMEOUT*HZ);
  3886  pr_info(MPT3SAS_FMT "%s: complete\n",
  3887  ioc->name, __func__);
  3888  if (!(ioc->base_cmds.status & MPT3_CMD_COMPLETE)) {
  3889  pr_err(MPT3SAS_FMT "%s: timeout\n",
  3890  ioc->name, __func__);
  3

Re: [PATCH net-next] qed*: Utilize FW 8.33.11.0

2018-03-26 Thread kbuild test robot
Hi Michal,

I love your patch! Perhaps something to improve:

[auto build test WARNING on net-next/master]

url:
https://github.com/0day-ci/linux/commits/Michal-Kalderon/qed-Utilize-FW-8-33-11-0/20180327-070630
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/net/ethernet/qlogic/qed/qed_cxt.c:972:41: sparse: incorrect type in 
>> assignment (different base types) @@expected unsigned long long 
>> [unsigned] [usertype] next @@got g long [unsigned] [usertype] next @@
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:972:41:expected unsigned long 
long [unsigned] [usertype] next
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:972:41:got restricted __be64 
[usertype] 
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:979:33: sparse: incorrect type in 
assignment (different base types) @@expected unsigned long long [unsigned] 
[usertype] next @@got g long [unsigned] [usertype] next @@
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:979:33:expected unsigned long 
long [unsigned] [usertype] next
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:979:33:got restricted __be64 
[usertype] 
>> drivers/net/ethernet/qlogic/qed/qed_cxt.c:1534:6: sparse: symbol 
>> 'qed_cm_init_pf' was not declared. Should it be static?
>> drivers/net/ethernet/qlogic/qed/qed_cxt.c:2331:25: sparse: invalid 
>> assignment: &=
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:2331:25:left side has type 
restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:2331:25:right side has type int
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:2331:25: sparse: invalid 
assignment: |=
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:2331:25:left side has type 
restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_cxt.c:2331:25:right side has type 
unsigned long long
--
>> drivers/net/ethernet/qlogic/qed/qed_dev.c:233:4: sparse: symbol 
>> 'qed_init_qm_get_num_tcs' was not declared. Should it be static?
>> drivers/net/ethernet/qlogic/qed/qed_dev.c:238:5: sparse: symbol 
>> 'qed_init_qm_get_num_vfs' was not declared. Should it be static?
>> drivers/net/ethernet/qlogic/qed/qed_dev.c:246:5: sparse: symbol 
>> 'qed_init_qm_get_num_pf_rls' was not declared. Should it be static?
>> drivers/net/ethernet/qlogic/qed/qed_dev.c:264:5: sparse: symbol 
>> 'qed_init_qm_get_num_vports' was not declared. Should it be static?
>> drivers/net/ethernet/qlogic/qed/qed_dev.c:276:5: sparse: symbol 
>> 'qed_init_qm_get_num_pqs' was not declared. Should it be static?
>> drivers/net/ethernet/qlogic/qed/qed_dev.c:510:5: sparse: symbol 
>> 'qed_get_cm_pq_idx_rl' was not declared. Should it be static?
--
>> drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
>> assignment: &=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:right side 
has type int
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
assignment: |=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:right side 
has type unsigned long long
>> drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
>> assignment: &=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:right side 
has type int
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
assignment: |=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:right side 
has type int
>> drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
>> assignment: &=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:right side 
has type int
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
assignment: |=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:right side 
has type unsigned long long
>> drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
>> assignment: &=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted __le32
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:right side 
has type int
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17: sparse: invalid 
assignment: |=
   drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c:503:17:left side has 
type restricted

[RFC PATCH] qed*: qed_cm_init_pf() can be static

2018-03-26 Thread kbuild test robot

Fixes: cda33d25b808 ("qed*: Utilize FW 8.33.11.0")
Signed-off-by: Fengguang Wu 
---
 qed_cxt.c   |2 +-
 qed_dcbx.c  |2 +-
 qed_dev.c   |   12 ++--
 qed_init_fw_funcs.c |2 +-
 qed_iscsi.c |4 ++--
 qed_iwarp.c |   18 +-
 qed_ll2.c   |4 ++--
 qed_mcp.c   |2 +-
 qed_rdma.c  |4 ++--
 qed_roce.c  |2 +-
 qed_sriov.c |8 
 qed_vf.c|2 +-
 12 files changed, 31 insertions(+), 31 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qed/qed_cxt.c 
b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
index 00f41c1..1695c90 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_cxt.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_cxt.c
@@ -1531,7 +1531,7 @@ void qed_qm_init_pf(struct qed_hwfn *p_hwfn,
 }
 
 /* CM PF */
-void qed_cm_init_pf(struct qed_hwfn *p_hwfn)
+static void qed_cm_init_pf(struct qed_hwfn *p_hwfn)
 {
/* XCM pure-LB queue */
STORE_RT_REG(p_hwfn, XCM_REG_CON_PHY_Q3_RT_OFFSET,
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c 
b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
index 449777f..456b8d1 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dcbx.c
@@ -860,7 +860,7 @@ static int qed_dcbx_read_mib(struct qed_hwfn *p_hwfn,
return rc;
 }
 
-void qed_dcbx_aen(struct qed_hwfn *hwfn, u32 mib_type)
+static void qed_dcbx_aen(struct qed_hwfn *hwfn, u32 mib_type)
 {
struct qed_common_cb_ops *op = hwfn->cdev->protocol_ops.common;
void *cookie = hwfn->cdev->ops_cookie;
diff --git a/drivers/net/ethernet/qlogic/qed/qed_dev.c 
b/drivers/net/ethernet/qlogic/qed/qed_dev.c
index de5527c..0daef44 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_dev.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_dev.c
@@ -230,12 +230,12 @@ static u32 qed_get_pq_flags(struct qed_hwfn *p_hwfn)
 }
 
 /* Getters for resource amounts necessary for qm initialization */
-u8 qed_init_qm_get_num_tcs(struct qed_hwfn *p_hwfn)
+static u8 qed_init_qm_get_num_tcs(struct qed_hwfn *p_hwfn)
 {
return p_hwfn->hw_info.num_hw_tc;
 }
 
-u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn)
+static u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn)
 {
return IS_QED_SRIOV(p_hwfn->cdev) ?
   p_hwfn->cdev->p_iov_info->total_vfs : 0;
@@ -243,7 +243,7 @@ u16 qed_init_qm_get_num_vfs(struct qed_hwfn *p_hwfn)
 
 #define NUM_DEFAULT_RLS 1
 
-u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn)
+static u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn)
 {
u16 num_pf_rls, num_vfs = qed_init_qm_get_num_vfs(p_hwfn);
 
@@ -261,7 +261,7 @@ u16 qed_init_qm_get_num_pf_rls(struct qed_hwfn *p_hwfn)
return num_pf_rls;
 }
 
-u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn)
+static u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn)
 {
u32 pq_flags = qed_get_pq_flags(p_hwfn);
 
@@ -273,7 +273,7 @@ u16 qed_init_qm_get_num_vports(struct qed_hwfn *p_hwfn)
 }
 
 /* calc amount of PQs according to the requested flags */
-u16 qed_init_qm_get_num_pqs(struct qed_hwfn *p_hwfn)
+static u16 qed_init_qm_get_num_pqs(struct qed_hwfn *p_hwfn)
 {
u32 pq_flags = qed_get_pq_flags(p_hwfn);
 
@@ -507,7 +507,7 @@ u16 qed_get_cm_pq_idx_vf(struct qed_hwfn *p_hwfn, u16 vf)
return qed_get_cm_pq_idx(p_hwfn, PQ_FLAGS_VFS) + vf;
 }
 
-u16 qed_get_cm_pq_idx_rl(struct qed_hwfn *p_hwfn, u8 rl)
+static u16 qed_get_cm_pq_idx_rl(struct qed_hwfn *p_hwfn, u8 rl)
 {
u16 max_rl = qed_init_qm_get_num_pf_rls(p_hwfn);
 
diff --git a/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c 
b/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
index 1365da7..b296b78 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_init_fw_funcs.c
@@ -1225,7 +1225,7 @@ void qed_gft_disable(struct qed_hwfn *p_hwfn, struct 
qed_ptt *p_ptt, u16 pf_id)
   0);
 }
 
-void qed_set_gft_event_id_cm_hdr(struct qed_hwfn *p_hwfn, struct qed_ptt 
*p_ptt)
+static void qed_set_gft_event_id_cm_hdr(struct qed_hwfn *p_hwfn, struct 
qed_ptt *p_ptt)
 {
u32 rfs_cm_hdr_event_id;
 
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iscsi.c 
b/drivers/net/ethernet/qlogic/qed/qed_iscsi.c
index c0d4a54..1135387 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_iscsi.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_iscsi.c
@@ -873,8 +873,8 @@ static void qed_iscsi_release_connection(struct qed_hwfn 
*p_hwfn,
spin_unlock_bh(&p_hwfn->p_iscsi_info->lock);
 }
 
-void qed_iscsi_free_connection(struct qed_hwfn *p_hwfn,
-  struct qed_iscsi_conn *p_conn)
+static void qed_iscsi_free_connection(struct qed_hwfn *p_hwfn,
+ struct qed_iscsi_conn *p_conn)
 {
qed_chain_free(p_hwfn->cdev, &p_conn->xhq);
qed_chain_free(p_hwfn->cdev, &p_conn->uhq);
diff --git a/drivers/net/ethernet/qlogic/qed/qed_iwarp.c 
b/dr

Re: [PATCH 3/3] Storvsc: Select channel based on available percentage of ring buffer to write

2018-03-23 Thread kbuild test robot
Hi Long,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on v4.16-rc6]
[cannot apply to linus/master net-next/master net/master next-20180323]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Long-Li/Vmbus-Add-function-to-report-available-ring-buffer-to-write-in-total-ring-size-percentage/20180324-124431
config: x86_64-rhel (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

All warnings (new ones prefixed by >>):

   drivers//scsi/storvsc_drv.c: In function 'storvsc_do_io':
>> drivers//scsi/storvsc_drv.c:1402:1: warning: the frame size of 2064 bytes is 
>> larger than 2048 bytes [-Wframe-larger-than=]
}
^

vim +1402 drivers//scsi/storvsc_drv.c

d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1287  
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1288  
c1b3d067 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1289  
static int storvsc_do_io(struct hv_device *device,
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1290 
 struct storvsc_cmd_request *request, u16 q_num)
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1291  {
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1292 
struct storvsc_device *stor_device;
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1293 
struct vstor_packet *vstor_packet;
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22  1294 
struct vmbus_channel *outgoing_channel, *channel;
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1295 
int ret = 0;
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22  1296 
struct cpumask alloced_mask, other_numa_mask;
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1297 
int tgt_cpu;
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1298  
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1299 
vstor_packet = &request->vstor_packet;
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1300 
stor_device = get_out_stor_device(device);
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1301  
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1302 
if (!stor_device)
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1303 
return -ENODEV;
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1304  
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1305  
8dcf37d4 drivers/staging/hv/storvsc_drv.c K. Y. Srinivasan 2011-08-27  1306 
request->device  = device;
6f94d5de drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2013-06-04  1307 
/*
6f94d5de drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2013-06-04  1308 
 * Select an an appropriate channel to send the request out.
6f94d5de drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2013-06-04  1309 
 */
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1310 
if (stor_device->stor_chns[q_num] != NULL) {
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1311 
outgoing_channel = stor_device->stor_chns[q_num];
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22  1312 
if (outgoing_channel->target_cpu == q_num) {
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1313 
/*
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1314 
 * Ideally, we want to pick a different channel if
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1315 
 * available on the same NUMA node.
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1316 
 */
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1317 
cpumask_and(&alloced_mask, &stor_device->alloced_cpus,
d86adf48 drivers/scsi/storvsc_drv.c   K. Y. Srinivasan 2016-12-14  1318 
cpumask_of_node(cpu_to_node(q_num)));
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22  1319  
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22  1320 
for_each_cpu_wrap(tgt_cpu, &alloced_mask, q_num + 1) {
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22  1321 
if (tgt_cpu == q_num)
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22  1322 
continue;
e75adf20 drivers/scsi/storvsc_drv.c   Long Li  2018-03-22 

Re: [PATCH] target: Use WARNON_NON_RT(!irqs_disabled())

2018-03-22 Thread kbuild test robot
Hi Arnaldo,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc6 next-20180322]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Arnaldo-Carvalho-de-Melo/target-Use-WARNON_NON_RT-irqs_disabled/20180322-174549
config: i386-randconfig-s1-03221113 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers/target/target_core_transport.c: In function 
'__transport_check_aborted_status':
>> drivers/target/target_core_transport.c:3207:2: error: implicit declaration 
>> of function 'WARN_ON_ONCE_NONRT' [-Werror=implicit-function-declaration]
 WARN_ON_ONCE_NONRT(!irqs_disabled());
 ^~
   cc1: some warnings being treated as errors

vim +/WARN_ON_ONCE_NONRT +3207 drivers/target/target_core_transport.c

  3199  
  3200  static int __transport_check_aborted_status(struct se_cmd *cmd, int 
send_status)
  3201  __releases(&cmd->t_state_lock)
  3202  __acquires(&cmd->t_state_lock)
  3203  {
  3204  int ret;
  3205  
  3206  assert_spin_locked(&cmd->t_state_lock);
> 3207  WARN_ON_ONCE_NONRT(!irqs_disabled());
  3208  
  3209  if (!(cmd->transport_state & CMD_T_ABORTED))
  3210  return 0;
  3211  /*
  3212   * If cmd has been aborted but either no status is to be sent 
or it has
  3213   * already been sent, just return
  3214   */
  3215  if (!send_status || !(cmd->se_cmd_flags & 
SCF_SEND_DELAYED_TAS)) {
  3216  if (send_status)
  3217  cmd->se_cmd_flags |= SCF_SEND_DELAYED_TAS;
  3218  return 1;
  3219  }
  3220  
  3221  pr_debug("Sending delayed SAM_STAT_TASK_ABORTED status for CDB:"
  3222  " 0x%02x ITT: 0x%08llx\n", cmd->t_task_cdb[0], 
cmd->tag);
  3223  
  3224  cmd->se_cmd_flags &= ~SCF_SEND_DELAYED_TAS;
  3225  cmd->scsi_status = SAM_STAT_TASK_ABORTED;
  3226  trace_target_cmd_complete(cmd);
  3227  
  3228  spin_unlock_irq(&cmd->t_state_lock);
  3229  ret = cmd->se_tfo->queue_status(cmd);
  3230  if (ret)
  3231  transport_handle_queue_full(cmd, cmd->se_dev, ret, 
false);
  3232  spin_lock_irq(&cmd->t_state_lock);
  3233  
  3234  return 1;
  3235  }
  3236  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH] target: Use WARNON_NON_RT(!irqs_disabled())

2018-03-22 Thread kbuild test robot
Hi Arnaldo,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.16-rc6 next-20180322]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Arnaldo-Carvalho-de-Melo/target-Use-WARNON_NON_RT-irqs_disabled/20180322-174549
config: i386-randconfig-x015-201811 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   drivers//target/target_core_transport.c: In function 
'__transport_check_aborted_status':
>> drivers//target/target_core_transport.c:3207:2: error: implicit declaration 
>> of function 'WARN_ON_ONCE_NONRT'; did you mean 'WARN_ON_ONCE'? 
>> [-Werror=implicit-function-declaration]
 WARN_ON_ONCE_NONRT(!irqs_disabled());
 ^~
 WARN_ON_ONCE
   cc1: some warnings being treated as errors

vim +3207 drivers//target/target_core_transport.c

  3199  
  3200  static int __transport_check_aborted_status(struct se_cmd *cmd, int 
send_status)
  3201  __releases(&cmd->t_state_lock)
  3202  __acquires(&cmd->t_state_lock)
  3203  {
  3204  int ret;
  3205  
  3206  assert_spin_locked(&cmd->t_state_lock);
> 3207  WARN_ON_ONCE_NONRT(!irqs_disabled());
  3208  
  3209  if (!(cmd->transport_state & CMD_T_ABORTED))
  3210  return 0;
  3211  /*
  3212   * If cmd has been aborted but either no status is to be sent 
or it has
  3213   * already been sent, just return
  3214   */
  3215  if (!send_status || !(cmd->se_cmd_flags & 
SCF_SEND_DELAYED_TAS)) {
  3216  if (send_status)
  3217  cmd->se_cmd_flags |= SCF_SEND_DELAYED_TAS;
  3218  return 1;
  3219  }
  3220  
  3221  pr_debug("Sending delayed SAM_STAT_TASK_ABORTED status for CDB:"
  3222  " 0x%02x ITT: 0x%08llx\n", cmd->t_task_cdb[0], 
cmd->tag);
  3223  
  3224  cmd->se_cmd_flags &= ~SCF_SEND_DELAYED_TAS;
  3225  cmd->scsi_status = SAM_STAT_TASK_ABORTED;
  3226  trace_target_cmd_complete(cmd);
  3227  
  3228  spin_unlock_irq(&cmd->t_state_lock);
  3229  ret = cmd->se_tfo->queue_status(cmd);
  3230  if (ret)
  3231  transport_handle_queue_full(cmd, cmd->se_dev, ret, 
false);
  3232  spin_lock_irq(&cmd->t_state_lock);
  3233  
  3234  return 1;
  3235  }
  3236  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


Re: [PATCH v3 01/13] qla2xxx: Remove unneeded message and minor cleanup for FC-NVMe

2018-03-20 Thread kbuild test robot
Hi Himanshu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on v4.16-rc4]
[also build test ERROR on next-20180320]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Remove-unneeded-message-and-minor-cleanup-for-FC-NVMe/20180320-215409
config: x86_64-lkp (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 

Note: the 
linux-review/Himanshu-Madhani/qla2xxx-Remove-unneeded-message-and-minor-cleanup-for-FC-NVMe/20180320-215409
 HEAD 50dbc1dc7fc60496f8e073be2dd0fc1a0347e95d builds fine.
  It only hurts bisectibility.

All errors (new ones prefixed by >>):

   drivers/scsi/qla2xxx/qla_nvme.c: In function 'qla2x00_start_nvme_mq':
>> drivers/scsi/qla2xxx/qla_nvme.c:478:6: error: 'rsp' undeclared (first use in 
>> this function); did you mean 'sp'?
 rsp->ring_ptr->signature != RESPONSE_PROCESSED)
 ^~~
 sp
   drivers/scsi/qla2xxx/qla_nvme.c:478:6: note: each undeclared identifier is 
reported only once for each function it appears in

vim +478 drivers/scsi/qla2xxx/qla_nvme.c

e84067d7 Duane Grigsby2017-06-21  300  
e84067d7 Duane Grigsby2017-06-21  301  static int 
qla2x00_start_nvme_mq(srb_t *sp)
e84067d7 Duane Grigsby2017-06-21  302  {
e84067d7 Duane Grigsby2017-06-21  303   unsigned long   flags;
e84067d7 Duane Grigsby2017-06-21  304   uint32_t*clr_ptr;
e84067d7 Duane Grigsby2017-06-21  305   uint32_tindex;
e84067d7 Duane Grigsby2017-06-21  306   uint32_thandle;
e84067d7 Duane Grigsby2017-06-21  307   struct cmd_nvme *cmd_pkt;
e84067d7 Duane Grigsby2017-06-21  308   uint16_tcnt, i;
e84067d7 Duane Grigsby2017-06-21  309   uint16_treq_cnt;
e84067d7 Duane Grigsby2017-06-21  310   uint16_ttot_dsds;
e84067d7 Duane Grigsby2017-06-21  311   uint16_tavail_dsds;
e84067d7 Duane Grigsby2017-06-21  312   uint32_t*cur_dsd;
e84067d7 Duane Grigsby2017-06-21  313   struct req_que *req = NULL;
e84067d7 Duane Grigsby2017-06-21  314   struct scsi_qla_host *vha = 
sp->fcport->vha;
e84067d7 Duane Grigsby2017-06-21  315   struct qla_hw_data *ha = 
vha->hw;
e84067d7 Duane Grigsby2017-06-21  316   struct qla_qpair *qpair = 
sp->qpair;
e84067d7 Duane Grigsby2017-06-21  317   struct srb_iocb *nvme = 
&sp->u.iocb_cmd;
e84067d7 Duane Grigsby2017-06-21  318   struct scatterlist *sgl, *sg;
e84067d7 Duane Grigsby2017-06-21  319   struct nvmefc_fcp_req *fd = 
nvme->u.nvme.desc;
e84067d7 Duane Grigsby2017-06-21  320   uint32_trval = 
QLA_SUCCESS;
e84067d7 Duane Grigsby2017-06-21  321  
ee6b1136 Himanshu Madhani 2018-03-19  322   /* Setup qpair pointers */
ee6b1136 Himanshu Madhani 2018-03-19  323   req = qpair->req;
e84067d7 Duane Grigsby2017-06-21  324   tot_dsds = fd->sg_cnt;
e84067d7 Duane Grigsby2017-06-21  325  
e84067d7 Duane Grigsby2017-06-21  326   /* Acquire qpair specific lock 
*/
e84067d7 Duane Grigsby2017-06-21  327   
spin_lock_irqsave(&qpair->qp_lock, flags);
e84067d7 Duane Grigsby2017-06-21  328  
e84067d7 Duane Grigsby2017-06-21  329   /* Check for room in 
outstanding command list. */
e84067d7 Duane Grigsby2017-06-21  330   handle = 
req->current_outstanding_cmd;
e84067d7 Duane Grigsby2017-06-21  331   for (index = 1; index < 
req->num_outstanding_cmds; index++) {
e84067d7 Duane Grigsby2017-06-21  332   handle++;
e84067d7 Duane Grigsby2017-06-21  333   if (handle == 
req->num_outstanding_cmds)
e84067d7 Duane Grigsby2017-06-21  334   handle = 1;
e84067d7 Duane Grigsby2017-06-21  335   if 
(!req->outstanding_cmds[handle])
e84067d7 Duane Grigsby2017-06-21  336   break;
e84067d7 Duane Grigsby2017-06-21  337   }
e84067d7 Duane Grigsby2017-06-21  338  
e84067d7 Duane Grigsby2017-06-21  339   if (index == 
req->num_outstanding_cmds) {
e84067d7 Duane Grigsby2017-06-21  340   rval = -1;
e84067d7 Duane Grigsby2017-06-21  341   goto queuing_error;
e84067d7 Duane Grigsby2017-06-21  342   }
e84067d7 Duane Grigsby2017-06-21  343   req_cnt = 
qla24xx_calc_iocbs(vha, tot_dsds);
e84067d7 Duane Grigsby2017-06-21  344   if (req->cnt < (req_cnt + 2)) {
e84067d7 Duane Grigsby2017-06-21  345   cnt = 
IS_SHADOW_REG_CAPABLE(ha) ? *req->out_ptr :
e84067d7 Duane Grigsby2017-06-21  346   
RD_REG_DWORD_RELAXED(req->req_q_out);
e84067d7 Duane Grigsby2017-06-21  347  
e84067d7 Duane Grigsby2017-06-21  348   if (req->ring_index < 
cnt)
e84067d7 Duane Grigsby2017-

Re: [PATCH] mpt3sas: Cache enclosure pages during enclosure add.

2018-03-20 Thread kbuild test robot
Hi Chaitra,

I love your patch! Perhaps something to improve:

[auto build test WARNING on v4.16-rc4]
[also build test WARNING on next-20180320]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Chaitra-P-B/mpt3sas-Cache-enclosure-pages-during-enclosure-add/20180320-220411
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__


sparse warnings: (new ones prefixed by >>)

>> drivers/scsi/mpt3sas/mpt3sas_scsih.c:6100:63: sparse: incorrect type in 
>> argument 2 (different base types) @@expected unsigned short [unsigned] 
>> [usertype] handle @@got restriunsigned short [unsigned] [usertype] 
>> handle @@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:6100:63:expected unsigned short 
[unsigned] [usertype] handle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:6100:63:got restricted __le16 
[addressable] [usertype] EnclosureHandle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:6907:13: sparse: cast to restricted 
__le16
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:6907:13: sparse: cast from restricted 
__le32
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:160:22: sparse: symbol 
'mpt3sas_raid_template' was not declared. Should it be static?
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:161:22: sparse: symbol 
'mpt2sas_raid_template' was not declared. Should it be static?
>> drivers/scsi/mpt3sas/mpt3sas_scsih.c:1373:24: sparse: symbol 
>> 'mpt3sas_scsih_enclosure_find_by_handle' was not declared. Should it be 
>> static?
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3749:36: sparse: incorrect type in 
assignment (different base types) @@expected unsigned short [unsigned] 
[usertype] handle @@got  short [unsigned] [usertype] handle @@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3749:36:expected unsigned short 
[unsigned] [usertype] handle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3749:36:got restricted __le16 
[usertype] DevHandle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3942:9: sparse: cast to restricted 
__le16
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3949:28: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
Event @@got unsignedrestricted __le16 [usertype] Event @@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3949:28:expected restricted __le16 
[usertype] Event
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3949:28:got unsigned short 
[unsigned] [usertype] event
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3950:35: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le32 [usertype] 
EventContext @@got unsignrestricted __le32 [usertype] EventContext @@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3950:35:expected restricted __le32 
[usertype] EventContext
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:3950:35:got unsigned int [unsigned] 
[usertype] event_context
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:4001:9: sparse: cast to restricted 
__le16
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:4009:32: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le16 [usertype] 
DevHandle @@got unsignedrestricted __le16 [usertype] DevHandle @@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:4009:32:expected restricted __le16 
[usertype] DevHandle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:4009:32:got unsigned short 
[unsigned] [usertype] handle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:4531:61: sparse: incorrect type in 
assignment (different base types) @@expected restricted __le32 [usertype] 
PrimaryReferenceTag @@got restricted __le32 [usertype] PrimaryReferenceTag 
@@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:4531:61:expected restricted __le32 
[usertype] PrimaryReferenceTag
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:4531:61:got restricted __be32 
[usertype] 
>> drivers/scsi/mpt3sas/mpt3sas_scsih.c:7324:37: sparse: incorrect type in 
>> assignment (different base types) @@expected restricted __le16 
>> [usertype] EnclosureHandle @@got unsignedrestricted __le16 [usertype] 
>> EnclosureHandle @@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:7324:37:expected restricted __le16 
[usertype] EnclosureHandle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:7324:37:got unsigned short 
[unsigned] [usertype] 
>> drivers/scsi/mpt3sas/mpt3sas_scsih.c:7329:59: sparse: incorrect type in 
>> argument 2 (different base types) @@expected unsigned short [unsigned] 
>> [usertype] handle @@got  short [unsigned] [usertype] handle @@
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:7329:59:expected unsigned short 
[unsigned] [usertype] handle
   drivers/scsi/mpt3sas/mpt3sas_scsih.c:7329:59:got restricted __le16 
[usertype] EnclosureHandle
>> drivers/scsi/mpt3sas/mpt3sas_scsih.c:7345:43: sparse: incorrect type in 
>> argument 5 (different base types) @@expected unsigned int [unsigned] 
>> [usertype] handle @@got ed int [unsigned] [usertype] handle @@
   drive

[RFC PATCH] mpt3sas: mpt3sas_scsih_enclosure_find_by_handle can be static

2018-03-20 Thread kbuild test robot

Fixes: 793a6223beef ("mpt3sas: Cache enclosure pages during enclosure add.")
Signed-off-by: Fengguang Wu 
---
 mpt3sas_scsih.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_scsih.c 
b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
index c93c5c5..67a43957 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_scsih.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_scsih.c
@@ -1370,7 +1370,7 @@ mpt3sas_scsih_expander_find_by_handle(struct 
MPT3SAS_ADAPTER *ioc, u16 handle)
  * This searches for enclosure device based on handle, then returns the
  * enclosure object.
  */
-struct _enclosure_node *
+static struct _enclosure_node *
 mpt3sas_scsih_enclosure_find_by_handle(struct MPT3SAS_ADAPTER *ioc, u16 handle)
 {
struct _enclosure_node *enclosure_dev, *r;


Re: [PATCH 12/13] qla2xxx: Fix Async GPN_FT for FCP and FC-NVMe scan

2018-03-12 Thread kbuild test robot
Hi Quinn,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20180309]
[also build test WARNING on v4.16-rc5]
[cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Himanshu-Madhani/qla2xxx-Fixes-for-FC-NVMe/20180313-055925
config: i386-randconfig-x078-201810 (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_read
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_inc
   Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:atomic_dec
   Cyclomatic Complexity 1 arch/x86/include/asm/paravirt.h:arch_local_save_flags
   Cyclomatic Complexity 1 
arch/x86/include/asm/irqflags.h:arch_irqs_disabled_flags
   Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check
   Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore
   Cyclomatic Complexity 2 include/linux/workqueue.h:to_delayed_work
   Cyclomatic Complexity 1 include/linux/completion.h:__init_completion
   Cyclomatic Complexity 1 include/linux/dma-debug.h:debug_dma_alloc_coherent
   Cyclomatic Complexity 1 include/linux/dma-debug.h:debug_dma_free_coherent
   Cyclomatic Complexity 1 arch/x86/include/asm/dma-mapping.h:get_arch_dma_ops
   Cyclomatic Complexity 4 include/linux/dma-mapping.h:get_dma_ops
   Cyclomatic Complexity 7 include/linux/dma-mapping.h:dma_alloc_attrs
   Cyclomatic Complexity 71 include/linux/dma-mapping.h:dma_free_attrs
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_alloc_coherent
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_free_coherent
   Cyclomatic Complexity 1 include/linux/dma-mapping.h:dma_zalloc_coherent
   Cyclomatic Complexity 1 
include/linux/unaligned/access_ok.h:get_unaligned_be64
   Cyclomatic Complexity 1 include/scsi/scsi_transport_fc.h:wwn_to_u64
   Cyclomatic Complexity 1 
drivers/scsi/qla2xxx/qla_target.h:qla_ini_mode_enabled
   Cyclomatic Complexity 1 
drivers/scsi/qla2xxx/qla_target.h:qla_dual_mode_enabled
   Cyclomatic Complexity 5 
drivers/scsi/qla2xxx/qla_inline.h:qla2x00_is_reserved_id
   Cyclomatic Complexity 3 
drivers/scsi/qla2xxx/qla_inline.h:qla2x00_clear_loop_id
   Cyclomatic Complexity 5 drivers/scsi/qla2xxx/qla_inline.h:qla2x00_get_sp
   Cyclomatic Complexity 4 drivers/scsi/qla2xxx/qla_inline.h:qla2x00_init_timer
   Cyclomatic Complexity 1 include/linux/utsname.h:utsname
   Cyclomatic Complexity 1 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_prep_ct_req
   Cyclomatic Complexity 1 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_gid_pt_rsp_size
   Cyclomatic Complexity 1 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_prep_sns_cmd
   Cyclomatic Complexity 2 
drivers/scsi/qla2xxx/qla_gs.c:qla2x00_update_ms_fdmi_iocb
   Cyclomatic Complexity 1 
drivers/scsi/qla2xxx/qla_gs.c:qla2x00_prep_ct_fdmi_req
   Cyclomatic Complexity 1 drivers/scsi/qla2xxx/qla_gs.c:qla24xx_prep_ct_fm_req
   Cyclomatic Complexity 4 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_sns_ga_nxt
   Cyclomatic Complexity 6 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_sns_gid_pt
   Cyclomatic Complexity 5 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_sns_gpn_id
   Cyclomatic Complexity 5 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_sns_gnn_id
   Cyclomatic Complexity 3 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_sns_rft_id
   Cyclomatic Complexity 3 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_sns_rnn_id
   Cyclomatic Complexity 7 drivers/scsi/qla2xxx/qla_gs.c:qla_async_rftid
   Cyclomatic Complexity 5 drivers/scsi/qla2xxx/qla_gs.c:qla_async_rffid
   Cyclomatic Complexity 5 drivers/scsi/qla2xxx/qla_gs.c:qla_async_rnnid
   Cyclomatic Complexity 8 
drivers/scsi/qla2xxx/qla_gs.c:qla2x00_async_sns_sp_done
   Cyclomatic Complexity 8 drivers/scsi/qla2xxx/qla_gs.c:qla24xx_async_gnnft
   Cyclomatic Complexity 11 
drivers/scsi/qla2xxx/qla_gs.c:qla24xx_async_gpsc_sp_done
   Cyclomatic Complexity 4 
drivers/scsi/qla2xxx/qla_gs.c:qla24xx_async_gffid_sp_done
   Cyclomatic Complexity 2 
drivers/scsi/qla2xxx/qla_gs.c:qla2x00_async_gnnid_sp_done
   Cyclomatic Complexity 2 
drivers/scsi/qla2xxx/qla_gs.c:qla2x00_async_gfpnid_sp_done
   Cyclomatic Complexity 6 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_is_a_vp
   Cyclomatic Complexity 29 
drivers/scsi/qla2xxx/qla_gs.c:qla2x00_async_gpnft_gnnft_sp_done
   Cyclomatic Complexity 2 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_prep_ms_iocb
   Cyclomatic Complexity 1 drivers/scsi/qla2xxx/qla_gs.c:qla24xx_prep_ms_iocb
   Cyclomatic Complexity 11 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_chk_ms_status
   Cyclomatic Complexity 3 drivers/scsi/qla2xxx/qla_gs.c:qla2x00_fdmi_dhba
   Cyclomatic Complexity 8 drivers/scsi/qla2xxx/qla_gs.c:qla2x0

[scsi:misc 327/330] drivers//scsi/storvsc_drv.c:1313:4: error: implicit declaration of function 'for_each_cpu_wrap'

2018-02-07 Thread kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git misc
head:   16a628faa63c8149d9a8f433e5c6548f6cff98e4
commit: 2439bec3bf084ab6cbc69a66797a4612042be6ca [327/330] scsi: storvsc: 
Spread interrupts when picking a channel for I/O requests
config: x86_64-randconfig-s1-02071932 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
git checkout 2439bec3bf084ab6cbc69a66797a4612042be6ca
# save the attached .config to linux build tree
make ARCH=x86_64 

All errors (new ones prefixed by >>):

   drivers//scsi/storvsc_drv.c: In function 'storvsc_do_io':
>> drivers//scsi/storvsc_drv.c:1313:4: error: implicit declaration of function 
>> 'for_each_cpu_wrap' [-Werror=implicit-function-declaration]
   for_each_cpu_wrap(tgt_cpu, &alloced_mask,
   ^
   drivers//scsi/storvsc_drv.c:1314:40: error: expected ';' before '{' token
 outgoing_channel->target_cpu + 1) {
   ^
   cc1: some warnings being treated as errors

vim +/for_each_cpu_wrap +1313 drivers//scsi/storvsc_drv.c

  1280  
  1281  
  1282  static int storvsc_do_io(struct hv_device *device,
  1283   struct storvsc_cmd_request *request, u16 q_num)
  1284  {
  1285  struct storvsc_device *stor_device;
  1286  struct vstor_packet *vstor_packet;
  1287  struct vmbus_channel *outgoing_channel;
  1288  int ret = 0;
  1289  struct cpumask alloced_mask;
  1290  int tgt_cpu;
  1291  
  1292  vstor_packet = &request->vstor_packet;
  1293  stor_device = get_out_stor_device(device);
  1294  
  1295  if (!stor_device)
  1296  return -ENODEV;
  1297  
  1298  
  1299  request->device  = device;
  1300  /*
  1301   * Select an an appropriate channel to send the request out.
  1302   */
  1303  
  1304  if (stor_device->stor_chns[q_num] != NULL) {
  1305  outgoing_channel = stor_device->stor_chns[q_num];
  1306  if (outgoing_channel->target_cpu == smp_processor_id()) 
{
  1307  /*
  1308   * Ideally, we want to pick a different channel 
if
  1309   * available on the same NUMA node.
  1310   */
  1311  cpumask_and(&alloced_mask, 
&stor_device->alloced_cpus,
  1312  
cpumask_of_node(cpu_to_node(q_num)));
> 1313  for_each_cpu_wrap(tgt_cpu, &alloced_mask,
  1314  outgoing_channel->target_cpu + 
1) {
  1315  if (tgt_cpu != 
outgoing_channel->target_cpu) {
  1316  outgoing_channel =
  1317  stor_device->stor_chns[tgt_cpu];
  1318  break;
  1319  }
  1320  }
  1321  }
  1322  } else {
  1323  outgoing_channel = get_og_chn(stor_device, q_num);
  1324  }
  1325  
  1326  
  1327  vstor_packet->flags |= REQUEST_COMPLETION_FLAG;
  1328  
  1329  vstor_packet->vm_srb.length = (sizeof(struct vmscsi_request) -
  1330  vmscsi_size_delta);
  1331  
  1332  
  1333  vstor_packet->vm_srb.sense_info_length = sense_buffer_size;
  1334  
  1335  
  1336  vstor_packet->vm_srb.data_transfer_length =
  1337  request->payload->range.len;
  1338  
  1339  vstor_packet->operation = VSTOR_OPERATION_EXECUTE_SRB;
  1340  
  1341  if (request->payload->range.len) {
  1342  
  1343  ret = vmbus_sendpacket_mpb_desc(outgoing_channel,
  1344  request->payload, request->payload_sz,
  1345  vstor_packet,
  1346  (sizeof(struct vstor_packet) -
  1347  vmscsi_size_delta),
  1348  (unsigned long)request);
  1349  } else {
  1350  ret = vmbus_sendpacket(outgoing_channel, vstor_packet,
  1351 (sizeof(struct vstor_packet) -
  1352  vmscsi_size_delta),
  1353 (unsigned long)request,
  1354 VM_PKT_DATA_INBAND,
  1355 
VMBUS_DATA_PACKET_FLAG_COMPLETION_REQUESTED);
  1356  }
  1357  
  1358  if (ret != 0)
  1359  return ret;
  1360  
  1361  atomic_inc(&stor_device->num_outstanding_req);
  1362  
  1363  return ret;
  1364  }
  1365  

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/

  1   2   3   4   >