Hi Martin, Thank you for the patch! Yet something to improve: [auto build test ERROR on abelloni/rtc-next] [also build test ERROR on v4.20-rc5 next-20181204] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Martin-Blumenstingl/Amlogic-Meson6-8-8b-8m2-SoC-RTC-driver/20181204-002803 base: https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next config: sparc64-allyesconfig (attached as .config) compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0 reproduce: wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree GCC_VERSION=7.2.0 make.cross ARCH=sparc64 All errors (new ones prefixed by >>): drivers/rtc/rtc-meson.c: In function 'meson_rtc_probe': >> drivers/rtc/rtc-meson.c:288:11: error: 'SZ_16' undeclared (first use in this function); did you mean 'SF_L6'? .size = SZ_16, ^~~~~ SF_L6 drivers/rtc/rtc-meson.c:288:11: note: each undeclared identifier is reported only once for each function it appears in vim +288 drivers/rtc/rtc-meson.c 281 282 static int meson_rtc_probe(struct platform_device *pdev) 283 { 284 struct nvmem_config meson_rtc_nvmem_config = { 285 .name = "meson-rtc-regmem", 286 .word_size = 4, 287 .stride = 4, > 288 .size = SZ_16, 289 .reg_read = meson_rtc_regmem_read, 290 .reg_write = meson_rtc_regmem_write, 291 }; 292 struct device *dev = &pdev->dev; 293 struct meson_rtc *rtc; 294 struct resource *res; 295 void __iomem *base; 296 int ret; 297 u32 tm; 298 299 rtc = devm_kzalloc(dev, sizeof(struct meson_rtc), GFP_KERNEL); 300 if (!rtc) 301 return -ENOMEM; 302 303 rtc->rtc = devm_rtc_allocate_device(dev); 304 if (IS_ERR(rtc->rtc)) 305 return PTR_ERR(rtc->rtc); 306 307 platform_set_drvdata(pdev, rtc); 308 309 rtc->dev = dev; 310 311 rtc->rtc->ops = &meson_rtc_ops; 312 rtc->rtc->range_max = U32_MAX; 313 314 res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 315 base = devm_ioremap_resource(dev, res); 316 if (IS_ERR(base)) 317 return PTR_ERR(base); 318 319 rtc->peripheral = devm_regmap_init_mmio(dev, base, 320 &meson_rtc_peripheral_regmap_config); 321 if (IS_ERR(rtc->peripheral)) { 322 dev_err(dev, "failed to create peripheral regmap\n"); 323 return PTR_ERR(rtc->peripheral); 324 } 325 326 rtc->reset = devm_reset_control_get(dev, NULL); 327 if (IS_ERR(rtc->reset)) { 328 dev_err(dev, "missing reset line\n"); 329 return PTR_ERR(rtc->reset); 330 } 331 332 rtc->vdd = devm_regulator_get(dev, "vdd"); 333 if (IS_ERR(rtc->vdd)) { 334 dev_err(dev, "failed to get the vdd-supply\n"); 335 return PTR_ERR(rtc->vdd); 336 } 337 338 ret = regulator_enable(rtc->vdd); 339 if (ret) { 340 dev_err(dev, "failed to enable vdd-supply\n"); 341 return ret; 342 } 343 344 ret = meson_rtc_write_static(rtc, MESON_STATIC_DEFAULT); 345 if (ret) { 346 dev_err(dev, "failed to set static values\n"); 347 goto out_disable_vdd; 348 } 349 350 rtc->serial = devm_regmap_init(dev, &meson_rtc_serial_bus, rtc, 351 &meson_rtc_serial_regmap_config); 352 if (IS_ERR(rtc->serial)) { 353 dev_err(dev, "failed to create serial regmap\n"); 354 ret = PTR_ERR(rtc->serial); 355 goto out_disable_vdd; 356 } 357 358 /* 359 * check if we can read RTC counter, if not then the RTC is probably 360 * not functional. If it isn't probably best to not bind. 361 */ 362 ret = regmap_read(rtc->serial, RTC_COUNTER, &tm); 363 if (ret) { 364 dev_err(dev, "cannot read RTC counter, RTC not functional\n"); 365 goto out_disable_vdd; 366 } 367 368 meson_rtc_nvmem_config.priv = rtc; 369 ret = rtc_nvmem_register(rtc->rtc, &meson_rtc_nvmem_config); 370 if (ret) 371 goto out_disable_vdd; 372 373 ret = rtc_register_device(rtc->rtc); 374 if (ret) 375 goto out_unregister_nvmem; 376 377 return 0; 378 379 out_unregister_nvmem: 380 rtc_nvmem_unregister(rtc->rtc); 381 382 out_disable_vdd: 383 regulator_disable(rtc->vdd); 384 return ret; 385 } 386 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation