All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kernel@openeuler.org
Cc: oe-kbuild-all@lists.linux.dev
Subject: [openeuler:OLK-6.6 3103/3103] mm/swap.h:66:26: error: implicit declaration of function 'swp_offset'; did you mean 'pud_offset'?
Date: Wed, 5 Nov 2025 20:51:47 +0800	[thread overview]
Message-ID: <202511052045.6ZI8bKFl-lkp@intel.com> (raw)

Hi Kairui,

FYI, the error/warning still remains.

tree:   https://gitee.com/openeuler/kernel.git OLK-6.6
head:   b2b8512ca97108929f3aca5405875d91577b8c80
commit: 5a72d2e54e8ff7c7f9510de875cf201ad18f36c4 [3103/3103] mm/shmem, swap: fix softlockup with mTHP swapin
config: x86_64-randconfig-005-20251105 (https://download.01.org/0day-ci/archive/20251105/202511052045.6ZI8bKFl-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251105/202511052045.6ZI8bKFl-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/202511052045.6ZI8bKFl-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from mm/shmem.c:43:
   mm/swap.h: In function 'non_swapcache_batch':
>> mm/swap.h:66:26: error: implicit declaration of function 'swp_offset'; did you mean 'pud_offset'? [-Wimplicit-function-declaration]
      66 |         pgoff_t offset = swp_offset(entry);
         |                          ^~~~~~~~~~
         |                          pud_offset
   In file included from mm/shmem.c:68:
   include/linux/swapops.h: At top level:
>> include/linux/swapops.h:107:23: error: conflicting types for 'swp_offset'; have 'long unsigned int(swp_entry_t)'
     107 | static inline pgoff_t swp_offset(swp_entry_t entry)
         |                       ^~~~~~~~~~
   mm/swap.h:66:26: note: previous implicit declaration of 'swp_offset' with type 'int()'
      66 |         pgoff_t offset = swp_offset(entry);
         |                          ^~~~~~~~~~


vim +66 mm/swap.h

    62	
    63	static inline int non_swapcache_batch(swp_entry_t entry, int max_nr)
    64	{
    65		struct swap_info_struct *si = swp_swap_info(entry);
  > 66		pgoff_t offset = swp_offset(entry);
    67		int i;
    68	
    69		/*
    70		 * While allocating a large folio and doing mTHP swapin, we need to
    71		 * ensure all entries are not cached, otherwise, the mTHP folio will
    72		 * be in conflict with the folio in swap cache.
    73		 */
    74		for (i = 0; i < max_nr; i++) {
    75			if ((si->swap_map[offset + i] & SWAP_HAS_CACHE))
    76				return i;
    77		}
    78	
    79		return i;
    80	}
    81	

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

                 reply	other threads:[~2025-11-05 12:52 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=202511052045.6ZI8bKFl-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kernel@openeuler.org \
    --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 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.