2012-08-08 14:48:21

by Arnd Bergmann

[permalink] [raw]
Subject: [PATCH 03/11] usb/ohci-omap: remove unused variable

Commit c2e935a7d "USB: move transceiver from ehci_hcd and ohci_hcd to
hcd and rename it as phy" removed the last use of the "ohci" variable
in the usb_hcd_omap_remove function, but left the variable in place
unused.

Without this patch, building omap1_defconfig results in:

In file included from drivers/usb/host/ohci-hcd.c:1013:0:
drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Richard Zhao <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
---
drivers/usb/host/ohci-omap.c | 2 --
1 file changed, 2 deletions(-)

diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
index e7d75d2..f8b2d91 100644
--- a/drivers/usb/host/ohci-omap.c
+++ b/drivers/usb/host/ohci-omap.c
@@ -403,8 +403,6 @@ err0:
static inline void
usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
{
- struct ohci_hcd *ohci = hcd_to_ohci (hcd);
-
usb_remove_hcd(hcd);
if (!IS_ERR_OR_NULL(hcd->phy)) {
(void) otg_set_host(hcd->phy->otg, 0);
--
1.7.10


2012-08-08 15:25:58

by Greg Kroah-Hartman

[permalink] [raw]
Subject: Re: [PATCH 03/11] usb/ohci-omap: remove unused variable

On Wed, Aug 08, 2012 at 04:47:20PM +0200, Arnd Bergmann wrote:
> Commit c2e935a7d "USB: move transceiver from ehci_hcd and ohci_hcd to
> hcd and rename it as phy" removed the last use of the "ohci" variable
> in the usb_hcd_omap_remove function, but left the variable in place
> unused.
>
> Without this patch, building omap1_defconfig results in:
>
> In file included from drivers/usb/host/ohci-hcd.c:1013:0:
> drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
> drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Richard Zhao <[email protected]>
> Cc: Alan Stern <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>

Acked-by: Greg Kroah-Hartman <[email protected]>

2012-08-08 15:34:53

by Alan Stern

[permalink] [raw]
Subject: Re: [PATCH 03/11] usb/ohci-omap: remove unused variable

On Wed, 8 Aug 2012, Arnd Bergmann wrote:

> Commit c2e935a7d "USB: move transceiver from ehci_hcd and ohci_hcd to
> hcd and rename it as phy" removed the last use of the "ohci" variable
> in the usb_hcd_omap_remove function, but left the variable in place
> unused.
>
> Without this patch, building omap1_defconfig results in:
>
> In file included from drivers/usb/host/ohci-hcd.c:1013:0:
> drivers/usb/host/ohci-omap.c: In function 'usb_hcd_omap_remove':
> drivers/usb/host/ohci-omap.c:406:19: warning: unused variable 'ohci' [-Wunused-variable]
>
> Signed-off-by: Arnd Bergmann <[email protected]>
> Cc: Richard Zhao <[email protected]>
> Cc: Alan Stern <[email protected]>
> Cc: Greg Kroah-Hartman <[email protected]>
> ---
> drivers/usb/host/ohci-omap.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c
> index e7d75d2..f8b2d91 100644
> --- a/drivers/usb/host/ohci-omap.c
> +++ b/drivers/usb/host/ohci-omap.c
> @@ -403,8 +403,6 @@ err0:
> static inline void
> usb_hcd_omap_remove (struct usb_hcd *hcd, struct platform_device *pdev)
> {
> - struct ohci_hcd *ohci = hcd_to_ohci (hcd);
> -
> usb_remove_hcd(hcd);
> if (!IS_ERR_OR_NULL(hcd->phy)) {
> (void) otg_set_host(hcd->phy->otg, 0);
>

Acked-by: Alan Stern <[email protected]>