Re: [PATCHv2 4/4] block: Change at_head argument of blk_execute_rq to bool

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Marcos,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc3 next-20190809]
[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/Marcos-Paulo-de-Souza/block-Remove-request_queue-argument-from-blk_execute_rq_nowait/20190811-113304
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-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=sparc64 

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

All errors (new ones prefixed by >>):

   block/scsi_ioctl.c: In function 'sg_io':
>> block/scsi_ioctl.c:309:2: error: expected ';' before 'ret'
     ret = -ENOMEM;
     ^~~

vim +309 block/scsi_ioctl.c

3d6392cfbd7dc1 block/scsi_ioctl.c         Jens Axboe            2007-07-09  277  
5842e51ff2e8d6 block/scsi_ioctl.c         Al Viro               2008-09-02  278  static int sg_io(struct request_queue *q, struct gendisk *bd_disk,
5842e51ff2e8d6 block/scsi_ioctl.c         Al Viro               2008-09-02  279  		struct sg_io_hdr *hdr, fmode_t mode)
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  280  {
3d6392cfbd7dc1 block/scsi_ioctl.c         Jens Axboe            2007-07-09  281  	unsigned long start_time;
e0ce0eacb3197a block/scsi_ioctl.c         Kent Overstreet       2013-08-07  282  	ssize_t ret = 0;
e0ce0eacb3197a block/scsi_ioctl.c         Kent Overstreet       2013-08-07  283  	int writing = 0;
e9e1e68597dd4a block/scsi_ioctl.c         Marcos Paulo de Souza 2019-08-09  284  	bool at_head = false;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  285  	struct request *rq;
82ed4db499b859 block/scsi_ioctl.c         Christoph Hellwig     2017-01-27  286  	struct scsi_request *req;
77d172ce2719b5 block/scsi_ioctl.c         FUJITA Tomonori       2006-12-11  287  	struct bio *bio;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  288  
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  289  	if (hdr->interface_id != 'S')
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  290  		return -EINVAL;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  291  
ae03bf639a5027 block/scsi_ioctl.c         Martin K. Petersen    2009-05-22  292  	if (hdr->dxfer_len > (queue_max_hw_sectors(q) << 9))
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  293  		return -EIO;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  294  
f1970baf6d74e0 drivers/block/scsi_ioctl.c James Bottomley       2005-06-20  295  	if (hdr->dxfer_len)
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  296  		switch (hdr->dxfer_direction) {
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  297  		default:
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  298  			return -EINVAL;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  299  		case SG_DXFER_TO_DEV:
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  300  			writing = 1;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  301  			break;
616e8a091a035c block/scsi_ioctl.c         Jens Axboe            2006-11-13  302  		case SG_DXFER_TO_FROM_DEV:
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  303  		case SG_DXFER_FROM_DEV:
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  304  			break;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  305  		}
d15156138dad40 block/scsi_ioctl.c         Douglas Gilbert       2014-07-01  306  	if (hdr->flags & SG_FLAG_Q_AT_HEAD)
e9e1e68597dd4a block/scsi_ioctl.c         Marcos Paulo de Souza 2019-08-09  307  		at_head = true
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  308  
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21 @309  	ret = -ENOMEM;
ff005a066240ef block/scsi_ioctl.c         Christoph Hellwig     2018-05-09  310  	rq = blk_get_request(q, writing ? REQ_OP_SCSI_OUT : REQ_OP_SCSI_IN, 0);
a492f075450f3b block/scsi_ioctl.c         Joe Lawrence          2014-08-28  311  	if (IS_ERR(rq))
a492f075450f3b block/scsi_ioctl.c         Joe Lawrence          2014-08-28  312  		return PTR_ERR(rq);
82ed4db499b859 block/scsi_ioctl.c         Christoph Hellwig     2017-01-27  313  	req = scsi_req(rq);
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  314  
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  315  	if (hdr->cmd_len > BLK_MAX_CDB) {
82ed4db499b859 block/scsi_ioctl.c         Christoph Hellwig     2017-01-27  316  		req->cmd = kzalloc(hdr->cmd_len, GFP_KERNEL);
82ed4db499b859 block/scsi_ioctl.c         Christoph Hellwig     2017-01-27  317  		if (!req->cmd)
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  318  			goto out_put_request;
3d6392cfbd7dc1 block/scsi_ioctl.c         Jens Axboe            2007-07-09  319  	}
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  320  
2c4cffe85170a0 block/scsi_ioctl.c         Paolo Bonzini         2015-06-26  321  	ret = blk_fill_sghdr_rq(q, rq, hdr, mode);
2c4cffe85170a0 block/scsi_ioctl.c         Paolo Bonzini         2015-06-26  322  	if (ret < 0)
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  323  		goto out_free_cdb;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  324  
d19d744685f47f block/scsi_ioctl.c         Sabrina Dubroca       2014-08-26  325  	ret = 0;
0e75f9063f5c55 block/scsi_ioctl.c         Mike Christie         2006-12-01  326  	if (hdr->iovec_count) {
26e49cfc7e988a block/scsi_ioctl.c         Kent Overstreet       2015-01-18  327  		struct iov_iter i;
17a05cca99d952 block/scsi_ioctl.c         Christian Engelmayer  2014-01-19  328  		struct iovec *iov = NULL;
0e75f9063f5c55 block/scsi_ioctl.c         Mike Christie         2006-12-01  329  
e272b89ff8fb63 block/scsi_ioctl.c         Al Viro               2015-03-21  330  		ret = import_iovec(rq_data_dir(rq),
e272b89ff8fb63 block/scsi_ioctl.c         Al Viro               2015-03-21  331  				   hdr->dxferp, hdr->iovec_count,
e272b89ff8fb63 block/scsi_ioctl.c         Al Viro               2015-03-21  332  				   0, &iov, &i);
e272b89ff8fb63 block/scsi_ioctl.c         Al Viro               2015-03-21  333  		if (ret < 0)
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  334  			goto out_free_cdb;
0e75f9063f5c55 block/scsi_ioctl.c         Mike Christie         2006-12-01  335  
25636e282fe955 block/scsi_ioctl.c         Tejun Heo             2009-04-15  336  		/* SG_IO howto says that the shorter of the two wins */
e272b89ff8fb63 block/scsi_ioctl.c         Al Viro               2015-03-21  337  		iov_iter_truncate(&i, hdr->dxfer_len);
25636e282fe955 block/scsi_ioctl.c         Tejun Heo             2009-04-15  338  
26e49cfc7e988a block/scsi_ioctl.c         Kent Overstreet       2015-01-18  339  		ret = blk_rq_map_user_iov(q, rq, NULL, &i, GFP_KERNEL);
e0ce0eacb3197a block/scsi_ioctl.c         Kent Overstreet       2013-08-07  340  		kfree(iov);
0e75f9063f5c55 block/scsi_ioctl.c         Mike Christie         2006-12-01  341  	} else if (hdr->dxfer_len)
152e283fdfea0c block/scsi_ioctl.c         FUJITA Tomonori       2008-08-28  342  		ret = blk_rq_map_user(q, rq, NULL, hdr->dxferp, hdr->dxfer_len,
a3bce90edd8f6c block/scsi_ioctl.c         FUJITA Tomonori       2008-08-28  343  				      GFP_KERNEL);
0e75f9063f5c55 block/scsi_ioctl.c         Mike Christie         2006-12-01  344  
0e75f9063f5c55 block/scsi_ioctl.c         Mike Christie         2006-12-01  345  	if (ret)
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  346  		goto out_free_cdb;
0e75f9063f5c55 block/scsi_ioctl.c         Mike Christie         2006-12-01  347  
77d172ce2719b5 block/scsi_ioctl.c         FUJITA Tomonori       2006-12-11  348  	bio = rq->bio;
64c7f1d1572cac block/scsi_ioctl.c         Christoph Hellwig     2017-04-05  349  	req->retries = 0;
01840f9c9d7ae3 block/scsi_ioctl.c         Jens Axboe            2006-02-03  350  
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  351  	start_time = jiffies;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  352  
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  353  	/* ignore return value. All information is passed back to caller
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  354  	 * (if he doesn't check that is his problem).
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  355  	 * N.B. a non-zero SCSI status is _not_ necessarily an error.
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  356  	 */
6bd6171931c593 block/scsi_ioctl.c         Marcos Paulo de Souza 2019-08-09  357  	blk_execute_rq(bd_disk, rq, at_head);
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  358  
24bb8fb99a0622 block/scsi_ioctl.c         Tejun Heo             2007-12-05  359  	hdr->duration = jiffies_to_msecs(jiffies - start_time);
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  360  
2cada584b20007 block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  361  	ret = blk_complete_sghdr_rq(rq, hdr, bio);
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  362  
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  363  out_free_cdb:
82ed4db499b859 block/scsi_ioctl.c         Christoph Hellwig     2017-01-27  364  	scsi_req_free_cmd(req);
a57821cac6bb6e block/scsi_ioctl.c         Christoph Hellwig     2014-08-21  365  out_put_request:
dd1cab95f356f1 drivers/block/scsi_ioctl.c Jens Axboe            2005-06-20  366  	blk_put_request(rq);
dd1cab95f356f1 drivers/block/scsi_ioctl.c Jens Axboe            2005-06-20  367  	return ret;
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  368  }
^1da177e4c3f41 drivers/block/scsi_ioctl.c Linus Torvalds        2005-04-16  369  

:::::: The code at line 309 was first introduced by commit
:::::: a57821cac6bb6e46abea118e34d0e86444ec1410 block: support > 16 byte CDBs for SG_IO

:::::: TO: Christoph Hellwig <hch@xxxxxx>
:::::: CC: Jens Axboe <axboe@xxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux