Re: [PATCH -next] USB: core: remove set but not used variable 'udev'

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

 



On Sat, 22 Sep 2018, YueHaibing wrote:

> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/usb/core/driver.c: In function 'usb_driver_claim_interface':
> drivers/usb/core/driver.c:513:21: warning:
>  variable 'udev' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: YueHaibing <yuehaibing@xxxxxxxxxx>
> ---
>  drivers/usb/core/driver.c | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c
> index a1f225f..5356438 100644
> --- a/drivers/usb/core/driver.c
> +++ b/drivers/usb/core/driver.c
> @@ -510,7 +510,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,
>  				struct usb_interface *iface, void *priv)
>  {
>  	struct device *dev;
> -	struct usb_device *udev;
>  	int retval = 0;
>  
>  	if (!iface)
> @@ -524,8 +523,6 @@ int usb_driver_claim_interface(struct usb_driver *driver,
>  	if (!iface->authorized)
>  		return -ENODEV;
>  
> -	udev = interface_to_usbdev(iface);
> -
>  	dev->driver = &driver->drvwrap.driver;
>  	usb_set_intfdata(iface, priv);
>  	iface->needs_binding = 0;

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux