From: kernel test robot <lkp@intel.com>
To: kbuild@lists.01.org
Subject: [jirislaby:devel 27/51] drivers/scsi/sd.c:1080:9: sparse: sparse: too long token expansion
Date: Wed, 07 Oct 2020 19:52:48 +0800 [thread overview]
Message-ID: <202010071941.IDorm0ae-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6553 bytes --]
CC: kbuild-all(a)lists.01.org
TO: Jiri Slaby <jslaby@suse.cz>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 66ba0b05375237a74b534a40160a4e9bef83cf2f
commit: b4dd8500fa2cea1227e551f377de162994b3a973 [27/51] include condition in the BUG_ON/WARN_ON output
:::::: branch date: 4 hours ago
:::::: commit date: 4 hours ago
config: x86_64-randconfig-s022-20201007 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-201-g24bdaac6-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commit/?id=b4dd8500fa2cea1227e551f377de162994b3a973
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout b4dd8500fa2cea1227e551f377de162994b3a973
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
echo
echo "sparse warnings: (new ones prefixed by >>)"
echo
>> drivers/scsi/sd.c:1080:9: sparse: sparse: too long token expansion
vim +1080 drivers/scsi/sd.c
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1059
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1060 /**
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1061 * sd_setup_write_same_cmnd - write the same data to multiple blocks
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1062 * @cmd: command to prepare
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1063 *
7529fbb0080d67b Damien Le Moal 2017-04-24 1064 * Will set up either WRITE SAME(10) or WRITE SAME(16) depending on
7529fbb0080d67b Damien Le Moal 2017-04-24 1065 * the preference indicated by the target device.
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1066 **/
159b2cbf59f44f2 Christoph Hellwig 2018-11-09 1067 static blk_status_t sd_setup_write_same_cmnd(struct scsi_cmnd *cmd)
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1068 {
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1069 struct request *rq = cmd->request;
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1070 struct scsi_device *sdp = cmd->device;
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1071 struct scsi_disk *sdkp = scsi_disk(rq->rq_disk);
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1072 struct bio *bio = rq->bio;
c6c93fdd3451cc0 Martin K. Petersen 2019-01-15 1073 u64 lba = sectors_to_logical(sdp, blk_rq_pos(rq));
c6c93fdd3451cc0 Martin K. Petersen 2019-01-15 1074 u32 nr_blocks = sectors_to_logical(sdp, blk_rq_sectors(rq));
159b2cbf59f44f2 Christoph Hellwig 2018-11-09 1075 blk_status_t ret;
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1076
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1077 if (sdkp->device->no_write_same)
159b2cbf59f44f2 Christoph Hellwig 2018-11-09 1078 return BLK_STS_TARGET;
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1079
a4ad39b1d10584d Kent Overstreet 2013-08-07 @1080 BUG_ON(bio_offset(bio) || bio_iovec(bio).bv_len != sdp->sector_size);
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1081
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1082 rq->timeout = SD_WRITE_SAME_TIMEOUT;
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1083
c6c93fdd3451cc0 Martin K. Petersen 2019-01-15 1084 if (sdkp->ws16 || lba > 0xffffffff || nr_blocks > 0xffff) {
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1085 cmd->cmd_len = 16;
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1086 cmd->cmnd[0] = WRITE_SAME_16;
c6c93fdd3451cc0 Martin K. Petersen 2019-01-15 1087 put_unaligned_be64(lba, &cmd->cmnd[2]);
c6c93fdd3451cc0 Martin K. Petersen 2019-01-15 1088 put_unaligned_be32(nr_blocks, &cmd->cmnd[10]);
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1089 } else {
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1090 cmd->cmd_len = 10;
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1091 cmd->cmnd[0] = WRITE_SAME;
c6c93fdd3451cc0 Martin K. Petersen 2019-01-15 1092 put_unaligned_be32(lba, &cmd->cmnd[2]);
c6c93fdd3451cc0 Martin K. Petersen 2019-01-15 1093 put_unaligned_be16(nr_blocks, &cmd->cmnd[7]);
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1094 }
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1095
59b1134c5a2aab2 Christoph Hellwig 2014-06-28 1096 cmd->transfersize = sdp->sector_size;
0610959fbbca62b Mike Christie 2020-10-01 1097 cmd->allowed = sdkp->max_retries;
08965c2eba135bd Bart Van Assche 2017-01-25 1098
08965c2eba135bd Bart Van Assche 2017-01-25 1099 /*
08965c2eba135bd Bart Van Assche 2017-01-25 1100 * For WRITE SAME the data transferred via the DATA OUT buffer is
08965c2eba135bd Bart Van Assche 2017-01-25 1101 * different from the amount of data actually written to the target.
08965c2eba135bd Bart Van Assche 2017-01-25 1102 *
08965c2eba135bd Bart Van Assche 2017-01-25 1103 * We set up __data_len to the amount of data transferred via the
08965c2eba135bd Bart Van Assche 2017-01-25 1104 * DATA OUT buffer so that blk_rq_map_sg sets up the proper S/G list
08965c2eba135bd Bart Van Assche 2017-01-25 1105 * to transfer a single sector of data first, but then reset it to
08965c2eba135bd Bart Van Assche 2017-01-25 1106 * the amount of data to be written right after so that the I/O path
08965c2eba135bd Bart Van Assche 2017-01-25 1107 * knows how much to actually write.
08965c2eba135bd Bart Van Assche 2017-01-25 1108 */
08965c2eba135bd Bart Van Assche 2017-01-25 1109 rq->__data_len = sdp->sector_size;
08965c2eba135bd Bart Van Assche 2017-01-25 1110 ret = scsi_init_io(cmd);
84f7a9de0602704 Bart Van Assche 2019-01-15 1111 rq->__data_len = blk_rq_bytes(rq);
29f6ca6916e29fc Damien Le Moal 2017-05-08 1112
08965c2eba135bd Bart Van Assche 2017-01-25 1113 return ret;
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1114 }
5db44863b6ebbb4 Martin K. Petersen 2012-09-18 1115
:::::: The code at line 1080 was first introduced by commit
:::::: a4ad39b1d10584dfcfcfb0d510faab2c7f034399 block: Convert bio_iovec() to bvec_iter
:::::: TO: Kent Overstreet <kmo@daterainc.com>
:::::: CC: Kent Overstreet <kmo@daterainc.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37721 bytes --]
reply other threads:[~2020-10-07 11:52 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202010071941.IDorm0ae-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild@lists.01.org \
/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.