From: kbuild test robot <lkp@intel.com>
To: josua@solid-run.com
Cc: kbuild-all@01.org, netdev@vger.kernel.org,
Josua Mayer <josua@solid-run.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 4/4] net: mvmdio: defer probe of orion-mdio if a clock is not ready
Date: Sun, 7 Jul 2019 13:21:30 +0800 [thread overview]
Message-ID: <201907071323.DJuUlAXP%lkp@intel.com> (raw)
In-Reply-To: <20190706151900.14355-5-josua@solid-run.com>
[-- Attachment #1: Type: text/plain, Size: 6091 bytes --]
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.2-rc7 next-20190705]
[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/josua-solid-run-com/Fix-hang-of-Armada-8040-SoC-in-orion-mdio/20190707-111919
config: arm-allmodconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.4.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.4.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/marvell/mvmdio.c: In function 'orion_mdio_probe':
>> drivers/net/ethernet/marvell/mvmdio.c:324:30: warning: passing argument 1 of 'PTR_ERR' makes pointer from integer without a cast [-Wint-conversion]
if (dev->clk[i] == PTR_ERR(-EPROBE_DEFER)) {
^
In file included from include/linux/clk.h:12:0,
from drivers/net/ethernet/marvell/mvmdio.c:20:
include/linux/err.h:29:33: note: expected 'const void *' but argument is of type 'int'
static inline long __must_check PTR_ERR(__force const void *ptr)
^~~~~~~
>> drivers/net/ethernet/marvell/mvmdio.c:324:19: warning: comparison between pointer and integer
if (dev->clk[i] == PTR_ERR(-EPROBE_DEFER)) {
^~
In file included from include/linux/node.h:18:0,
from include/linux/cpu.h:17,
from include/linux/of_device.h:5,
from drivers/net/ethernet/marvell/mvmdio.c:26:
drivers/net/ethernet/marvell/mvmdio.c:334:12: error: passing argument 1 of '_dev_warn' from incompatible pointer type [-Werror=incompatible-pointer-types]
dev_warn(dev, "unsupported number of clocks, limiting to the first "
^
include/linux/device.h:1487:12: note: in definition of macro 'dev_warn'
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~
include/linux/device.h:1425:6: note: expected 'const struct device *' but argument is of type 'struct orion_mdio_dev *'
void _dev_warn(const struct device *dev, const char *fmt, ...);
^~~~~~~~~
cc1: some warnings being treated as errors
vim +/PTR_ERR +324 drivers/net/ethernet/marvell/mvmdio.c
275
276 static int orion_mdio_probe(struct platform_device *pdev)
277 {
278 enum orion_mdio_bus_type type;
279 struct resource *r;
280 struct mii_bus *bus;
281 struct orion_mdio_dev *dev;
282 int i, ret;
283
284 type = (enum orion_mdio_bus_type)of_device_get_match_data(&pdev->dev);
285
286 r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
287 if (!r) {
288 dev_err(&pdev->dev, "No SMI register address given\n");
289 return -ENODEV;
290 }
291
292 bus = devm_mdiobus_alloc_size(&pdev->dev,
293 sizeof(struct orion_mdio_dev));
294 if (!bus)
295 return -ENOMEM;
296
297 switch (type) {
298 case BUS_TYPE_SMI:
299 bus->read = orion_mdio_smi_read;
300 bus->write = orion_mdio_smi_write;
301 break;
302 case BUS_TYPE_XSMI:
303 bus->read = orion_mdio_xsmi_read;
304 bus->write = orion_mdio_xsmi_write;
305 break;
306 }
307
308 bus->name = "orion_mdio_bus";
309 snprintf(bus->id, MII_BUS_ID_SIZE, "%s-mii",
310 dev_name(&pdev->dev));
311 bus->parent = &pdev->dev;
312
313 dev = bus->priv;
314 dev->regs = devm_ioremap(&pdev->dev, r->start, resource_size(r));
315 if (!dev->regs) {
316 dev_err(&pdev->dev, "Unable to remap SMI register\n");
317 return -ENODEV;
318 }
319
320 init_waitqueue_head(&dev->smi_busy_wait);
321
322 for (i = 0; i < ARRAY_SIZE(dev->clk); i++) {
323 dev->clk[i] = of_clk_get(pdev->dev.of_node, i);
> 324 if (dev->clk[i] == PTR_ERR(-EPROBE_DEFER)) {
325 ret = -EPROBE_DEFER;
326 goto out_clk;
327 }
328 if (IS_ERR(dev->clk[i]))
329 break;
330 clk_prepare_enable(dev->clk[i]);
331 }
332
333 if (!IS_ERR(of_clk_get(pdev->dev.of_node, i)))
334 dev_warn(dev, "unsupported number of clocks, limiting to the first "
335 __stringify(ARRAY_SIZE(dev->clk)) "\n");
336
337 dev->err_interrupt = platform_get_irq(pdev, 0);
338 if (dev->err_interrupt > 0 &&
339 resource_size(r) < MVMDIO_ERR_INT_MASK + 4) {
340 dev_err(&pdev->dev,
341 "disabling interrupt, resource size is too small\n");
342 dev->err_interrupt = 0;
343 }
344 if (dev->err_interrupt > 0) {
345 ret = devm_request_irq(&pdev->dev, dev->err_interrupt,
346 orion_mdio_err_irq,
347 IRQF_SHARED, pdev->name, dev);
348 if (ret)
349 goto out_mdio;
350
351 writel(MVMDIO_ERR_INT_SMI_DONE,
352 dev->regs + MVMDIO_ERR_INT_MASK);
353
354 } else if (dev->err_interrupt == -EPROBE_DEFER) {
355 ret = -EPROBE_DEFER;
356 goto out_mdio;
357 }
358
359 ret = of_mdiobus_register(bus, pdev->dev.of_node);
360 if (ret < 0) {
361 dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret);
362 goto out_mdio;
363 }
364
365 platform_set_drvdata(pdev, bus);
366
367 return 0;
368
369 out_mdio:
370 if (dev->err_interrupt > 0)
371 writel(0, dev->regs + MVMDIO_ERR_INT_MASK);
372
373 out_clk:
374 for (i = 0; i < ARRAY_SIZE(dev->clk); i++) {
375 if (IS_ERR(dev->clk[i]))
376 break;
377 clk_disable_unprepare(dev->clk[i]);
378 clk_put(dev->clk[i]);
379 }
380
381 return ret;
382 }
383
---
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: 70930 bytes --]
next prev parent reply other threads:[~2019-07-07 5:28 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-06 15:18 [PATCH 0/4] Fix hang of Armada 8040 SoC in orion-mdio josua
2019-07-06 15:18 ` [PATCH 1/4] dt-bindings: allow up to four clocks for orion-mdio josua
2019-07-06 15:47 ` Andrew Lunn
2019-07-09 1:32 ` Rob Herring
2019-07-09 2:41 ` Andrew Lunn
2019-07-09 22:03 ` Rob Herring
2019-07-18 1:31 ` Andrew Lunn
2019-07-06 15:18 ` [PATCH 2/4] net: mvmdio: allow up to four clocks to be specified " josua
2019-07-06 15:47 ` Andrew Lunn
2019-07-06 15:18 ` [PATCH 3/4] net: mvmdio: print warning when orion-mdio has too many clocks josua
2019-07-06 16:09 ` Andrew Lunn
2019-07-06 16:21 ` Josua Mayer
2019-07-07 5:04 ` kbuild test robot
2019-07-06 15:19 ` [PATCH 4/4] net: mvmdio: defer probe of orion-mdio if a clock is not ready josua
2019-07-06 15:54 ` Andrew Lunn
2019-07-07 5:21 ` kbuild test robot [this message]
2019-07-09 13:00 ` [PATCH v2 0/4] Fix hang of Armada 8040 SoC in orion-mdio josua
2019-07-09 13:00 ` [PATCH v2 1/4] dt-bindings: allow up to four clocks for orion-mdio josua
2019-07-09 22:07 ` Rob Herring
2019-07-09 13:00 ` [PATCH v2 2/4] net: mvmdio: allow up to four clocks to be specified " josua
2019-07-09 13:01 ` [PATCH v2 3/4] net: mvmdio: print warning when orion-mdio has too many clocks josua
2019-07-09 13:14 ` Andrew Lunn
2019-07-09 13:01 ` [PATCH v2 4/4] net: mvmdio: defer probe of orion-mdio if a clock is not ready josua
2019-07-09 13:15 ` Andrew Lunn
2019-07-09 20:03 ` [PATCH v2 0/4] Fix hang of Armada 8040 SoC in orion-mdio David Miller
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=201907071323.DJuUlAXP%lkp@intel.com \
--to=lkp@intel.com \
--cc=davem@davemloft.net \
--cc=josua@solid-run.com \
--cc=kbuild-all@01.org \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.