lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 7 Jul 2019 13:04:06 +0800
From:   kbuild test robot <lkp@...el.com>
To:     josua@...id-run.com
Cc:     kbuild-all@...org, netdev@...r.kernel.org,
        Josua Mayer <josua@...id-run.com>,
        "David S. Miller" <davem@...emloft.net>
Subject: Re: [PATCH 3/4] net: mvmdio: print warning when orion-mdio has too
 many clocks

Hi,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR 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@...el.com>

All errors (new ones prefixed by >>):

   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: In function 'orion_mdio_probe':
>> drivers/net/ethernet/marvell/mvmdio.c:330: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 +/_dev_warn +330 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 (IS_ERR(dev->clk[i]))
   325				break;
   326			clk_prepare_enable(dev->clk[i]);
   327		}
   328	
   329		if (!IS_ERR(of_clk_get(pdev->dev.of_node, i)))
 > 330			dev_warn(dev, "unsupported number of clocks, limiting to the first "
   331				 __stringify(ARRAY_SIZE(dev->clk)) "\n");
   332	
   333		dev->err_interrupt = platform_get_irq(pdev, 0);
   334		if (dev->err_interrupt > 0 &&
   335		    resource_size(r) < MVMDIO_ERR_INT_MASK + 4) {
   336			dev_err(&pdev->dev,
   337				"disabling interrupt, resource size is too small\n");
   338			dev->err_interrupt = 0;
   339		}
   340		if (dev->err_interrupt > 0) {
   341			ret = devm_request_irq(&pdev->dev, dev->err_interrupt,
   342						orion_mdio_err_irq,
   343						IRQF_SHARED, pdev->name, dev);
   344			if (ret)
   345				goto out_mdio;
   346	
   347			writel(MVMDIO_ERR_INT_SMI_DONE,
   348				dev->regs + MVMDIO_ERR_INT_MASK);
   349	
   350		} else if (dev->err_interrupt == -EPROBE_DEFER) {
   351			ret = -EPROBE_DEFER;
   352			goto out_mdio;
   353		}
   354	
   355		ret = of_mdiobus_register(bus, pdev->dev.of_node);
   356		if (ret < 0) {
   357			dev_err(&pdev->dev, "Cannot register MDIO bus (%d)\n", ret);
   358			goto out_mdio;
   359		}
   360	
   361		platform_set_drvdata(pdev, bus);
   362	
   363		return 0;
   364	
   365	out_mdio:
   366		if (dev->err_interrupt > 0)
   367			writel(0, dev->regs + MVMDIO_ERR_INT_MASK);
   368	
   369		for (i = 0; i < ARRAY_SIZE(dev->clk); i++) {
   370			if (IS_ERR(dev->clk[i]))
   371				break;
   372			clk_disable_unprepare(dev->clk[i]);
   373			clk_put(dev->clk[i]);
   374		}
   375	
   376		return ret;
   377	}
   378	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Download attachment ".config.gz" of type "application/gzip" (70930 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ