Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [davidhildenbrand:device_private 15/22] mm/damon/ops-common.c:50:17: warning: variable 'pteval' is uninitialized when used here
@ 2025-02-05  9:09 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-05  9:09 UTC (permalink / raw)
  To: David Hildenbrand; +Cc: llvm, oe-kbuild-all

tree:   https://github.com/davidhildenbrand/linux device_private
head:   ddc42f5fd72394838fc2d280ff2486ccb7178b9a
commit: 9440e0949cbc08fc248f6eacf05e4d47c48f1294 [15/22] mm/damon: handle device-exclusive entries correctly in damon_folio_mkold_one()
config: i386-buildonly-randconfig-005-20250205 (https://download.01.org/0day-ci/archive/20250205/202502051656.Xa4isdxU-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/20250205/202502051656.Xa4isdxU-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/202502051656.Xa4isdxU-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mm/damon/ops-common.c:50:17: warning: variable 'pteval' is uninitialized when used here [-Wuninitialized]
      50 |                 pfn = pte_pfn(pteval);
         |                               ^~~~~~
   mm/damon/ops-common.c:47:2: note: variable 'pteval' is declared here
      47 |         pte_t pteval;
         |         ^
   1 warning generated.


vim +/pteval +50 mm/damon/ops-common.c

    41	
    42	void damon_ptep_mkold(pte_t *pte, struct vm_area_struct *vma, unsigned long addr)
    43	{
    44		struct folio *folio = damon_get_folio(pte_pfn(ptep_get(pte)));
    45		bool young = false;
    46		unsigned long pfn;
    47		pte_t pteval;
    48	
    49		if (likely(pte_present(pteval)))
  > 50			pfn = pte_pfn(pteval);
    51		else
    52			pfn = swp_offset_pfn(pte_to_swp_entry(pteval));
    53	
    54		folio = damon_get_folio(pfn);
    55		if (!folio)
    56			return;
    57	
    58		/*
    59		 * PFN swap entries, such as device-exclusive ones, are "old" from a
    60		 * CPU perspective.
    61		 */
    62		if (likely(pte_present(pteval)))
    63			young |= ptep_test_and_clear_young(vma, addr, pte);
    64		young |= mmu_notifier_clear_young(vma->vm_mm, addr, addr + PAGE_SIZE);
    65		if (young)
    66			folio_set_young(folio);
    67	
    68		folio_set_idle(folio);
    69		folio_put(folio);
    70	}
    71	

-- 
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:[~2025-02-05  9:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05  9:09 [davidhildenbrand:device_private 15/22] mm/damon/ops-common.c:50:17: warning: variable 'pteval' is uninitialized when used here 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