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]
Message-ID: <201801221715.OdDnS1NF%fengguang.wu@intel.com>
Date:   Mon, 22 Jan 2018 17:30:05 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Ladislav Michl <ladis@...ux-mips.org>
Cc:     kbuild-all@...org, Bjorn Helgaas <bhelgaas@...gle.com>,
        Wei Yongjun <weiyongjun1@...wei.com>,
        linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
        Dmitry Torokhov <dmitry.torokhov@...il.com>
Subject: Re: [PATCH 1/5] devres: Move managed io function declarations into
 device.h

Hi Ladislav,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180119]
[also build test ERROR on v4.15-rc9]
[cannot apply to linus/master pci/next l2-mtd-boris/nand/next v4.15-rc8 v4.15-rc7 v4.15-rc6]
[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/Ladislav-Michl/Add-managed-ioremap-function-for-shared-resources/20180122-164512
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from include/linux/device.h:23:0,
                    from drivers/base/dd.c:19:
   include/linux/pinctrl/devinfo.h:48:44: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration
    static inline int pinctrl_bind_pins(struct device *dev)
                                               ^~~~~~
   include/linux/pinctrl/devinfo.h:53:44: warning: 'struct device' declared inside parameter list will not be visible outside of this definition or declaration
    static inline int pinctrl_init_done(struct device *dev)
                                               ^~~~~~
   drivers/base/dd.c: In function 'really_probe':
>> drivers/base/dd.c:394:26: error: passing argument 1 of 'pinctrl_bind_pins' from incompatible pointer type [-Werror=incompatible-pointer-types]
     ret = pinctrl_bind_pins(dev);
                             ^~~
   In file included from include/linux/device.h:23:0,
                    from drivers/base/dd.c:19:
   include/linux/pinctrl/devinfo.h:48:19: note: expected 'struct device *' but argument is of type 'struct device *'
    static inline int pinctrl_bind_pins(struct device *dev)
                      ^~~~~~~~~~~~~~~~~
>> drivers/base/dd.c:451:20: error: passing argument 1 of 'pinctrl_init_done' from incompatible pointer type [-Werror=incompatible-pointer-types]
     pinctrl_init_done(dev);
                       ^~~
   In file included from include/linux/device.h:23:0,
                    from drivers/base/dd.c:19:
   include/linux/pinctrl/devinfo.h:53:19: note: expected 'struct device *' but argument is of type 'struct device *'
    static inline int pinctrl_init_done(struct device *dev)
                      ^~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/pinctrl_bind_pins +394 drivers/base/dd.c

0ff26c662 Adrian Hunter      2017-11-02  360  
21c7f30b1 Cornelia Huck      2007-02-05  361  static int really_probe(struct device *dev, struct device_driver *drv)
07e4a3e27 Patrick Mochel     2005-03-21  362  {
013c074f8 Strashko, Grygorii 2015-11-10  363  	int ret = -EPROBE_DEFER;
58b116bce Grant Likely       2014-04-29  364  	int local_trigger_count = atomic_read(&deferred_trigger_count);
c5f062748 Rob Herring        2016-10-11  365  	bool test_remove = IS_ENABLED(CONFIG_DEBUG_TEST_DRIVER_REMOVE) &&
c5f062748 Rob Herring        2016-10-11  366  			   !drv->suppress_bind_attrs;
07e4a3e27 Patrick Mochel     2005-03-21  367  
013c074f8 Strashko, Grygorii 2015-11-10  368  	if (defer_all_probes) {
013c074f8 Strashko, Grygorii 2015-11-10  369  		/*
013c074f8 Strashko, Grygorii 2015-11-10  370  		 * Value of defer_all_probes can be set only by
013c074f8 Strashko, Grygorii 2015-11-10  371  		 * device_defer_all_probes_enable() which, in turn, will call
013c074f8 Strashko, Grygorii 2015-11-10  372  		 * wait_for_device_probe() right after that to avoid any races.
013c074f8 Strashko, Grygorii 2015-11-10  373  		 */
013c074f8 Strashko, Grygorii 2015-11-10  374  		dev_dbg(dev, "Driver %s force probe deferral\n", drv->name);
013c074f8 Strashko, Grygorii 2015-11-10  375  		driver_deferred_probe_add(dev);
013c074f8 Strashko, Grygorii 2015-11-10  376  		return ret;
013c074f8 Strashko, Grygorii 2015-11-10  377  	}
013c074f8 Strashko, Grygorii 2015-11-10  378  
9ed989537 Rafael J. Wysocki  2016-10-30  379  	ret = device_links_check_suppliers(dev);
0ff26c662 Adrian Hunter      2017-11-02  380  	if (ret == -EPROBE_DEFER)
0ff26c662 Adrian Hunter      2017-11-02  381  		driver_deferred_probe_add_trigger(dev, local_trigger_count);
9ed989537 Rafael J. Wysocki  2016-10-30  382  	if (ret)
9ed989537 Rafael J. Wysocki  2016-10-30  383  		return ret;
9ed989537 Rafael J. Wysocki  2016-10-30  384  
d779249ed Greg Kroah-Hartman 2006-07-18  385  	atomic_inc(&probe_count);
7dc72b284 Greg Kroah-Hartman 2007-11-28  386  	pr_debug("bus: '%s': %s: probing driver %s with device %s\n",
1e0b2cf93 Kay Sievers        2008-10-30  387  		 drv->bus->name, __func__, drv->name, dev_name(dev));
9ac7849e3 Tejun Heo          2007-01-20  388  	WARN_ON(!list_empty(&dev->devres_head));
07e4a3e27 Patrick Mochel     2005-03-21  389  
bea5b158f Rob Herring        2016-08-11  390  re_probe:
07e4a3e27 Patrick Mochel     2005-03-21  391  	dev->driver = drv;
ab78029ec Linus Walleij      2013-01-22  392  
ab78029ec Linus Walleij      2013-01-22  393  	/* If using pinctrl, bind pins now before probing */
ab78029ec Linus Walleij      2013-01-22 @394  	ret = pinctrl_bind_pins(dev);
ab78029ec Linus Walleij      2013-01-22  395  	if (ret)
14b6257a5 Andy Shevchenko    2015-12-04  396  		goto pinctrl_bind_failed;
ab78029ec Linus Walleij      2013-01-22  397  
09515ef5d Sricharan R        2017-04-10  398  	ret = dma_configure(dev);
09515ef5d Sricharan R        2017-04-10  399  	if (ret)
09515ef5d Sricharan R        2017-04-10  400  		goto dma_failed;
09515ef5d Sricharan R        2017-04-10  401  
1901fb260 Kay Sievers        2006-10-07  402  	if (driver_sysfs_add(dev)) {
1901fb260 Kay Sievers        2006-10-07  403  		printk(KERN_ERR "%s: driver_sysfs_add(%s) failed\n",
1e0b2cf93 Kay Sievers        2008-10-30  404  			__func__, dev_name(dev));
1901fb260 Kay Sievers        2006-10-07  405  		goto probe_failed;
1901fb260 Kay Sievers        2006-10-07  406  	}
1901fb260 Kay Sievers        2006-10-07  407  
e90d55327 Rafael J. Wysocki  2015-03-20  408  	if (dev->pm_domain && dev->pm_domain->activate) {
e90d55327 Rafael J. Wysocki  2015-03-20  409  		ret = dev->pm_domain->activate(dev);
e90d55327 Rafael J. Wysocki  2015-03-20  410  		if (ret)
e90d55327 Rafael J. Wysocki  2015-03-20  411  			goto probe_failed;
e90d55327 Rafael J. Wysocki  2015-03-20  412  	}
e90d55327 Rafael J. Wysocki  2015-03-20  413  
52cdbdd49 Grygorii Strashko  2015-07-27  414  	/*
52cdbdd49 Grygorii Strashko  2015-07-27  415  	 * Ensure devices are listed in devices_kset in correct order
52cdbdd49 Grygorii Strashko  2015-07-27  416  	 * It's important to move Dev to the end of devices_kset before
52cdbdd49 Grygorii Strashko  2015-07-27  417  	 * calling .probe, because it could be recursive and parent Dev
52cdbdd49 Grygorii Strashko  2015-07-27  418  	 * should always go first
52cdbdd49 Grygorii Strashko  2015-07-27  419  	 */
52cdbdd49 Grygorii Strashko  2015-07-27  420  	devices_kset_move_last(dev);
52cdbdd49 Grygorii Strashko  2015-07-27  421  
594c8281f Russell King       2006-01-05  422  	if (dev->bus->probe) {
594c8281f Russell King       2006-01-05  423  		ret = dev->bus->probe(dev);
1901fb260 Kay Sievers        2006-10-07  424  		if (ret)
d779249ed Greg Kroah-Hartman 2006-07-18  425  			goto probe_failed;
594c8281f Russell King       2006-01-05  426  	} else if (drv->probe) {
0d3e5a2e3 Patrick Mochel     2005-04-05  427  		ret = drv->probe(dev);
1901fb260 Kay Sievers        2006-10-07  428  		if (ret)
d779249ed Greg Kroah-Hartman 2006-07-18  429  			goto probe_failed;
07e4a3e27 Patrick Mochel     2005-03-21  430  	}
1901fb260 Kay Sievers        2006-10-07  431  
bea5b158f Rob Herring        2016-08-11  432  	if (test_remove) {
bea5b158f Rob Herring        2016-08-11  433  		test_remove = false;
bea5b158f Rob Herring        2016-08-11  434  
bdacd1b42 Rob Herring        2016-10-11  435  		if (dev->bus->remove)
bea5b158f Rob Herring        2016-08-11  436  			dev->bus->remove(dev);
bea5b158f Rob Herring        2016-08-11  437  		else if (drv->remove)
bea5b158f Rob Herring        2016-08-11  438  			drv->remove(dev);
bea5b158f Rob Herring        2016-08-11  439  
bea5b158f Rob Herring        2016-08-11  440  		devres_release_all(dev);
bea5b158f Rob Herring        2016-08-11  441  		driver_sysfs_remove(dev);
bea5b158f Rob Herring        2016-08-11  442  		dev->driver = NULL;
bea5b158f Rob Herring        2016-08-11  443  		dev_set_drvdata(dev, NULL);
bea5b158f Rob Herring        2016-08-11  444  		if (dev->pm_domain && dev->pm_domain->dismiss)
bea5b158f Rob Herring        2016-08-11  445  			dev->pm_domain->dismiss(dev);
bea5b158f Rob Herring        2016-08-11  446  		pm_runtime_reinit(dev);
bea5b158f Rob Herring        2016-08-11  447  
bea5b158f Rob Herring        2016-08-11  448  		goto re_probe;
bea5b158f Rob Herring        2016-08-11  449  	}
bea5b158f Rob Herring        2016-08-11  450  
ef0eebc05 Douglas Anderson   2015-10-20 @451  	pinctrl_init_done(dev);
ef0eebc05 Douglas Anderson   2015-10-20  452  
e90d55327 Rafael J. Wysocki  2015-03-20  453  	if (dev->pm_domain && dev->pm_domain->sync)
e90d55327 Rafael J. Wysocki  2015-03-20  454  		dev->pm_domain->sync(dev);
e90d55327 Rafael J. Wysocki  2015-03-20  455  
1901fb260 Kay Sievers        2006-10-07  456  	driver_bound(dev);
0d3e5a2e3 Patrick Mochel     2005-04-05  457  	ret = 1;
7dc72b284 Greg Kroah-Hartman 2007-11-28  458  	pr_debug("bus: '%s': %s: bound device %s to driver %s\n",
1e0b2cf93 Kay Sievers        2008-10-30  459  		 drv->bus->name, __func__, dev_name(dev), drv->name);
d779249ed Greg Kroah-Hartman 2006-07-18  460  	goto done;
2287c322b Patrick Mochel     2005-03-24  461  
d779249ed Greg Kroah-Hartman 2006-07-18  462  probe_failed:
09515ef5d Sricharan R        2017-04-10  463  	dma_deconfigure(dev);
09515ef5d Sricharan R        2017-04-10  464  dma_failed:
14b6257a5 Andy Shevchenko    2015-12-04  465  	if (dev->bus)
14b6257a5 Andy Shevchenko    2015-12-04  466  		blocking_notifier_call_chain(&dev->bus->p->bus_notifier,
14b6257a5 Andy Shevchenko    2015-12-04  467  					     BUS_NOTIFY_DRIVER_NOT_BOUND, dev);
14b6257a5 Andy Shevchenko    2015-12-04  468  pinctrl_bind_failed:
9ed989537 Rafael J. Wysocki  2016-10-30  469  	device_links_no_driver(dev);
9ac7849e3 Tejun Heo          2007-01-20  470  	devres_release_all(dev);
1901fb260 Kay Sievers        2006-10-07  471  	driver_sysfs_remove(dev);
1901fb260 Kay Sievers        2006-10-07  472  	dev->driver = NULL;
0998d0631 Hans de Goede      2012-05-23  473  	dev_set_drvdata(dev, NULL);
e90d55327 Rafael J. Wysocki  2015-03-20  474  	if (dev->pm_domain && dev->pm_domain->dismiss)
e90d55327 Rafael J. Wysocki  2015-03-20  475  		dev->pm_domain->dismiss(dev);
5de85b9d5 Ulf Hansson        2015-11-18  476  	pm_runtime_reinit(dev);
08810a411 Rafael J. Wysocki  2017-10-25  477  	dev_pm_set_driver_flags(dev, 0);
1901fb260 Kay Sievers        2006-10-07  478  
bb2b40754 Sergei Shtylyov    2015-01-17  479  	switch (ret) {
bb2b40754 Sergei Shtylyov    2015-01-17  480  	case -EPROBE_DEFER:
d1c3414c2 Grant Likely       2012-03-05  481  		/* Driver requested deferred probing */
13fcffbbd Mark Brown         2015-03-10  482  		dev_dbg(dev, "Driver %s requests probe deferral\n", drv->name);
0ff26c662 Adrian Hunter      2017-11-02  483  		driver_deferred_probe_add_trigger(dev, local_trigger_count);
bb2b40754 Sergei Shtylyov    2015-01-17  484  		break;
bb2b40754 Sergei Shtylyov    2015-01-17  485  	case -ENODEV:
bb2b40754 Sergei Shtylyov    2015-01-17  486  	case -ENXIO:
bb2b40754 Sergei Shtylyov    2015-01-17  487  		pr_debug("%s: probe of %s rejects match %d\n",
bb2b40754 Sergei Shtylyov    2015-01-17  488  			 drv->name, dev_name(dev), ret);
bb2b40754 Sergei Shtylyov    2015-01-17  489  		break;
bb2b40754 Sergei Shtylyov    2015-01-17  490  	default:
2287c322b Patrick Mochel     2005-03-24  491  		/* driver matched but the probe failed */
2287c322b Patrick Mochel     2005-03-24  492  		printk(KERN_WARNING
2287c322b Patrick Mochel     2005-03-24  493  		       "%s: probe of %s failed with error %d\n",
1e0b2cf93 Kay Sievers        2008-10-30  494  		       drv->name, dev_name(dev), ret);
2287c322b Patrick Mochel     2005-03-24  495  	}
c578abbc2 Cornelia Huck      2006-11-27  496  	/*
c578abbc2 Cornelia Huck      2006-11-27  497  	 * Ignore errors returned by ->probe so that the next driver can try
c578abbc2 Cornelia Huck      2006-11-27  498  	 * its luck.
c578abbc2 Cornelia Huck      2006-11-27  499  	 */
c578abbc2 Cornelia Huck      2006-11-27  500  	ret = 0;
d779249ed Greg Kroah-Hartman 2006-07-18  501  done:
d779249ed Greg Kroah-Hartman 2006-07-18  502  	atomic_dec(&probe_count);
735a7ffb7 Andrew Morton      2006-10-27  503  	wake_up(&probe_waitqueue);
d779249ed Greg Kroah-Hartman 2006-07-18  504  	return ret;
d779249ed Greg Kroah-Hartman 2006-07-18  505  }
d779249ed Greg Kroah-Hartman 2006-07-18  506  

:::::: The code at line 394 was first introduced by commit
:::::: ab78029ecc347debbd737f06688d788bd9d60c1d drivers/pinctrl: grab default handles from device core

:::::: TO: Linus Walleij <linus.walleij@...aro.org>
:::::: CC: Linus Walleij <linus.walleij@...aro.org>

---
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" (6704 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ