Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "David Hildenbrand (Arm)" <david@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev
Subject: [davidhildenbrand:b4/clear_not_present_full_ptes 3/4] include/linux/pgtable.h:974:17: error: parameter 'addr' set but not used
Date: Fri, 12 Jun 2026 10:04:20 +0800	[thread overview]
Message-ID: <202606120923.3tqIxomB-lkp@intel.com> (raw)

tree:   https://github.com/davidhildenbrand/linux b4/clear_not_present_full_ptes
head:   81719d3f861fee6a18ea50f011a411e7fa330df1
commit: cc8cb0687c651143e5bba6b80b26f188b5cd641d [3/4] mm: drop pte_clear_not_present_full()
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20260612/202606120923.3tqIxomB-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project c8ad049db78ae52052722b6f42b54cd2a666072b)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260612/202606120923.3tqIxomB-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/202606120923.3tqIxomB-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from lib/test_bitops.c:12:
   In file included from include/linux/slab.h:264:
   In file included from include/linux/kasan.h:38:
>> include/linux/pgtable.h:974:17: error: parameter 'addr' set but not used [-Werror,-Wunused-but-set-parameter]
     974 |                 unsigned long addr, pte_t *ptep, unsigned int nr, int full)
         |                               ^
   1 error generated.


vim +/addr +974 include/linux/pgtable.h

7df676974359f9 include/asm-generic/pgtable.h Bibo Mao                2020-05-27  956  
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  957  #ifndef clear_not_present_full_ptes
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  958  /**
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  959   * clear_not_present_full_ptes - Clear multiple not present PTEs which are
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  960   *				 consecutive in the pgtable.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  961   * @mm: Address space the ptes represent.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  962   * @addr: Address of the first pte.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  963   * @ptep: Page table pointer for the first entry.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  964   * @nr: Number of entries to clear.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  965   * @full: Whether we are clearing a full mm.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  966   *
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  967   * May be overridden by the architecture; otherwise, implemented as a simple
cc8cb0687c6511 include/linux/pgtable.h       David Hildenbrand (Arm  2026-06-10  968)  * loop over pte_clear().
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  969   *
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  970   * Context: The caller holds the page table lock.  The PTEs are all not present.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  971   * The PTEs are all in the same PMD.
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  972   */
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  973  static inline void clear_not_present_full_ptes(struct mm_struct *mm,
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08 @974  		unsigned long addr, pte_t *ptep, unsigned int nr, int full)
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  975  {
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  976  	for (;;) {
cc8cb0687c6511 include/linux/pgtable.h       David Hildenbrand (Arm  2026-06-10  977) 		pte_clear(mm, addr, ptep);
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  978  		if (--nr == 0)
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  979  			break;
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  980  		ptep++;
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  981  		addr += PAGE_SIZE;
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  982  	}
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  983  }
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  984  #endif
a62fb92ac12ed3 include/linux/pgtable.h       Ryan Roberts            2024-04-08  985  

:::::: The code at line 974 was first introduced by commit
:::::: a62fb92ac12ed39df4930dca599a3b427552882a mm: swap: free_swap_and_cache_nr() as batched free_swap_and_cache()

:::::: TO: Ryan Roberts <ryan.roberts@arm.com>
:::::: CC: Andrew Morton <akpm@linux-foundation.org>

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

                 reply	other threads:[~2026-06-12  2:05 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=202606120923.3tqIxomB-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=david@kernel.org \
    --cc=llvm@lists.linux.dev \
    --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