2020-07-31 07:42:23

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH] usb: gadget: s3c: Remove unused 'udc' variable

Remove unused 'udc' variable to fix compile warnings:

drivers/usb/gadget/udc/s3c2410_udc.c: In function 's3c2410_udc_dequeue':
drivers/usb/gadget/udc/s3c2410_udc.c:1268:22: warning: variable 'udc' set but not used [-Wunused-but-set-variable]

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/usb/gadget/udc/s3c2410_udc.c | 3 ---
1 file changed, 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
index bc2e8eb737c3..e875a0b967c0 100644
--- a/drivers/usb/gadget/udc/s3c2410_udc.c
+++ b/drivers/usb/gadget/udc/s3c2410_udc.c
@@ -1270,7 +1270,6 @@ static int s3c2410_udc_queue(struct usb_ep *_ep, struct usb_request *_req,
static int s3c2410_udc_dequeue(struct usb_ep *_ep, struct usb_request *_req)
{
struct s3c2410_ep *ep = to_s3c2410_ep(_ep);
- struct s3c2410_udc *udc;
int retval = -EINVAL;
unsigned long flags;
struct s3c2410_request *req = NULL;
@@ -1283,8 +1282,6 @@ static int s3c2410_udc_dequeue(struct usb_ep *_ep, struct usb_request *_req)
if (!_ep || !_req)
return retval;

- udc = to_s3c2410_udc(ep->gadget);
-
local_irq_save(flags);

list_for_each_entry(req, &ep->queue, queue) {
--
2.17.1


2020-07-31 18:40:45

by Nathan Chancellor

[permalink] [raw]
Subject: Re: [PATCH] usb: gadget: s3c: Remove unused 'udc' variable

On Fri, Jul 31, 2020 at 09:41:22AM +0200, Krzysztof Kozlowski wrote:
> Remove unused 'udc' variable to fix compile warnings:
>
> drivers/usb/gadget/udc/s3c2410_udc.c: In function 's3c2410_udc_dequeue':
> drivers/usb/gadget/udc/s3c2410_udc.c:1268:22: warning: variable 'udc' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Weird, looks like it has been unused since the introduction of the
driver.

Reviewed-by: Nathan Chancellor <[email protected]>

> ---
> drivers/usb/gadget/udc/s3c2410_udc.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/usb/gadget/udc/s3c2410_udc.c b/drivers/usb/gadget/udc/s3c2410_udc.c
> index bc2e8eb737c3..e875a0b967c0 100644
> --- a/drivers/usb/gadget/udc/s3c2410_udc.c
> +++ b/drivers/usb/gadget/udc/s3c2410_udc.c
> @@ -1270,7 +1270,6 @@ static int s3c2410_udc_queue(struct usb_ep *_ep, struct usb_request *_req,
> static int s3c2410_udc_dequeue(struct usb_ep *_ep, struct usb_request *_req)
> {
> struct s3c2410_ep *ep = to_s3c2410_ep(_ep);
> - struct s3c2410_udc *udc;
> int retval = -EINVAL;
> unsigned long flags;
> struct s3c2410_request *req = NULL;
> @@ -1283,8 +1282,6 @@ static int s3c2410_udc_dequeue(struct usb_ep *_ep, struct usb_request *_req)
> if (!_ep || !_req)
> return retval;
>
> - udc = to_s3c2410_udc(ep->gadget);
> -
> local_irq_save(flags);
>
> list_for_each_entry(req, &ep->queue, queue) {
> --
> 2.17.1
>

2020-08-19 19:15:06

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH] usb: gadget: s3c: Remove unused 'udc' variable

On Fri, Jul 31, 2020 at 09:41:22AM +0200, Krzysztof Kozlowski wrote:
> Remove unused 'udc' variable to fix compile warnings:
>
> drivers/usb/gadget/udc/s3c2410_udc.c: In function 's3c2410_udc_dequeue':
> drivers/usb/gadget/udc/s3c2410_udc.c:1268:22: warning: variable 'udc' set but not used [-Wunused-but-set-variable]
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> drivers/usb/gadget/udc/s3c2410_udc.c | 3 ---

Applied along with other mach-s3c (and related usb) cleanups to
samsung-soc.

Best regards,
Krzysztof