linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [linux-next:master 1753/1936] mm/swapfile.c:1517:20: warning: function 'swap_is_last_ref' is not needed and will not be emitted
@ 2025-04-08 10:06 kernel test robot
  2025-04-09  0:39 ` Andrew Morton
  0 siblings, 1 reply; 10+ messages in thread
From: kernel test robot @ 2025-04-08 10:06 UTC (permalink / raw)
  To: Kemeng Shi
  Cc: llvm, oe-kbuild-all, Andrew Morton, Linux Memory Management List,
	Tim Chen, Baoquan He

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   7702d0130dc002bab2c3571ddb6ff68f82d99aea
commit: 6bb001b6b64ec20d900d0d81294a0f031af59c3e [1753/1936] mm: swap: enable swap_entry_range_free() to drop any kind of last ref
config: hexagon-randconfig-001-20250408 (https://download.01.org/0day-ci/archive/20250408/202504081841.jbL7yL0r-lkp@intel.com/config)
compiler: clang version 21.0.0git (https://github.com/llvm/llvm-project 92c93f5286b9ff33f27ff694d2dc33da1c07afdd)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250408/202504081841.jbL7yL0r-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/202504081841.jbL7yL0r-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> mm/swapfile.c:1517:20: warning: function 'swap_is_last_ref' is not needed and will not be emitted [-Wunneeded-internal-declaration]
    1517 | static inline bool swap_is_last_ref(unsigned char count)
         |                    ^~~~~~~~~~~~~~~~
   1 warning generated.


vim +/swap_is_last_ref +1517 mm/swapfile.c

  1512	
  1513	/*
  1514	 * Drop the last ref(1, SWAP_HAS_CACHE or SWAP_MAP_SHMEM) of swap entries,
  1515	 * caller have to ensure all entries belong to the same cgroup and cluster.
  1516	 */
> 1517	static inline bool swap_is_last_ref(unsigned char count)
  1518	{
  1519		return (count == SWAP_HAS_CACHE) || (count == 1) ||
  1520		       (count == SWAP_MAP_SHMEM);
  1521	}
  1522	

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


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

end of thread, other threads:[~2025-04-13  2:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-04-08 10:06 [linux-next:master 1753/1936] mm/swapfile.c:1517:20: warning: function 'swap_is_last_ref' is not needed and will not be emitted kernel test robot
2025-04-09  0:39 ` Andrew Morton
2025-04-09  2:24   ` Baoquan He
2025-04-09  6:25   ` Kemeng Shi
2025-04-09 16:54   ` SeongJae Park
2025-04-09 22:45     ` Baoquan He
2025-04-10  0:26       ` SeongJae Park
2025-04-13  2:47       ` Li, Philip
2025-04-10  0:42     ` Andrew Morton
2025-04-10  6:34       ` Kemeng Shi

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