diff mbox series

usb: gadget: s3c: Remove unused 'udc' variable

Message ID 20200731074122.6484-1-krzk@kernel.org (mailing list archive)
State Accepted
Commit de56298f78e449e9490a8621d3bd80a04ad40e6d
Headers show
Series usb: gadget: s3c: Remove unused 'udc' variable | expand

Commit Message

Krzysztof Kozlowski July 31, 2020, 7:41 a.m. UTC
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 <krzk@kernel.org>
---
 drivers/usb/gadget/udc/s3c2410_udc.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Nathan Chancellor July 31, 2020, 6:38 p.m. UTC | #1
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 <krzk@kernel.org>

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

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
>  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
>
Krzysztof Kozlowski Aug. 19, 2020, 7:11 p.m. UTC | #2
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 <krzk@kernel.org>
> ---
>  drivers/usb/gadget/udc/s3c2410_udc.c | 3 ---

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

Best regards,
Krzysztof
diff mbox series

Patch

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) {