public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [chao:wip 3/9] fs/f2fs/data.c:2366:10: warning: variable 'index' set but not used
@ 2024-04-17 12:11 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2024-04-17 12:11 UTC (permalink / raw)
  To: Chao Yu, Chao Yu; +Cc: llvm, oe-kbuild-all, Chao Yu, Chao Yu

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git wip
head:   12f1bfe4b075fdc2ecab72bd06ba826e2d32dd70
commit: ab8856b2d7aa3c84ec04e0125e6615a2afc11f3b [3/9] f2fs: convert f2fs_mpage_readpages() to use folio
config: arm-randconfig-003-20240417 (https://download.01.org/0day-ci/archive/20240417/202404172031.UJO1tq47-lkp@intel.com/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 7089c359a3845323f6f30c44a47dd901f2edfe63)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240417/202404172031.UJO1tq47-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/202404172031.UJO1tq47-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from fs/f2fs/data.c:9:
   In file included from include/linux/f2fs_fs.h:11:
   In file included from include/linux/pagemap.h:8:
   In file included from include/linux/mm.h:2208:
   include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     522 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> fs/f2fs/data.c:2366:10: warning: variable 'index' set but not used [-Wunused-but-set-variable]
    2366 |         pgoff_t index;
         |                 ^
   2 warnings generated.


vim +/index +2366 fs/f2fs/data.c

  2340	
  2341	/*
  2342	 * This function was originally taken from fs/mpage.c, and customized for f2fs.
  2343	 * Major change was from block_size == page_size in f2fs by default.
  2344	 */
  2345	static int f2fs_mpage_readpages(struct inode *inode,
  2346			struct readahead_control *rac, struct folio *folio)
  2347	{
  2348		struct bio *bio = NULL;
  2349		sector_t last_block_in_bio = 0;
  2350		struct f2fs_map_blocks map;
  2351	#ifdef CONFIG_F2FS_FS_COMPRESSION
  2352		struct compress_ctx cc = {
  2353			.inode = inode,
  2354			.log_cluster_size = F2FS_I(inode)->i_log_cluster_size,
  2355			.cluster_size = F2FS_I(inode)->i_cluster_size,
  2356			.cluster_idx = NULL_CLUSTER,
  2357			.rpages = NULL,
  2358			.cpages = NULL,
  2359			.nr_rpages = 0,
  2360			.nr_cpages = 0,
  2361		};
  2362		pgoff_t nc_cluster_idx = NULL_CLUSTER;
  2363	#endif
  2364		unsigned nr_pages = rac ? readahead_count(rac) : 1;
  2365		unsigned max_nr_pages = nr_pages;
> 2366		pgoff_t index;
  2367		int ret = 0;
  2368	
  2369		map.m_pblk = 0;
  2370		map.m_lblk = 0;
  2371		map.m_len = 0;
  2372		map.m_flags = 0;
  2373		map.m_next_pgofs = NULL;
  2374		map.m_next_extent = NULL;
  2375		map.m_seg_type = NO_CHECK_TYPE;
  2376		map.m_may_create = false;
  2377	
  2378		for (; nr_pages; nr_pages--) {
  2379			if (rac) {
  2380				folio = readahead_folio(rac);
  2381				prefetchw(&folio->flags);
  2382			}
  2383	
  2384			index = folio_index(folio);
  2385	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-04-17 12:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-17 12:11 [chao:wip 3/9] fs/f2fs/data.c:2366:10: warning: variable 'index' set but not used kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox