Re: [PATCH v3 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub (fwd)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2018-01-24 at 11:38 +0100, Julia Lawall wrote:
> Hello,
> 
> I can't tell from looking at the code whether the missing unlock when
> !d->wakeup_en is intentional.

It's a bug. I'll fix it. Thanks.

> It may also be worth checking the report on line 359 about the comparison
> with the unsigned value.

Ah right, fixed that too.

Thanks !

Ben.
> 

> julia
> 
> ---------- Forwarded message ----------
> Date: Wed, 24 Jan 2018 09:09:59 +0800
> From: kbuild test robot <fengguang.wu@xxxxxxxxx>
> To: kbuild@xxxxxx
> Cc: Julia Lawall <julia.lawall@xxxxxxx>
> Subject: Re: [PATCH v3 2/2] usb/gadget: Add driver for Aspeed SoC virtual hub
> 
> CC: kbuild-all@xxxxxx
> In-Reply-To: <20180122222716.7039-2-benh@xxxxxxxxxxxxxxxxxxx>
> References: <20180122222716.7039-2-benh@xxxxxxxxxxxxxxxxxxx>
> TO: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> CC: linux-usb@xxxxxxxxxxxxxxx
> CC: Greg KH <greg@xxxxxxxxx>, Joel Stanley <joel.stanley@xxxxxxxxxxx>, Andrew Jeffery <andrew@xxxxxxxx>, Felipe Balbi <balbi@xxxxxxxxxx>, Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
> 
> Hi Benjamin,
> 
> I love your patch! Perhaps something to improve:
> 
> [auto build test WARNING on balbi-usb/next]
> [also build test WARNING on v4.15-rc9 next-20180119]
> [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/Benjamin-Herrenschmidt/usb-gadget-Add-an-EP-dispose-callback-for-EP-lifetime-tracking/20180124-065635
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git next
> :::::: branch date: 2 hours ago
> :::::: commit date: 2 hours ago
> 
> > > drivers/usb/gadget/udc/aspeed-vhub/dev.c:269:1-7: preceding lock on line 257
> 
> --
> > > drivers/usb/gadget/udc/aspeed-vhub/core.c:359:5-14: WARNING: Unsigned expression compared with zero: vhub -> irq < 0
> 
> # https://github.com/0day-ci/linux/commit/7d6ae8cb6c74a0113a1d122c34158d782d0edb59
> git remote add linux-review https://github.com/0day-ci/linux
> git remote update linux-review
> git checkout 7d6ae8cb6c74a0113a1d122c34158d782d0edb59
> vim +269 drivers/usb/gadget/udc/aspeed-vhub/dev.c
> 
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  250
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  251  static int ast_vhub_udc_wakeup(struct usb_gadget* gadget)
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  252  {
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  253  	struct ast_vhub_dev *d = to_ast_dev(gadget);
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  254  	unsigned long flags;
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  255  	int rc = -EINVAL;
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  256
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23 @257  	spin_lock_irqsave(&d->vhub->lock, flags);
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  258  	if (!d->wakeup_en)
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  259  		goto err;
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  260
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  261  	DDBG(d, "Device initiated wakeup\n");
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  262
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  263  	/* Wakeup the host */
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  264  	ast_vhub_hub_wake_all(d->vhub);
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  265
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  266  	spin_unlock_irqrestore(&d->vhub->lock, flags);
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  267  	rc = 0;
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  268   err:
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23 @269  	return rc;
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  270  }
> 7d6ae8cb Benjamin Herrenschmidt 2018-01-23  271
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux