All of lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Hannes Reinecke <hare@suse.de>
Cc: kbuild-all@lists.01.org,
	"Martin K. Petersen" <martin.petersen@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	James Bottomley <james.bottomley@hansenpartnership.com>,
	Johannes Thumshirn <jthumshirn@suse.de>,
	linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH 03/24] wd33c93: use SCSI status
Date: Tue, 22 Oct 2019 02:41:30 +0800	[thread overview]
Message-ID: <201910220249.VgYvBxuJ%lkp@intel.com> (raw)
In-Reply-To: <20191021095322.137969-4-hare@suse.de>

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

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 <lkp@intel.com>

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("UNEXP_DISC"))
  1260			    hostdata->connected = NULL;
  1261			hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff));
  1262			hostdata->state = S_UNCONNECTED;
  1263			if (cmd->cmnd[0] == REQUEST_SENSE && cmd->SCp.Status != SAM_STAT_GOOD)
  1264				set_host_byte(cmd, DID_ERROR);
  1265			else
  1266				cmd->result = cmd->SCp.Status | (cmd->SCp.Message << 8);
  1267			cmd->scsi_done(cmd);
  1268	
  1269	/* We are no longer connected to a target - check to see if
  1270	 * there are commands waiting to be executed.
  1271	 */
  1272			/* look above for comments on scsi_done() */
  1273			spin_unlock_irqrestore(&hostdata->lock, flags);
  1274			wd33c93_execute(instance);
  1275			break;
  1276	
  1277		case CSR_DISC:
  1278	
  1279	/* Make sure that reselection is enabled at this point - it may
  1280	 * have been turned off for the command that just completed.
  1281	 */
  1282	
  1283			write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
  1284			DB(DB_INTR, printk("DISC"))
  1285			    if (cmd == NULL) {
  1286				printk(" - Already disconnected! ");
  1287				hostdata->state = S_UNCONNECTED;
  1288			}
  1289			switch (hostdata->state) {
  1290			case S_PRE_CMP_DISC:
  1291				hostdata->connected = NULL;
  1292				hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff));
  1293				hostdata->state = S_UNCONNECTED;
  1294				DB(DB_INTR, printk(":%d", cmd->SCp.Status));
  1295				if (cmd->cmnd[0] == REQUEST_SENSE
  1296				    && cmd->SCp.Status != SAM_STAT_GOOD)
> 1297					set_host_byte(cmd->result, DID_ERROR);
  1298				else
  1299					cmd->result =
  1300					    cmd->SCp.Status | (cmd->SCp.Message << 8);
  1301				cmd->scsi_done(cmd);
  1302				break;
  1303			case S_PRE_TMP_DISC:
  1304			case S_RUNNING_LEVEL2:
  1305				cmd->host_scribble = (uchar *) hostdata->disconnected_Q;
  1306				hostdata->disconnected_Q = cmd;
  1307				hostdata->connected = NULL;
  1308				hostdata->state = S_UNCONNECTED;
  1309	

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

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

WARNING: multiple messages have this Message-ID (diff)
From: kbuild test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH 03/24] wd33c93: use SCSI status
Date: Tue, 22 Oct 2019 02:41:30 +0800	[thread overview]
Message-ID: <201910220249.VgYvBxuJ%lkp@intel.com> (raw)
In-Reply-To: <20191021095322.137969-4-hare@suse.de>

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

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 <lkp@intel.com>

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("UNEXP_DISC"))
  1260			    hostdata->connected = NULL;
  1261			hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff));
  1262			hostdata->state = S_UNCONNECTED;
  1263			if (cmd->cmnd[0] == REQUEST_SENSE && cmd->SCp.Status != SAM_STAT_GOOD)
  1264				set_host_byte(cmd, DID_ERROR);
  1265			else
  1266				cmd->result = cmd->SCp.Status | (cmd->SCp.Message << 8);
  1267			cmd->scsi_done(cmd);
  1268	
  1269	/* We are no longer connected to a target - check to see if
  1270	 * there are commands waiting to be executed.
  1271	 */
  1272			/* look above for comments on scsi_done() */
  1273			spin_unlock_irqrestore(&hostdata->lock, flags);
  1274			wd33c93_execute(instance);
  1275			break;
  1276	
  1277		case CSR_DISC:
  1278	
  1279	/* Make sure that reselection is enabled at this point - it may
  1280	 * have been turned off for the command that just completed.
  1281	 */
  1282	
  1283			write_wd33c93(regs, WD_SOURCE_ID, SRCID_ER);
  1284			DB(DB_INTR, printk("DISC"))
  1285			    if (cmd == NULL) {
  1286				printk(" - Already disconnected! ");
  1287				hostdata->state = S_UNCONNECTED;
  1288			}
  1289			switch (hostdata->state) {
  1290			case S_PRE_CMP_DISC:
  1291				hostdata->connected = NULL;
  1292				hostdata->busy[cmd->device->id] &= ~(1 << (cmd->device->lun & 0xff));
  1293				hostdata->state = S_UNCONNECTED;
  1294				DB(DB_INTR, printk(":%d", cmd->SCp.Status));
  1295				if (cmd->cmnd[0] == REQUEST_SENSE
  1296				    && cmd->SCp.Status != SAM_STAT_GOOD)
> 1297					set_host_byte(cmd->result, DID_ERROR);
  1298				else
  1299					cmd->result =
  1300					    cmd->SCp.Status | (cmd->SCp.Message << 8);
  1301				cmd->scsi_done(cmd);
  1302				break;
  1303			case S_PRE_TMP_DISC:
  1304			case S_RUNNING_LEVEL2:
  1305				cmd->host_scribble = (uchar *) hostdata->disconnected_Q;
  1306				hostdata->disconnected_Q = cmd;
  1307				hostdata->connected = NULL;
  1308				hostdata->state = S_UNCONNECTED;
  1309	

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

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

  reply	other threads:[~2019-10-21 18:41 UTC|newest]

Thread overview: 65+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-21  9:52 [PATCH RFC 00/24] scsi: Revamp result values Hannes Reinecke
2019-10-21  9:52 ` [PATCH 01/24] aic7xxx,aic79xxx: remove driver-defined SAM status definitions Hannes Reinecke
2019-10-21  9:53 ` [PATCH 02/24] bfa: drop driver-defined SCSI status codes Hannes Reinecke
2019-10-21  9:53 ` [PATCH 03/24] wd33c93: use SCSI status Hannes Reinecke
2019-10-21 18:41   ` kbuild test robot [this message]
2019-10-21 18:41     ` kbuild test robot
2019-10-21 23:16   ` Finn Thain
2019-10-22  5:59     ` Hannes Reinecke
2019-10-21  9:53 ` [PATCH 04/24] acornscsi: use standard defines Hannes Reinecke
2019-10-21  9:53 ` [PATCH 05/24] scsi: use standard SAM status codes Hannes Reinecke
2019-10-21 23:17   ` Finn Thain
2019-10-22  6:00     ` Hannes Reinecke
2019-10-21  9:53 ` [PATCH 06/24] scsi: change status_byte() to return the standard SCSI status Hannes Reinecke
2019-10-22 12:35   ` Steffen Maier
2019-10-21  9:53 ` [PATCH 07/24] target_core: Fixup target_complete_cmd() usage Hannes Reinecke
2019-10-21  9:53 ` [PATCH 08/24] sg: use SAM status definitions and avoid using masked_status Hannes Reinecke
2019-10-21  9:53 ` [PATCH 09/24] scsi: Kill obsolete linux-specific status codes Hannes Reinecke
2019-10-21 18:12   ` kbuild test robot
2019-10-21 18:12     ` kbuild test robot
2019-10-21 18:56   ` kbuild test robot
2019-10-21 18:56     ` kbuild test robot
2019-10-21  9:53 ` [PATCH 10/24] scsi: introduce set_status_byte() Hannes Reinecke
2019-10-21 22:12   ` Finn Thain
2019-10-22  5:56     ` Hannes Reinecke
2019-10-21  9:53 ` [PATCH 11/24] advansys: kill driver_defined status byte accessors Hannes Reinecke
2019-10-21 16:37   ` Bart Van Assche
2019-10-22  6:25     ` Hannes Reinecke
2019-10-21  9:53 ` [PATCH 12/24] scsi: introduce scsi_build_sense() Hannes Reinecke
2019-10-21 23:31   ` Finn Thain
2019-10-22  6:02     ` Hannes Reinecke
2019-10-22 12:21   ` Steffen Maier
2019-10-21  9:53 ` [PATCH 13/24] scsi: Kill DRIVER_SENSE Hannes Reinecke
2019-10-21 23:44   ` Finn Thain
2019-10-22  6:10     ` Hannes Reinecke
2021-06-04  6:40   ` Jiri Slaby
2021-06-07 12:21     ` Hannes Reinecke
2021-06-07 12:30       ` Martin K. Petersen
2021-06-07 13:02         ` Hannes Reinecke
2021-06-10 10:52           ` Jiri Slaby
2021-06-10 14:01             ` Hannes Reinecke
2021-06-11  4:50               ` Jiri Slaby
2021-06-11  7:38                 ` Hannes Reinecke
2021-06-14  6:29                   ` Jiri Slaby
2021-06-14  7:20                   ` Jiri Slaby
2019-10-21  9:53 ` [PATCH 14/24] scsi: Kill DRIVER_HARD Hannes Reinecke
2019-10-21  9:53 ` [PATCH 15/24] scsi_error: use DID_TIME_OUT instead of DRIVER_TIMEOUT Hannes Reinecke
2019-10-21  9:53 ` [PATCH 16/24] scsi: Kill DRIVER_TIMEOUT Hannes Reinecke
2019-10-21  9:53 ` [PATCH 17/24] scsi: do not use DRIVER_INVALID Hannes Reinecke
2019-10-21  9:53 ` [PATCH 18/24] st: return error code in st_scsi_execute() Hannes Reinecke
2019-10-21 16:41   ` Bart Van Assche
2019-10-22  6:28     ` Hannes Reinecke
2019-10-22 14:54       ` Bart Van Assche
2019-10-21  9:53 ` [PATCH 19/24] scsi_ioctl: return error code when blk_map_user() fails Hannes Reinecke
2019-10-21 16:44   ` Bart Van Assche
2019-10-22  6:32     ` Hannes Reinecke
2019-10-21  9:53 ` [PATCH 20/24] scsi_dh_alua: do not interpret DRIVER_ERROR Hannes Reinecke
2019-10-21  9:53 ` [PATCH 21/24] xen-scsiback: stop using DRIVER_ERROR Hannes Reinecke
2019-10-21  9:53 ` [PATCH 22/24] scsi: " Hannes Reinecke
2019-10-21  9:53 ` [PATCH 23/24] scsi: Kill DRIVER_MEDIA, DRIVER_SOFT, and DRIVER_BUSY Hannes Reinecke
2019-10-21  9:53 ` [PATCH 24/24] scsi: Drop now obsolete driver_byte definitions Hannes Reinecke
2019-10-21 18:32 ` [PATCH RFC 00/24] scsi: Revamp result values Douglas Gilbert
2019-10-21 23:20   ` Finn Thain
2019-10-22  6:24   ` Hannes Reinecke
2019-10-31 11:04 [PATCHv2 00/24] Revamp SCSI " Hannes Reinecke
2019-10-31 11:04 ` [PATCH 03/24] wd33c93: use SCSI status Hannes Reinecke
2019-11-01 16:16   ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201910220249.VgYvBxuJ%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=james.bottomley@hansenpartnership.com \
    --cc=jthumshirn@suse.de \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.