From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [hch-misc:block-new-helpers 3/18] block/bio.c:1317: warning: Function parameter or struct member 'len' not described in 'bdev_rw_virt'
Date: Tue, 22 Apr 2025 03:10:34 +0800 [thread overview]
Message-ID: <202504220307.K00i54m7-lkp@intel.com> (raw)
tree: git://git.infradead.org/users/hch/misc.git block-new-helpers
head: 280d8b7173282de4cf4857624def142ed24fad63
commit: dc18223aaea3f28ee4b98928d16baf4a6ffd4212 [3/18] block: add a bdev_rw_virt helper
config: loongarch-randconfig-002-20250422 (https://download.01.org/0day-ci/archive/20250422/202504220307.K00i54m7-lkp@intel.com/config)
compiler: loongarch64-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250422/202504220307.K00i54m7-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202504220307.K00i54m7-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> block/bio.c:1317: warning: Function parameter or struct member 'len' not described in 'bdev_rw_virt'
>> block/bio.c:1317: warning: Excess function parameter 'lem' description in 'bdev_rw_virt'
vim +1317 block/bio.c
1303
1304 /**
1305 * bdev_rw_virt - synchronously read into / write from kernel mapping
1306 * @bdev: block device to access
1307 * @sector: sector to accasse
1308 * @data: data to read/write
1309 * @lem: length to read/write
1310 * @op: operation (e.g. REQ_OP_READ/REQ_OP_WRITE)
1311 *
1312 * Performs synchronous I/O to @bdev for @data/@len. @data must be in
1313 * the kernel direct mapping and not a vmalloc address.
1314 */
1315 int bdev_rw_virt(struct block_device *bdev, sector_t sector, void *data,
1316 size_t len, enum req_op op)
> 1317 {
1318 struct bio_vec bv;
1319 struct bio bio;
1320 int error;
1321
1322 if (WARN_ON_ONCE(is_vmalloc_addr(data)))
1323 return -EIO;
1324
1325 bio_init(&bio, bdev, &bv, 1, op);
1326 bio.bi_iter.bi_sector = sector;
1327 bio_add_virt_nofail(&bio, data, len);
1328 error = submit_bio_wait(&bio);
1329 bio_uninit(&bio);
1330 return error;
1331 }
1332 EXPORT_SYMBOL_GPL(bdev_rw_virt);
1333
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2025-04-21 19:10 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=202504220307.K00i54m7-lkp@intel.com \
--to=lkp@intel.com \
--cc=hch@lst.de \
--cc=oe-kbuild-all@lists.linux.dev \
/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.