All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Luis Chamberlain <mcgrof@do-not-panic.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [mcgrof:blk-iobuf-pool-v2 8/13] block/blk-map.c:742:1: warning: label 'next' defined but not used
Date: Wed, 01 Jul 2026 03:57:04 +0200	[thread overview]
Message-ID: <202607010339.EvJiU319-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mcgrof/linux.git blk-iobuf-pool-v2
head:   da75cc2253180af718ba0b7b3684a091b16b14fb
commit: b88f2bfe111b8778c8bba9e0309c653966171bdd [8/13] block: bounce passthrough bios through iobuf pool folios
config: i386-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260701/202607010339.EvJiU319-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260701/202607010339.EvJiU319-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/202607010339.EvJiU319-lkp@intel.com/

All warnings (new ones prefixed by >>):

   block/blk-map.c: In function 'blk_rq_map_user_iov':
>> block/blk-map.c:742:1: warning: label 'next' defined but not used [-Wunused-label]
     742 | next:
         | ^~~~
   block/blk-map.c: In function 'blk_rq_unmap_user':
   block/blk-map.c:823:46: warning: unused variable 'bmd' [-Wunused-variable]
     823 |                         struct bio_map_data *bmd = bio->bi_private;
         |                                              ^~~


vim +/next +742 block/blk-map.c

   670	
   671	/**
   672	 * blk_rq_map_user_iov - map user data to a request, for passthrough requests
   673	 * @q:		request queue where request should be inserted
   674	 * @rq:		request to map data to
   675	 * @map_data:   pointer to the rq_map_data holding pages (if necessary)
   676	 * @iter:	iovec iterator
   677	 * @gfp_mask:	memory allocation flags
   678	 *
   679	 * Description:
   680	 *    Data will be mapped directly for zero copy I/O, if possible. Otherwise
   681	 *    a kernel bounce buffer is used.
   682	 *
   683	 *    A matching blk_rq_unmap_user() must be issued at the end of I/O, while
   684	 *    still in process context.
   685	 */
   686	int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
   687				struct rq_map_data *map_data,
   688				const struct iov_iter *iter, gfp_t gfp_mask)
   689	{
   690		bool copy = false, map_bvec = false;
   691		unsigned long align = blk_lim_dma_alignment_and_pad(&q->limits);
   692		struct bio *bio = NULL;
   693		struct iov_iter i;
   694		int ret = -EINVAL;
   695	
   696		if (map_data)
   697			copy = true;
   698		else if (iov_iter_alignment(iter) & align)
   699			copy = true;
   700		else if (iov_iter_is_bvec(iter))
   701			map_bvec = true;
   702		else if (!user_backed_iter(iter))
   703			copy = true;
   704		else if (queue_virt_boundary(q))
   705			copy = queue_virt_boundary(q) & iov_iter_gap_alignment(iter);
   706	
   707		if (map_bvec) {
   708			ret = blk_rq_map_user_bvec(rq, iter);
   709			if (!ret)
   710				return 0;
   711			if (ret != -EREMOTEIO)
   712				goto fail;
   713			/* fall back to copying the data on limits mismatches */
   714			copy = true;
   715		}
   716	
   717		i = *iter;
   718		do {
   719			/*
   720			 * Try iobuf pool bounce first when copy is needed and the pool
   721			 * can provide aligned folios for this request.
   722			 */
   723	#ifdef CONFIG_BLK_IOBUF_POOL
   724			if (copy && !map_data && blk_rq_iobuf_eligible(q, &i, gfp_mask)) {
   725				ret = bio_copy_user_iov_iobuf(rq, &i, gfp_mask);
   726				if (!ret)
   727					goto next;
   728				if (ret != -EREMOTEIO)
   729					goto unmap_rq;
   730				/* not eligible after all; fall through to standard copy */
   731			}
   732	#endif
   733			if (copy)
   734				ret = bio_copy_user_iov(rq, map_data, &i, gfp_mask);
   735			else
   736				ret = bio_map_user_iov(rq, &i, gfp_mask);
   737			if (ret) {
   738				if (ret == -EREMOTEIO)
   739					ret = -EINVAL;
   740				goto unmap_rq;
   741			}
 > 742	next:
   743			if (!bio)
   744				bio = rq->bio;
   745		} while (iov_iter_count(&i));
   746	
   747		return 0;
   748	
   749	unmap_rq:
   750		blk_rq_unmap_user(bio);
   751	fail:
   752		rq->bio = NULL;
   753		return ret;
   754	}
   755	EXPORT_SYMBOL(blk_rq_map_user_iov);
   756	

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2026-07-01  1:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-01  1:57 kernel test robot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-07-01  1:05 [mcgrof:blk-iobuf-pool-v2 8/13] block/blk-map.c:742:1: warning: label 'next' defined but not used kernel test robot

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=202607010339.EvJiU319-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=mcgrof@do-not-panic.com \
    --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.