Hi Belloni, On Mon, 2020-03-16 at 16:15 +1100, Stephen Rothwell wrote: > Hi all, > > After merging the rtc tree, today's linux-next build (x86_64 allmodconfig) > failed like this: > > drivers/rtc/rtc-mt2712.c: In function 'mt2712_rtc_set_alarm': > drivers/rtc/rtc-mt2712.c:235:6: warning: unused variable 'irqen' [-Wunused-variable] > 235 | u16 irqen; > | ^~~~~ > drivers/rtc/rtc-mt2712.c: At top level: > drivers/rtc/rtc-mt2712.c:409:1: error: expected ',' or ';' before 'static' > 409 | static struct platform_driver mt2712_rtc_driver = { > | ^~~~~~ > In file included from drivers/rtc/rtc-mt2712.c:14: > drivers/rtc/rtc-mt2712.c: In function 'mt2712_rtc_driver_init': > drivers/rtc/rtc-mt2712.c:418:24: error: 'mt2712_rtc_driver' undeclared (first use in this function); did you mean 'mt2712_rtc_probe'? > 418 | module_platform_driver(mt2712_rtc_driver); > | ^~~~~~~~~~~~~~~~~ > include/linux/platform_device.h:214:29: note: in definition of macro 'platform_driver_register' > 214 | __platform_driver_register(drv, THIS_MODULE) > | ^~~ > include/linux/platform_device.h:244:2: note: in expansion of macro 'module_driver' > 244 | module_driver(__platform_driver, platform_driver_register, \ > | ^~~~~~~~~~~~~ > drivers/rtc/rtc-mt2712.c:418:1: note: in expansion of macro 'module_platform_driver' > 418 | module_platform_driver(mt2712_rtc_driver); > | ^~~~~~~~~~~~~~~~~~~~~~ > drivers/rtc/rtc-mt2712.c:418:24: note: each undeclared identifier is reported only once for each function it appears in > 418 | module_platform_driver(mt2712_rtc_driver); > | ^~~~~~~~~~~~~~~~~ > include/linux/platform_device.h:214:29: note: in definition of macro 'platform_driver_register' > 214 | __platform_driver_register(drv, THIS_MODULE) > | ^~~ > include/linux/platform_device.h:244:2: note: in expansion of macro 'module_driver' > 244 | module_driver(__platform_driver, platform_driver_register, \ > | ^~~~~~~~~~~~~ > drivers/rtc/rtc-mt2712.c:418:1: note: in expansion of macro 'module_platform_driver' > 418 | module_platform_driver(mt2712_rtc_driver); > | ^~~~~~~~~~~~~~~~~~~~~~ > In file included from include/linux/device.h:31, > from include/linux/platform_device.h:13, > from drivers/rtc/rtc-mt2712.c:14: > drivers/rtc/rtc-mt2712.c: In function 'mt2712_rtc_driver_exit': > drivers/rtc/rtc-mt2712.c:418:24: error: 'mt2712_rtc_driver' undeclared (first use in this function); did you mean 'mt2712_rtc_probe'? > 418 | module_platform_driver(mt2712_rtc_driver); > | ^~~~~~~~~~~~~~~~~ > include/linux/device/driver.h:266:17: note: in definition of macro 'module_driver' > 266 | __unregister(&(__driver) , ##__VA_ARGS__); \ > | ^~~~~~~~ > drivers/rtc/rtc-mt2712.c:418:1: note: in expansion of macro 'module_platform_driver' > 418 | module_platform_driver(mt2712_rtc_driver); > | ^~~~~~~~~~~~~~~~~~~~~~ > drivers/rtc/rtc-mt2712.c: In function 'mt2712_rtc_driver_init': > drivers/rtc/rtc-mt2712.c:418:1: warning: control reaches end of non-void function [-Wreturn-type] > 418 | module_platform_driver(mt2712_rtc_driver); > | ^~~~~~~~~~~~~~~~~~~~~~ > At top level: > drivers/rtc/rtc-mt2712.c:312:12: warning: 'mt2712_rtc_probe' defined but not used [-Wunused-function] > 312 | static int mt2712_rtc_probe(struct platform_device *pdev) > | ^~~~~~~~~~~~~~~~ > > Caused by commit > > 00c36d73171b ("rtc: add support for the MediaTek MT2712 RTC") > > I have used the version from next-20200313 for today. > This build fail only happen if rtc-mt2712 build as module which I haven't try. It because ";" was missed after "MODULE_DEVICE_TABLE(of, mt2712_rtc_of_match)". Should I send a fix patch for this or resend the whole rtc-mt2712 driver? Regards, Ran