From: kbuild test robot <lkp@intel.com>
To: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-rtc@vger.kernel.org, a.zummo@towertech.it,
alexandre.belloni@bootlin.com, ccaione@baylibre.com,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
linux-kernel@vger.kernel.org, ben.dooks@codethink.co.uk,
kbuild-all@01.org, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v5 2/2] rtc: support for the Amlogic Meson RTC
Date: Wed, 5 Dec 2018 21:11:09 +0800 [thread overview]
Message-ID: <201812052107.Ae3ixQu3%fengguang.wu@intel.com> (raw)
In-Reply-To: <20181202220847.24364-3-martin.blumenstingl@googlemail.com>
[-- Attachment #1: Type: text/plain, Size: 4672 bytes --]
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
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 56016 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2018-12-05 13:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-02 22:08 [PATCH v5 0/2] Amlogic Meson6/8/8b/8m2 SoC RTC driver Martin Blumenstingl
2018-12-02 22:08 ` [PATCH v5 1/2] dt-bindings: rtc: add device-tree bindings for the Amlogic Meson RTC Martin Blumenstingl
2018-12-02 22:08 ` [PATCH v5 2/2] rtc: support " Martin Blumenstingl
2018-12-05 13:11 ` kbuild test robot [this message]
2018-12-05 13:36 ` Ben Dooks
2018-12-05 15:02 ` Neil Armstrong
2018-12-05 22:15 ` Martin Blumenstingl
2018-12-17 23:48 ` Martin Blumenstingl
2018-12-27 21:56 ` Martin Blumenstingl
2019-01-12 12:52 ` Martin Blumenstingl
2019-01-16 21:29 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201812052107.Ae3ixQu3%fengguang.wu@intel.com \
--to=lkp@intel.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=ben.dooks@codethink.co.uk \
--cc=ccaione@baylibre.com \
--cc=kbuild-all@01.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).