* [PATCH -next] USB: core: remove set but not used variable 'udev'
@ 2018-09-22 6:31 YueHaibing
2018-09-24 14:10 ` Alan Stern
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: YueHaibing @ 2018-09-22 6:31 UTC (permalink / raw)
To: Greg Kroah-Hartman, Daniel Drake, Joe Perches, Alan Stern,
Mathias Nyman, Felipe Balbi, Martin Liu
Cc: YueHaibing, linux-usb, kernel-janitors
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@huawei.com>
---
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;
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH -next] USB: core: remove set but not used variable 'udev'
2018-09-22 6:31 [PATCH -next] USB: core: remove set but not used variable 'udev' YueHaibing
@ 2018-09-24 14:10 ` Alan Stern
2018-09-28 13:10 ` Greg Kroah-Hartman
2018-09-28 20:35 ` Alan Stern
2 siblings, 0 replies; 4+ messages in thread
From: Alan Stern @ 2018-09-24 14:10 UTC (permalink / raw)
To: YueHaibing
Cc: Greg Kroah-Hartman, Daniel Drake, Joe Perches, Mathias Nyman,
Felipe Balbi, Martin Liu, linux-usb, kernel-janitors
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@huawei.com>
> ---
> 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@rowland.harvard.edu>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH -next] USB: core: remove set but not used variable 'udev'
2018-09-22 6:31 [PATCH -next] USB: core: remove set but not used variable 'udev' YueHaibing
2018-09-24 14:10 ` Alan Stern
@ 2018-09-28 13:10 ` Greg Kroah-Hartman
2018-09-28 20:35 ` Alan Stern
2 siblings, 0 replies; 4+ messages in thread
From: Greg Kroah-Hartman @ 2018-09-28 13:10 UTC (permalink / raw)
To: YueHaibing
Cc: Daniel Drake, Joe Perches, Alan Stern, Mathias Nyman,
Felipe Balbi, Martin Liu, linux-usb, kernel-janitors
On Sat, Sep 22, 2018 at 06:31:26AM +0000, 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@huawei.com>
> Acked-by: Alan Stern <stern@rowland.harvard.edu>
> ---
> drivers/usb/core/driver.c | 3 ---
> 1 file changed, 3 deletions(-)
This patch breaks the build, which is not ok :(
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH -next] USB: core: remove set but not used variable 'udev'
2018-09-22 6:31 [PATCH -next] USB: core: remove set but not used variable 'udev' YueHaibing
2018-09-24 14:10 ` Alan Stern
2018-09-28 13:10 ` Greg Kroah-Hartman
@ 2018-09-28 20:35 ` Alan Stern
2 siblings, 0 replies; 4+ messages in thread
From: Alan Stern @ 2018-09-28 20:35 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: YueHaibing, Daniel Drake, Joe Perches, Mathias Nyman,
Felipe Balbi, Martin Liu, linux-usb, kernel-janitors
On Fri, 28 Sep 2018, Greg Kroah-Hartman wrote:
> On Sat, Sep 22, 2018 at 06:31:26AM +0000, 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@huawei.com>
> > Acked-by: Alan Stern <stern@rowland.harvard.edu>
> > ---
> > drivers/usb/core/driver.c | 3 ---
> > 1 file changed, 3 deletions(-)
>
> This patch breaks the build, which is not ok :(
Are you sure you applied it to the right branch? It requires commit
c183813fcee44a24 ("USB: remove LPM management from
usb_driver_claim_interface()"). Probably the tags should mention this.
Alan Stern
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-09-28 20:35 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-22 6:31 [PATCH -next] USB: core: remove set but not used variable 'udev' YueHaibing
2018-09-24 14:10 ` Alan Stern
2018-09-28 13:10 ` Greg Kroah-Hartman
2018-09-28 20:35 ` Alan Stern
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox