All of lore.kernel.org
 help / color / mirror / Atom feed
* [sj:damon/next 76/76] mm/damon/paddr.c:493:3: warning: variable 'applied' is uninitialized when used here
@ 2024-12-09  4:10 kernel test robot
  2024-12-09 18:27 ` SeongJae Park
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2024-12-09  4:10 UTC (permalink / raw)
  To: SeongJae Park; +Cc: llvm, oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/sj/linux.git damon/next
head:   25b6468a712e65fa59ad8724e87ed32fb3e1d0c3
commit: 25b6468a712e65fa59ad8724e87ed32fb3e1d0c3 [76/76] mm/damon: add a new DAMOS action for fine-grained filter-aware stat
config: i386-buildonly-randconfig-004-20241207 (https://download.01.org/0day-ci/archive/20241207/202412071433.DgqslKRN-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241207/202412071433.DgqslKRN-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/202412071433.DgqslKRN-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from mm/damon/paddr.c:12:
   In file included from include/linux/pagemap.h:8:
   In file included from include/linux/mm.h:2223:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
   In file included from mm/damon/paddr.c:17:
   include/linux/mm_inline.h:47:41: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      47 |         __mod_lruvec_state(lruvec, NR_LRU_BASE + lru, nr_pages);
         |                                    ~~~~~~~~~~~ ^ ~~~
   include/linux/mm_inline.h:49:22: warning: arithmetic between different enumeration types ('enum zone_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
      49 |                                 NR_ZONE_LRU_BASE + lru, nr_pages);
         |                                 ~~~~~~~~~~~~~~~~ ^ ~~~
>> mm/damon/paddr.c:493:3: warning: variable 'applied' is uninitialized when used here [-Wuninitialized]
     493 |                 applied += folio_size(folio);
         |                 ^~~~~~~
   mm/damon/paddr.c:482:29: note: initialize the variable 'applied' to silence this warning
     482 |         unsigned long addr, applied;
         |                                    ^
         |                                     = 0
   4 warnings generated.


vim +/applied +493 mm/damon/paddr.c

   479	
   480	static unsigned long damon_pa_stat2(struct damon_region *r, struct damos *s)
   481	{
   482		unsigned long addr, applied;
   483		LIST_HEAD(folio_list);
   484	
   485		for (addr = r->ar.start; addr < r->ar.end; addr += PAGE_SIZE) {
   486			struct folio *folio = damon_get_folio(PHYS_PFN(addr));
   487	
   488			if (!folio)
   489				continue;
   490	
   491			if (damos_pa_filter_out(s, folio))
   492				goto put_folio;
 > 493			applied += folio_size(folio);
   494	put_folio:
   495			folio_put(folio);
   496		}
   497		return applied;
   498	}
   499	

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-12-09 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-09  4:10 [sj:damon/next 76/76] mm/damon/paddr.c:493:3: warning: variable 'applied' is uninitialized when used here kernel test robot
2024-12-09 18:27 ` SeongJae Park

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.