devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Matthias Kaehlcke <mka@chromium.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Frank Rowand <frowand.list@gmail.com>
Cc: kbuild-all@lists.01.org, devicetree@vger.kernel.org,
	Peter Chen <peter.chen@nxp.com>,
	Stephen Boyd <swboyd@chromium.org>,
	Alan Stern <stern@rowland.harvard.edu>,
	Ravi Chandra Sadineni <ravisadineni@chromium.org>,
	Bastien Nocera <hadess@hadess.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5 2/4] USB: misc: Add onboard_usb_hub driver
Date: Thu, 11 Feb 2021 02:53:57 +0800	[thread overview]
Message-ID: <202102110208.xEHgy2aY-lkp@intel.com> (raw)
In-Reply-To: <20210210091015.v5.2.I7c9a1f1d6ced41dd8310e8a03da666a32364e790@changeid>

[-- Attachment #1: Type: text/plain, Size: 5175 bytes --]

Hi Matthias,

I love your patch! Perhaps something to improve:

[auto build test WARNING on usb/usb-testing]
[also build test WARNING on robh/for-next char-misc/char-misc-testing v5.11-rc7 next-20210125]
[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/Matthias-Kaehlcke/USB-misc-Add-onboard_usb_hub-driver/20210211-011551
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-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/15c43f13a680dab0efc2816a9d632d9d6482b6fc
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Matthias-Kaehlcke/USB-misc-Add-onboard_usb_hub-driver/20210211-011551
        git checkout 15c43f13a680dab0efc2816a9d632d9d6482b6fc
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=sh 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All warnings (new ones prefixed by >>):

>> drivers/usb/misc/onboard_usb_hub.c:277:6: warning: no previous prototype for 'of_is_onboard_usb_hub' [-Wmissing-prototypes]
     277 | bool of_is_onboard_usb_hub(const struct device_node *np)
         |      ^~~~~~~~~~~~~~~~~~~~~
   drivers/usb/misc/onboard_usb_hub.c: In function 'onboard_hub_probe':
>> drivers/usb/misc/onboard_usb_hub.c:234:8: warning: ignoring return value of 'driver_attach', declared with attribute warn_unused_result [-Wunused-result]
     234 |  (void)driver_attach(&onboard_hub_usbdev_driver.drvwrap.driver);
         |        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for SND_ATMEL_SOC_PDC
   Depends on SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && HAS_DMA
   Selected by
   - SND_ATMEL_SOC_SSC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC
   - SND_ATMEL_SOC_SSC_PDC && SOUND && !UML && SND && SND_SOC && SND_ATMEL_SOC && ATMEL_SSC


vim +/of_is_onboard_usb_hub +277 drivers/usb/misc/onboard_usb_hub.c

   199	
   200	static int onboard_hub_probe(struct platform_device *pdev)
   201	{
   202		struct device *dev = &pdev->dev;
   203		struct onboard_hub *hub;
   204		int err;
   205	
   206		hub = devm_kzalloc(dev, sizeof(*hub), GFP_KERNEL);
   207		if (!hub)
   208			return -ENOMEM;
   209	
   210		hub->vdd = devm_regulator_get(dev, "vdd");
   211		if (IS_ERR(hub->vdd))
   212			return PTR_ERR(hub->vdd);
   213	
   214		hub->dev = dev;
   215		mutex_init(&hub->lock);
   216		INIT_LIST_HEAD(&hub->udev_list);
   217	
   218		dev_set_drvdata(dev, hub);
   219	
   220		err = devm_device_add_group(dev, &onboard_hub_sysfs_group);
   221		if (err) {
   222			dev_err(dev, "failed to create sysfs entries: %d\n", err);
   223			return err;
   224		}
   225	
   226		err = onboard_hub_power_on(hub);
   227		if (err)
   228			return err;
   229	
   230		/*
   231		 * The USB driver might have been detached from the USB devices by
   232		 * onboard_hub_remove() make sure to re-attach it if needed.
   233		 */
 > 234		(void)driver_attach(&onboard_hub_usbdev_driver.drvwrap.driver);
   235	
   236		return 0;
   237	}
   238	
   239	static int onboard_hub_remove(struct platform_device *pdev)
   240	{
   241		struct onboard_hub *hub = dev_get_drvdata(&pdev->dev);
   242		struct udev_node *node;
   243		struct usb_device *udev;
   244	
   245		hub->going_away = true;
   246	
   247		mutex_lock(&hub->lock);
   248	
   249		/* unbind the USB devices to avoid dangling references to this device */
   250		while (!list_empty(&hub->udev_list)) {
   251			node = list_first_entry(&hub->udev_list, struct udev_node, list);
   252			udev = node->udev;
   253	
   254			/*
   255			 * Unbinding the driver will call onboard_hub_remove_usbdev(),
   256			 * which acquires hub->lock.  We must release the lock first.
   257			 */
   258			get_device(&udev->dev);
   259			mutex_unlock(&hub->lock);
   260			device_release_driver(&udev->dev);
   261			put_device(&udev->dev);
   262			mutex_lock(&hub->lock);
   263		}
   264	
   265		mutex_unlock(&hub->lock);
   266	
   267		return onboard_hub_power_off(hub);
   268	}
   269	
   270	static const struct of_device_id onboard_hub_match[] = {
   271		{ .compatible = "usbbda,411" },
   272		{ .compatible = "usbbda,5411" },
   273		{}
   274	};
   275	MODULE_DEVICE_TABLE(of, onboard_hub_match);
   276	
 > 277	bool of_is_onboard_usb_hub(const struct device_node *np)
   278	{
   279		return !!of_match_node(onboard_hub_match, np);
   280	}
   281	EXPORT_SYMBOL_GPL(of_is_onboard_usb_hub);
   282	

---
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: 53972 bytes --]

  reply	other threads:[~2021-02-10 18:57 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10 17:10 [PATCH v5 0/4] USB: misc: Add onboard_usb_hub driver Matthias Kaehlcke
2021-02-10 17:10 ` [PATCH v5 1/4] dt-bindings: usb: Add binding for discrete onboard USB hubs Matthias Kaehlcke
2021-02-11 14:56   ` Rob Herring
2021-02-17 21:04   ` Rob Herring
2021-02-18  1:33     ` Matthias Kaehlcke
2021-02-19 15:05       ` Rob Herring
2021-02-22 17:39         ` Matthias Kaehlcke
2021-02-10 17:10 ` [PATCH v5 2/4] USB: misc: Add onboard_usb_hub driver Matthias Kaehlcke
2021-02-10 18:53   ` kernel test robot [this message]
2021-02-11  7:03   ` Greg Kroah-Hartman
2021-02-11 18:04     ` Matthias Kaehlcke
2021-02-10 17:10 ` [PATCH v5 3/4] usb: host: xhci-plat: Create platform device for onboard hubs in probe() Matthias Kaehlcke
2021-02-10 21:06   ` Krzysztof Kozlowski
2021-02-10 22:20     ` Matthias Kaehlcke
2021-02-11 19:14       ` Stephen Boyd
2021-02-11 20:36         ` Matthias Kaehlcke
2021-02-11 20:45           ` Stephen Boyd
2021-02-11 22:46             ` Rob Herring
2021-02-11 22:40         ` Rob Herring
2021-02-11  1:30   ` kernel test robot
2021-02-11  1:33   ` kernel test robot
2021-02-11  6:58   ` Greg Kroah-Hartman
2021-02-11 18:45     ` Matthias Kaehlcke
2021-02-11 19:01       ` Matthias Kaehlcke
2021-02-10 17:10 ` [PATCH v5 4/4] arm64: dts: qcom: sc7180-trogdor: Add nodes for onboard USB hub Matthias Kaehlcke
2021-02-10 21:04 ` [PATCH v5 0/4] USB: misc: Add onboard_usb_hub driver Krzysztof Kozlowski
2021-02-10 22:37   ` Matthias Kaehlcke
2021-02-24 13:25 ` Michal Simek

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=202102110208.xEHgy2aY-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=devicetree@vger.kernel.org \
    --cc=frowand.list@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hadess@hadess.net \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=peter.chen@nxp.com \
    --cc=ravisadineni@chromium.org \
    --cc=robh+dt@kernel.org \
    --cc=stern@rowland.harvard.edu \
    --cc=swboyd@chromium.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 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).