Re: [PATCH v2 2/3] mm: drop pte_clear_not_present_full()

Andrew Morton <[email protected]> Mon, 29 Jun 2026 14:08:55 -0700
Newsgroups org.kernel.vger.sparclinux,org.kernel.vger.linux-kernel,org.kvack.linux-mm
Message-ID <[email protected]>
On Mon, 29 Jun 2026 19:43:53 +0200 "David Hildenbrand (Arm)" <[email protected]> wrote:

> > So... what's happening here?
> 
> "nr_pages" are not modified in the function, so the compile does not complain.
> See below.
> 
> 
> A private build bot barked at me after v1 for
> 
> 	arm-linux-gnueabi-gcc
> 	openrisc-allnoconfig
> 	um-allmodconfig
> 
> For example:
> 
> https://lore.kernel.org/all/[email protected]/
> 
> All errors (new ones prefixed by >>):
> 
>    In file included from include/linux/kasan.h:38,
>                     from include/linux/slab.h:264,
>                     from lib/test_bitops.c:12:
>    include/linux/pgtable.h: In function 'clear_not_present_full_ptes':
> >> include/linux/pgtable.h:974:31: error: parameter 'addr' set but not used
> [-Werror=unused-but-set-parameter=]
>      974 |                 unsigned long addr, pte_t *ptep, unsigned int nr, int
> full)
>          |                 ~~~~~~~~~~~~~~^~~~
>    cc1: all warnings being treated as errors
> 
> 
> The problem is that addr is updated (written) in the function but never read.

Oh, OK, thanks.  I altered the changelog to read

"To prevent the compiler complaining on some configs about "set but not
used" addr parameter, silence that here."