From: kernel test robot <lkp@intel.com>
To: WANG Xuerui <git@xen0n.name>, linux-rtc@vger.kernel.org
Cc: kbuild-all@lists.01.org, WANG Xuerui <git@xen0n.name>,
linux-mips@vger.kernel.org, devicetree@vger.kernel.org,
Huacai Chen <chenhuacai@kernel.org>,
Tiezhu Yang <yangtiezhu@loongson.cn>
Subject: Re: [PATCH v2 1/6] rtc: ls2x: Add support for the Loongson-2K/LS7A RTC
Date: Thu, 6 May 2021 07:19:39 +0800 [thread overview]
Message-ID: <202105060721.hDorgbpl-lkp@intel.com> (raw)
In-Reply-To: <20210505163905.1199923-2-git@xen0n.name>
[-- Attachment #1: Type: text/plain, Size: 5208 bytes --]
Hi WANG,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on next-20210505]
[cannot apply to abelloni/rtc-next robh/for-next v5.12]
[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/WANG-Xuerui/rtc-ls2x-Add-support-for-the-Loongson-2K-LS7A-RTC/20210506-013703
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git d665ea6ea86c785760ee4bad4543dab3267ad074
config: arc-allyesconfig (attached as .config)
compiler: arceb-elf-gcc (GCC) 9.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://github.com/0day-ci/linux/commit/a4a12242f17c2ad92025b724458a31eb088e1893
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review WANG-Xuerui/rtc-ls2x-Add-support-for-the-Loongson-2K-LS7A-RTC/20210506-013703
git checkout a4a12242f17c2ad92025b724458a31eb088e1893
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
drivers/rtc/rtc-ls2x.c: In function 'ls2x_rtc_probe':
>> drivers/rtc/rtc-ls2x.c:202:9: error: implicit declaration of function 'rtc_register_device'; did you mean 'devm_rtc_register_device'? [-Werror=implicit-function-declaration]
202 | return rtc_register_device(rtc);
| ^~~~~~~~~~~~~~~~~~~
| devm_rtc_register_device
drivers/rtc/rtc-ls2x.c: At top level:
>> drivers/rtc/rtc-ls2x.c:205:34: error: array type has incomplete element type 'struct of_device_id'
205 | static const struct of_device_id ls2x_rtc_of_match[] = {
| ^~~~~~~~~~~~~~~~~
>> drivers/rtc/rtc-ls2x.c:206:4: error: field name not in record or union initializer
206 | { .compatible = "loongson,ls2x-rtc" },
| ^
drivers/rtc/rtc-ls2x.c:206:4: note: (near initialization for 'ls2x_rtc_of_match')
>> drivers/rtc/rtc-ls2x.c:215:21: error: implicit declaration of function 'of_match_ptr' [-Werror=implicit-function-declaration]
215 | .of_match_table = of_match_ptr(ls2x_rtc_of_match),
| ^~~~~~~~~~~~
drivers/rtc/rtc-ls2x.c:205:34: warning: 'ls2x_rtc_of_match' defined but not used [-Wunused-variable]
205 | static const struct of_device_id ls2x_rtc_of_match[] = {
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +202 drivers/rtc/rtc-ls2x.c
152
153 static int ls2x_rtc_probe(struct platform_device *pdev)
154 {
155 struct device *dev = &pdev->dev;
156 struct rtc_device *rtc;
157 struct ls2x_rtc_priv *priv;
158 void __iomem *regs;
159 int ret;
160
161 priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
162 if (unlikely(!priv))
163 return -ENOMEM;
164
165 spin_lock_init(&priv->lock);
166 platform_set_drvdata(pdev, priv);
167
168 regs = devm_platform_ioremap_resource(pdev, 0);
169 if (IS_ERR(regs)) {
170 ret = PTR_ERR(regs);
171 dev_err(dev, "Failed to map rtc registers: %d\n", ret);
172 return ret;
173 }
174
175 priv->regmap = devm_regmap_init_mmio(dev, regs,
176 &ls2x_rtc_regmap_config);
177 if (IS_ERR(priv->regmap)) {
178 ret = PTR_ERR(priv->regmap);
179 dev_err(dev, "Failed to init regmap: %d\n", ret);
180 return ret;
181 }
182
183 rtc = devm_rtc_allocate_device(dev);
184 if (IS_ERR(rtc)) {
185 ret = PTR_ERR(rtc);
186 dev_err(dev, "Failed to allocate rtc device: %d\n", ret);
187 return ret;
188 }
189
190 rtc->ops = &ls2x_rtc_ops;
191
192 /* Due to hardware erratum, all years multiple of 4 are considered
193 * leap year, so only years 2000 through 2099 are usable.
194 *
195 * Previous out-of-tree versions of this driver wrote tm_year directly
196 * into the year register, so epoch 2000 must be used to preserve
197 * semantics on shipped systems.
198 */
199 rtc->range_min = RTC_TIMESTAMP_BEGIN_2000;
200 rtc->range_max = RTC_TIMESTAMP_END_2099;
201
> 202 return rtc_register_device(rtc);
203 }
204
> 205 static const struct of_device_id ls2x_rtc_of_match[] = {
> 206 { .compatible = "loongson,ls2x-rtc" },
207 { /* sentinel */ },
208 };
209 MODULE_DEVICE_TABLE(of, ls2x_rtc_of_match);
210
211 static struct platform_driver ls2x_rtc_driver = {
212 .probe = ls2x_rtc_probe,
213 .driver = {
214 .name = "ls2x-rtc",
> 215 .of_match_table = of_match_ptr(ls2x_rtc_of_match),
216 },
217 };
218
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 68068 bytes --]
next prev parent reply other threads:[~2021-05-05 23:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-05 16:38 [PATCH v2 0/6] rtc: ls2x: Add support for the Loongson-2K/LS7A RTC WANG Xuerui
2021-05-05 16:39 ` [PATCH v2 1/6] " WANG Xuerui
2021-05-05 21:56 ` kernel test robot
2021-05-05 23:19 ` kernel test robot [this message]
2021-05-06 0:13 ` WANG Xuerui
2021-05-05 16:39 ` [PATCH v2 2/6] dt-bindings: rtc: Add bindings for LS2X RTC WANG Xuerui
2021-05-05 16:39 ` [PATCH v2 3/6] MIPS: Loongson64: DTS: Add RTC support to LS7A WANG Xuerui
2021-05-05 16:39 ` [PATCH v2 4/6] MIPS: Loongson: Enable LS2X RTC in loongson3_defconfig WANG Xuerui
2021-05-05 16:39 ` [PATCH v2 5/6] MIPS: Loongson64: DTS: Add RTC support to Loongson-2K WANG Xuerui
2021-05-05 16:39 ` [PATCH v2 6/6] MIPS: Loongson: Enable LS2X RTC in loongson2k_defconfig WANG Xuerui
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=202105060721.hDorgbpl-lkp@intel.com \
--to=lkp@intel.com \
--cc=chenhuacai@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=git@xen0n.name \
--cc=kbuild-all@lists.01.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=yangtiezhu@loongson.cn \
/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).