Hi Laurent,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on geert-m68k/for-next]
[also build test WARNING on linux/master gerg-m68knommu/for-next linus/master v5.16
next-20220113]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url:
https://github.com/0day-ci/linux/commits/Laurent-Vivier/m68k-Add-Virtual-...
base:
https://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git for-next
config: m68k-allyesconfig
(
https://download.01.org/0day-ci/archive/20220113/202201131603.TkF80Rn5-lk...)
compiler: m68k-linux-gcc (GCC) 11.2.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://github.com/0day-ci/linux/commit/f169b75339fd0f82fc1b5ed82611f70fc...
git remote add linux-review
https://github.com/0day-ci/linux
git fetch --no-tags linux-review
Laurent-Vivier/m68k-Add-Virtual-M68k-Machine/20220113-054106
git checkout f169b75339fd0f82fc1b5ed82611f70fccc1401f
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir
ARCH=m68k SHELL=/bin/bash arch/m68k/virt/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
> arch/m68k/virt/timer.c:45:46: warning: 'struct
clock_event_device' declared inside parameter list will not be visible outside of this
definition or declaration
45 | static int goldfish_timer_set_oneshot(struct
clock_event_device *evt)
| ^~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:55:43: warning: 'struct clock_event_device' declared
inside parameter list will not be visible outside of this definition or declaration
55 | static int goldfish_timer_shutdown(struct clock_event_device *evt)
| ^~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:63:45: warning: 'struct clock_event_device' declared
inside parameter list will not be visible outside of this definition or declaration
63 | struct clock_event_device *evt)
| ^~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:79:8: error: variable 'goldfish_timer_clockevent' has
initializer but incomplete type
79 | struct clock_event_device goldfish_timer_clockevent = {
| ^~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:80:10: error: 'struct clock_event_device' has no member
named 'name'
80 | .name = "goldfish_timer",
| ^~~~
> arch/m68k/virt/timer.c:80:35: warning: excess elements in struct
initializer
80 | .name =
"goldfish_timer",
| ^~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:80:35: note: (near initialization for
'goldfish_timer_clockevent')
arch/m68k/virt/timer.c:81:10: error: 'struct clock_event_device' has no member
named 'features'
81 | .features = CLOCK_EVT_FEAT_ONESHOT,
| ^~~~~~~~
arch/m68k/virt/timer.c:81:35: error: 'CLOCK_EVT_FEAT_ONESHOT' undeclared here
(not in a function)
81 | .features = CLOCK_EVT_FEAT_ONESHOT,
| ^~~~~~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:81:35: warning: excess elements in struct initializer
arch/m68k/virt/timer.c:81:35: note: (near initialization for
'goldfish_timer_clockevent')
arch/m68k/virt/timer.c:82:10: error: 'struct clock_event_device' has no member
named 'set_state_shutdown'
82 | .set_state_shutdown = goldfish_timer_shutdown,
| ^~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:82:35: warning: excess elements in struct initializer
82 | .set_state_shutdown = goldfish_timer_shutdown,
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:82:35: note: (near initialization for
'goldfish_timer_clockevent')
arch/m68k/virt/timer.c:83:10: error: 'struct clock_event_device' has no member
named 'set_state_oneshot'
83 | .set_state_oneshot = goldfish_timer_set_oneshot,
| ^~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:83:35: warning: excess elements in struct initializer
83 | .set_state_oneshot = goldfish_timer_set_oneshot,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:83:35: note: (near initialization for
'goldfish_timer_clockevent')
arch/m68k/virt/timer.c:84:10: error: 'struct clock_event_device' has no member
named 'set_next_event'
84 | .set_next_event = goldfish_timer_next_event,
| ^~~~~~~~~~~~~~
arch/m68k/virt/timer.c:84:35: warning: excess elements in struct initializer
84 | .set_next_event = goldfish_timer_next_event,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c:84:35: note: (near initialization for
'goldfish_timer_clockevent')
arch/m68k/virt/timer.c:85:10: error: 'struct clock_event_device' has no member
named 'shift'
85 | .shift = 32,
| ^~~~~
arch/m68k/virt/timer.c:85:35: warning: excess elements in struct initializer
85 | .shift = 32,
| ^~
arch/m68k/virt/timer.c:85:35: note: (near initialization for
'goldfish_timer_clockevent')
arch/m68k/virt/timer.c: In function 'golfish_timer_tick':
arch/m68k/virt/timer.c:92:12: error: invalid use of undefined type 'struct
clock_event_device'
92 | evt->event_handler(evt);
| ^~
arch/m68k/virt/timer.c: In function 'virt_sched_init':
arch/m68k/virt/timer.c:110:9: error: implicit declaration of function
'clockevents_config_and_register' [-Werror=implicit-function-declaration]
110 | clockevents_config_and_register(&goldfish_timer_clockevent,
NSEC_PER_SEC,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/m68k/virt/timer.c: At top level:
arch/m68k/virt/timer.c:79:27: error: storage size of
'goldfish_timer_clockevent' isn't known
79 | struct clock_event_device goldfish_timer_clockevent = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +45 arch/m68k/virt/timer.c
44
45 static int goldfish_timer_set_oneshot(struct clock_event_device
*evt)
46 {
47 gf_timer->alarm_high = 0;
48 gf_timer->alarm_low = 0;
49
50 gf_timer->irq_enabled = 1;
51
52 return 0;
53 }
54
55 static int goldfish_timer_shutdown(struct clock_event_device *evt)
56 {
57 gf_timer->irq_enabled = 0;
58
59 return 0;
60 }
61
62 static int goldfish_timer_next_event(unsigned long delta,
63 struct clock_event_device *evt)
64 {
65 u64 now;
66
67 gf_timer->clear_interrupt = 1;
68
69 now = goldfish_timer_read(NULL);
70
71 now += delta;
72
73 gf_timer->alarm_high = upper_32_bits(now);
74 gf_timer->alarm_low = lower_32_bits(now);
75
76 return 0;
77 }
78
79 struct clock_event_device goldfish_timer_clockevent = {
80 .name = "goldfish_timer",
81 .features =
CLOCK_EVT_FEAT_ONESHOT,
82 .set_state_shutdown = goldfish_timer_shutdown,
83 .set_state_oneshot = goldfish_timer_set_oneshot,
84 .set_next_event = goldfish_timer_next_event,
85 .shift = 32,
86 };
87
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org