Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] usb: gadget: s3c: Remove unused 'udc' variable
@ 2020-07-31  7:41 Krzysztof Kozlowski
  2020-07-31 18:38 ` Nathan Chancellor
  0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Kozlowski @ 2020-07-31  7:41 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman, Gustavo A. R. Silva,
	Chunfeng Yun, Nathan Chancellor, Krzysztof Kozlowski, linux-usb,
	linux-kernel

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

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: gadget: s3c: Remove unused 'udc' variable
  2020-07-31  7:41 [PATCH] usb: gadget: s3c: Remove unused 'udc' variable Krzysztof Kozlowski
@ 2020-07-31 18:38 ` Nathan Chancellor
  0 siblings, 0 replies; 2+ messages in thread
From: Nathan Chancellor @ 2020-07-31 18:38 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Felipe Balbi, Greg Kroah-Hartman, Gustavo A. R. Silva,
	Chunfeng Yun, linux-usb, linux-kernel

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
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-31  7:41 [PATCH] usb: gadget: s3c: Remove unused 'udc' variable Krzysztof Kozlowski
2020-07-31 18:38 ` Nathan Chancellor

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git