Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: kernel test robot <lkp@intel.com>
Cc: Kairui Song <kasong@tencent.com>,
	oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Chris Li <chrisl@kernel.org>
Subject: Re: [akpm-mm:mm-new 359/411] mm/swap.h:455:24: error: implicit declaration of function 'swp_offset'; did you mean 'bh_offset'?
Date: Tue, 9 Sep 2025 22:36:13 -0700	[thread overview]
Message-ID: <20250909223613.6427ab904277aabbdbe1454a@linux-foundation.org> (raw)
In-Reply-To: <202509100956.7q0VPOo2-lkp@intel.com>

On Wed, 10 Sep 2025 09:28:50 +0800 kernel test robot <lkp@intel.com> wrote:

> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-new
> head:   f4e8f46973fe0c0f579944a37e96ba9efbe00cca
> commit: aabe1e0289084317ef7603c14132758fad3a975e [359/411] mm, swap: use the swap table for the swap cache and switch API
> config: m68k-allnoconfig (https://download.01.org/0day-ci/archive/20250910/202509100956.7q0VPOo2-lkp@intel.com/config)
> compiler: m68k-linux-gcc (GCC) 15.1.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250910/202509100956.7q0VPOo2-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/202509100956.7q0VPOo2-lkp@intel.com/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from mm/filemap.c:65:
>    mm/swap.h: In function 'folio_index':
> >> mm/swap.h:455:24: error: implicit declaration of function 'swp_offset'; did you mean 'bh_offset'? [-Wimplicit-function-declaration]
>      455 |                 return swp_offset(folio->swap);
>          |                        ^~~~~~~~~~
>          |                        bh_offset

Thanks.  I'll do this:

--- a/mm/swap.h~mm-swap-use-the-swap-table-for-the-swap-cache-and-switch-api-fix
+++ a/mm/swap.h
@@ -451,8 +451,10 @@ static inline int non_swapcache_batch(sw
  */
 static inline pgoff_t folio_index(struct folio *folio)
 {
+#ifdef CONFIG_MMU
 	if (unlikely(folio_test_swapcache(folio)))
 		return swp_offset(folio->swap);
+#endif
 	return folio->index;
 }
 
_



      reply	other threads:[~2025-09-10  5:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-10  1:28 [akpm-mm:mm-new 359/411] mm/swap.h:455:24: error: implicit declaration of function 'swp_offset'; did you mean 'bh_offset'? kernel test robot
2025-09-10  5:36 ` Andrew Morton [this message]

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=20250909223613.6427ab904277aabbdbe1454a@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chrisl@kernel.org \
    --cc=kasong@tencent.com \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox