diff mbox

usb: usbip: remove redundant pointer ep

Message ID 20180713104501.11482-1-colin.king@canonical.com (mailing list archive)
State New, archived
Headers show

Commit Message

Colin King July 13, 2018, 10:45 a.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Pointer ep is being assigned but is never used hence it is
redundant and can be removed.

Cleans up clang warning:
warning: variable 'ep' set but not used [-Wunused-but-set-variable]

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/usb/usbip/vudc_dev.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Shuah July 24, 2018, 4:42 p.m. UTC | #1
On 07/13/2018 04:45 AM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> Pointer ep is being assigned but is never used hence it is
> redundant and can be removed.
> 
> Cleans up clang warning:
> warning: variable 'ep' set but not used [-Wunused-but-set-variable]
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/usb/usbip/vudc_dev.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
> index 1b9a4f87db59..1634d8698e15 100644
> --- a/drivers/usb/usbip/vudc_dev.c
> +++ b/drivers/usb/usbip/vudc_dev.c
> @@ -279,12 +279,10 @@ static int vep_disable(struct usb_ep *_ep)
>  static struct usb_request *vep_alloc_request(struct usb_ep *_ep,
>  		gfp_t mem_flags)
>  {
> -	struct vep *ep;
>  	struct vrequest *req;
>  
>  	if (!_ep)
>  		return NULL;
> -	ep = to_vep(_ep);
>  
>  	req = kzalloc(sizeof(*req), mem_flags);
>  	if (!req)
> 

Thanks for the patch. Looks good to me.

Acked-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>

thanks,
-- Shuah
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/usb/usbip/vudc_dev.c b/drivers/usb/usbip/vudc_dev.c
index 1b9a4f87db59..1634d8698e15 100644
--- a/drivers/usb/usbip/vudc_dev.c
+++ b/drivers/usb/usbip/vudc_dev.c
@@ -279,12 +279,10 @@  static int vep_disable(struct usb_ep *_ep)
 static struct usb_request *vep_alloc_request(struct usb_ep *_ep,
 		gfp_t mem_flags)
 {
-	struct vep *ep;
 	struct vrequest *req;
 
 	if (!_ep)
 		return NULL;
-	ep = to_vep(_ep);
 
 	req = kzalloc(sizeof(*req), mem_flags);
 	if (!req)