Skip to contentSkip to conversation

arch/m68k/include/asm/page.h:20:27: error: lvalue required as unary '&' operand

PATCH kernel test robot 2 participants 2 messages Nov 17, 2025 Memory management

lore
Share & tools
lore

kernel test robot

author build bot
#0 lore raw
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0c1c7a6a83feaf2cf182c52983ffe330ffb50280
commit: f54f0efb9d91fa2eee95a7eb29d0051f2176df47 [8868/9360] mm/damon/vaddr: cleanup using pmd_trans_huge_lock()
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20251117/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251117/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from arch/m68k/include/asm/thread_info.h:6,

                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:7,
                    from include/linux/highmem.h:5,
                    from mm/damon/vaddr.c:10:
   mm/damon/vaddr.c: In function 'damon_mkold_pmd_entry':
>> arch/m68k/include/asm/page.h:20:27: error: lvalue required as unary '&' operand
      20 | #define pmd_val(x)      ((&x)->pmd)
         |                           ^

arch/m68k/include/asm/motorola_pgtable.h:116:34: note: in expansion of macro 'pmd_val'
116 | #define pmd_present(pmd) (pmd_val(pmd) & _PAGE_TABLE)
| ^~~~~~~
mm/damon/vaddr.c:314:21: note: in expansion of macro 'pmd_present'
314 | if (pmd_present(pmdp_get(pmd)))
| ^~~~~~~~~~~

vim +20 arch/m68k/include/asm/page.h

138ff3462f53a7 Greg Ungerer   2010-09-07  14  
138ff3462f53a7 Greg Ungerer   2010-09-07  15  /*
138ff3462f53a7 Greg Ungerer   2010-09-07  16   * These are used to make use of C type-checking..
138ff3462f53a7 Greg Ungerer   2010-09-07  17   */
60e50f34b13e9e Mike Rapoport  2019-12-04  18  #if !defined(CONFIG_MMU) || CONFIG_PGTABLE_LEVELS == 3
ef22d8abd876e8 Peter Zijlstra 2020-01-31  19  typedef struct { unsigned long pmd; } pmd_t;
ef22d8abd876e8 Peter Zijlstra 2020-01-31 @20  #define pmd_val(x)	((&x)->pmd)
ef22d8abd876e8 Peter Zijlstra 2020-01-31  21  #define __pmd(x)	((pmd_t) { (x) } )
60e50f34b13e9e Mike Rapoport  2019-12-04  22  #endif

60e50f34b13e9e Mike Rapoport 2019-12-04 23

:::::: The code at line 20 was first introduced by commit
:::::: ef22d8abd876e805b604e8f655127de2beee2869 m68k: mm: Restructure Motorola MMU page-table layout

:::::: TO: Peter Zijlstra <[email protected]> :::::: CC: Geert Uytterhoeven <[email protected]>

Signature · 2 lines
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
#1 lore raw
Quoted 27 lines · On Mon, 17 Nov 2025 22:29:37 +0800 kernel test robot <[email protected]> wrote:
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   0c1c7a6a83feaf2cf182c52983ffe330ffb50280
commit: f54f0efb9d91fa2eee95a7eb29d0051f2176df47 [8868/9360] mm/damon/vaddr: cleanup using pmd_trans_huge_lock()
config: m68k-allmodconfig (https://download.01.org/0day-ci/archive/20251117/[email protected]/config)
compiler: m68k-linux-gcc (GCC) 15.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251117/[email protected]/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 <[email protected]>
| Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/

All errors (new ones prefixed by >>):

In file included from arch/m68k/include/asm/thread_info.h:6,

                    from include/linux/thread_info.h:60,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/m68k/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:79,
                    from include/linux/spinlock.h:56,
                    from include/linux/wait.h:9,
                    from include/linux/wait_bit.h:8,
                    from include/linux/fs.h:7,
                    from include/linux/highmem.h:5,
                    from mm/damon/vaddr.c:10:

mm/damon/vaddr.c: In function 'damon_mkold_pmd_entry':

Quoted 1 line
Quoted 1 line

arch/m68k/include/asm/page.h:20:27: error: lvalue required as unary '&' operand

Quoted 8 lines
      20 | #define pmd_val(x)      ((&x)->pmd)
         |                           ^

arch/m68k/include/asm/motorola_pgtable.h:116:34: note: in expansion of macro 'pmd_val'
116 | #define pmd_present(pmd) (pmd_val(pmd) & _PAGE_TABLE)
| ^~~~~~~
mm/damon/vaddr.c:314:21: note: in expansion of macro 'pmd_present'
314 | if (pmd_present(pmdp_get(pmd)))
| ^~~~~~~~~~~

Thank you for the report! I just sent a fix:
https://lore.kernel.org/[email protected]

Thanks,
SJ

[...]