public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Heinz Mauelshagen <heinzm@redhat.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Mike Snitzer <snitzer@kernel.org>
Subject: [snitzer:dm-buffered 7/17] drivers/md/dm-buffered-target.c:453:2: warning: label at end of compound statement is a C2x extension
Date: Mon, 15 Apr 2024 04:55:17 +0800	[thread overview]
Message-ID: <202404150402.CMiozTNP-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/snitzer/linux.git dm-buffered
head:   28cac58f710bee429b166b4afb5a6450f88ba036
commit: 92101d4f7a11082735b25b2f473fb6804f519460 [7/17] dm buffered: test target buffering all I/O through dm-bufio
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240415/202404150402.CMiozTNP-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240415/202404150402.CMiozTNP-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/202404150402.CMiozTNP-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/md/dm-buffered-target.c:453:2: warning: label at end of compound statement is a C2x extension [-Wc2x-extensions]
     453 |         }
         |         ^
   1 warning generated.


vim +453 drivers/md/dm-buffered-target.c

   408	
   409	/* Process I/O on a bio prefetching buffers on a single @bio in a worker. */
   410	static void _process_bio(struct work_struct *work)
   411	{
   412		struct buffered_c *bc = container_of(work, struct buffered_c, buffered_ws);
   413		struct bio *bio;
   414		bool queue, write;
   415		sector_t blocks, sectors, start, end;
   416	
   417		spin_lock(&bc->lock);
   418		bio = bio_list_pop(&bc->bios);
   419		spin_unlock(&bc->lock);
   420	
   421		if (!bio)
   422			return;
   423	
   424		write = false;
   425		start = _to_block(bc, bio->bi_iter.bi_sector);
   426	
   427		/* Prefetch read and partial write buffers */
   428		switch (bio_op(bio)) {
   429		case REQ_OP_READ:
   430			sectors = bio_end_sector(bio) - _to_sector(bc, start);
   431			blocks = _to_block(bc, sectors) + _sector_mod(bc, sectors) ? 1 : 0;
   432			dm_bufio_prefetch(bc->bufio, start, blocks);
   433			break;
   434		case REQ_OP_WRITE:
   435			write = true;
   436			/* Beware of partial block updates. */
   437			if (_sector_mod(bc, bio->bi_iter.bi_sector)) {
   438				dm_bufio_prefetch(bc->bufio, start, 1);
   439				atomic_inc(&bc->stats[S_PREFETCHED_WRITES]);
   440			}
   441			if (_sector_mod(bc, bio_end_sector(bio))) {
   442				end = _to_block(bc, bio_end_sector(bio));
   443				if (start != end) {
   444					dm_bufio_prefetch(bc->bufio, start, 1);
   445					atomic_inc(&bc->stats[S_PREFETCHED_WRITES]);
   446				}
   447			}
   448			break;
   449		case REQ_OP_WRITE_ZEROES:
   450			write = true;
   451			break;
   452		default:
 > 453		}
   454	
   455		__process_bio(bc, bio);
   456	
   457		/* Use spinlock here also as in map function to avoid any memory access reordering issues. */
   458		spin_lock(&bc->lock);
   459		queue = !bio_list_empty(&bc->bios);
   460		spin_unlock(&bc->lock);
   461	
   462		if (queue)
   463			queue_work(bc->buffered_wq, &bc->buffered_ws);
   464	
   465		/* Reschedule the flush thread in case of new write(s). */
   466		if (write)
   467			schedule_delayed_work(&bc->buffered_flush_ws, 2 * HZ);
   468	
   469		cond_resched();
   470	}
   471	

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

                 reply	other threads:[~2024-04-14 20:56 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=202404150402.CMiozTNP-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=heinzm@redhat.com \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=snitzer@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox