[arm-integrator:kernel-in-vmalloc-v5.19-rc1 22/35] arch/m68k/mm/motorola.c:105:56: error: expected expression before 'void'

From: kernel test robot
Date: Mon Jul 04 2022 - 21:06:41 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git kernel-in-vmalloc-v5.19-rc1
head: 144435741b0a6f31403d3084103678da3b4f9d11
commit: 8cf2c4f6ffc43dcbe6847b0264a36b40e5019464 [22/35] m68k/mm: Make virt_to_pfn() a static inline
config: m68k-randconfig-r002-20220703 (https://download.01.org/0day-ci/archive/20220705/202207050800.rbOo1iMO-lkp@xxxxxxxxx/config)
compiler: m68k-linux-gcc (GCC) 11.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git/commit/?id=8cf2c4f6ffc43dcbe6847b0264a36b40e5019464
git remote add arm-integrator https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-integrator.git
git fetch --no-tags arm-integrator kernel-in-vmalloc-v5.19-rc1
git checkout 8cf2c4f6ffc43dcbe6847b0264a36b40e5019464
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.3.0 make.cross W=1 O=build_dir ARCH=m68k SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

In file included from arch/m68k/include/asm/page_mm.h:140,
from arch/m68k/include/asm/page.h:60,
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:78,
from arch/m68k/include/asm/irqflags.h:6,
from include/linux/irqflags.h:16,
from arch/m68k/include/asm/atomic.h:6,
from include/linux/atomic.h:7,
from include/linux/mm_types_task.h:13,
from include/linux/mm_types.h:5,
from include/linux/buildid.h:5,
from include/linux/module.h:14,
from arch/m68k/mm/motorola.c:12:
arch/m68k/mm/motorola.c: In function 'init_pointer_table':
>> arch/m68k/mm/motorola.c:105:56: error: expected expression before 'void'
105 | #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(void *)(page)->lru))
| ^~~~
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
arch/m68k/mm/motorola.c:105:43: note: in expansion of macro 'virt_to_page'
105 | #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(void *)(page)->lru))
| ^~~~~~~~~~~~
arch/m68k/mm/motorola.c:124:14: note: in expansion of macro 'PD_PTABLE'
124 | dp = PD_PTABLE(page);
| ^~~~~~~~~
arch/m68k/mm/motorola.c: In function 'get_pointer_table':
>> arch/m68k/mm/motorola.c:105:56: error: expected expression before 'void'
105 | #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(void *)(page)->lru))
| ^~~~
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
arch/m68k/mm/motorola.c:105:43: note: in expansion of macro 'virt_to_page'
105 | #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(void *)(page)->lru))
| ^~~~~~~~~~~~
arch/m68k/mm/motorola.c:169:23: note: in expansion of macro 'PD_PTABLE'
169 | new = PD_PTABLE(page);
| ^~~~~~~~~
arch/m68k/mm/motorola.c: In function 'free_pointer_table':
>> arch/m68k/mm/motorola.c:105:56: error: expected expression before 'void'
105 | #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(void *)(page)->lru))
| ^~~~
include/asm-generic/memory_model.h:18:46: note: in definition of macro '__pfn_to_page'
18 | #define __pfn_to_page(pfn) (mem_map + ((pfn) - ARCH_PFN_OFFSET))
| ^~~
arch/m68k/mm/motorola.c:105:43: note: in expansion of macro 'virt_to_page'
105 | #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(void *)(page)->lru))
| ^~~~~~~~~~~~
arch/m68k/mm/motorola.c:193:14: note: in expansion of macro 'PD_PTABLE'
193 | dp = PD_PTABLE(page);
| ^~~~~~~~~
arch/m68k/mm/motorola.c: At top level:
arch/m68k/mm/motorola.c:389:13: warning: no previous prototype for 'paging_init' [-Wmissing-prototypes]
389 | void __init paging_init(void)
| ^~~~~~~~~~~


vim +/void +105 arch/m68k/mm/motorola.c

5ad272abee9fe0 Peter Zijlstra 2020-01-31 104
237195c0a0ea52 Linus Walleij 2022-06-03 @105 #define PD_PTABLE(page) ((ptable_desc *)&(virt_to_page(void *)(page)->lru))
5ad272abee9fe0 Peter Zijlstra 2020-01-31 106 #define PD_PAGE(ptable) (list_entry(ptable, struct page, lru))
0e071ee6815692 Peter Zijlstra 2020-01-31 107 #define PD_MARKBITS(dp) (*(unsigned int *)&PD_PAGE(dp)->index)
0e071ee6815692 Peter Zijlstra 2020-01-31 108

:::::: The code at line 105 was first introduced by commit
:::::: 237195c0a0ea524dc14c7e004fc920a288405751 m68k: Pass a pointer to virt_to_pfn() virt_to_page()

:::::: TO: Linus Walleij <linus.walleij@xxxxxxxxxx>
:::::: CC: Linus Walleij <linus.walleij@xxxxxxxxxx>

--
0-DAY CI Kernel Test Service
https://01.org/lkp