linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christoph Hellwig <hch@lst.de>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	David Sterba <dsterba@suse.com>,
	Josef Bacik <josef@toxicpanda.com>
Subject: [linux-next:master 4824/8441] fs/btrfs/extent_io.c:230:16: warning: variable 'pages_processed' set but not used
Date: Fri, 11 Aug 2023 19:03:34 +0800	[thread overview]
Message-ID: <202308111822.ITiKYDqp-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   21ef7b1e17d039053edaeaf41142423810572741
commit: e74cd6ee58375cbdd85c01c93f75e34133ebea4d [4824/8441] btrfs: split page locking out of __process_pages_contig
config: powerpc-randconfig-r031-20230811 (https://download.01.org/0day-ci/archive/20230811/202308111822.ITiKYDqp-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce: (https://download.01.org/0day-ci/archive/20230811/202308111822.ITiKYDqp-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/202308111822.ITiKYDqp-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> fs/btrfs/extent_io.c:230:16: warning: variable 'pages_processed' set but not used [-Wunused-but-set-variable]
           unsigned long pages_processed = 0;
                         ^
   1 warning generated.


vim +/pages_processed +230 fs/btrfs/extent_io.c

ed8f13bf4a2ccb Qu Wenruo             2021-05-31  221  
e74cd6ee58375c Christoph Hellwig     2023-06-28  222  static void __process_pages_contig(struct address_space *mapping,
e74cd6ee58375c Christoph Hellwig     2023-06-28  223  				   struct page *locked_page, u64 start, u64 end,
e74cd6ee58375c Christoph Hellwig     2023-06-28  224  				   unsigned long page_ops)
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  225  {
e38992be1f6cf3 Qu Wenruo             2021-05-31  226  	struct btrfs_fs_info *fs_info = btrfs_sb(mapping->host->i_sb);
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  227  	pgoff_t start_index = start >> PAGE_SHIFT;
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  228  	pgoff_t end_index = end >> PAGE_SHIFT;
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  229  	pgoff_t index = start_index;
ed8f13bf4a2ccb Qu Wenruo             2021-05-31 @230  	unsigned long pages_processed = 0;
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  231) 	struct folio_batch fbatch;
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  232  	int i;
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  233  
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  234) 	folio_batch_init(&fbatch);
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  235) 	while (index <= end_index) {
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  236) 		int found_folios;
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  237) 
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  238) 		found_folios = filemap_get_folios_contig(mapping, &index,
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  239) 				end_index, &fbatch);
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  240) 		for (i = 0; i < found_folios; i++) {
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  241) 			struct folio *folio = fbatch.folios[i];
e74cd6ee58375c Christoph Hellwig     2023-06-28  242  
e74cd6ee58375c Christoph Hellwig     2023-06-28  243  			process_one_page(fs_info, &folio->page, locked_page,
e74cd6ee58375c Christoph Hellwig     2023-06-28  244  					 page_ops, start, end);
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  245) 			pages_processed += folio_nr_pages(folio);
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  246  		}
04c6b79ae4f0bc Vishal Moola (Oracle  2022-08-23  247) 		folio_batch_release(&fbatch);
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  248  		cond_resched();
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  249  	}
ed8f13bf4a2ccb Qu Wenruo             2021-05-31  250  }
da2c7009f6cafe Liu Bo                2017-02-10  251  

:::::: The code at line 230 was first introduced by commit
:::::: ed8f13bf4a2ccb6c90d3210421455c2ceae678de btrfs: refactor page status update into process_one_page()

:::::: TO: Qu Wenruo <wqu@suse.com>
:::::: CC: David Sterba <dsterba@suse.com>

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


                 reply	other threads:[~2023-08-11 11:04 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=202308111822.ITiKYDqp-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=dsterba@suse.com \
    --cc=hch@lst.de \
    --cc=josef@toxicpanda.com \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox