linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"
@ 2019-05-29 20:54 Guenter Roeck
  2019-05-29 21:00 ` Doug Anderson
  2019-05-30 14:21 ` Minas Harutyunyan
  0 siblings, 2 replies; 3+ messages in thread
From: Guenter Roeck @ 2019-05-29 20:54 UTC (permalink / raw)
  To: Minas Harutyunyan
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, Guenter Roeck,
	Vardan Mikayelyan, John Youn, Douglas Anderson, Felipe Balbi

This reverts commit b0d659022e5c96ee5c4bd62d22d3da2d66de306b.

The reverted commit does nothing but adding two unnecessary lines
of code.  It sets a local variable to NULL in two functions, but
that variable is not used anywhere in the rest of those functions.
This is just confusing, so let's remove it.

Cc: Vardan Mikayelyan <mvardan@synopsys.com>
Cc: John Youn <johnyoun@synopsys.com>
Cc: Douglas Anderson <dianders@chromiun.org>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
 drivers/usb/dwc2/hcd.c | 1 -
 drivers/usb/dwc2/hcd.h | 1 -
 2 files changed, 2 deletions(-)

diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index b50ec3714fd8..bca64b0d4d15 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -4676,7 +4676,6 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
 	spin_unlock_irqrestore(&hsotg->lock, flags);
 	urb->hcpriv = NULL;
 	kfree(qtd);
-	qtd = NULL;
 fail1:
 	if (qh_allocated) {
 		struct dwc2_qtd *qtd2, *qtd2_tmp;
diff --git a/drivers/usb/dwc2/hcd.h b/drivers/usb/dwc2/hcd.h
index c089ffa1f0a8..f6bc48432b04 100644
--- a/drivers/usb/dwc2/hcd.h
+++ b/drivers/usb/dwc2/hcd.h
@@ -574,7 +574,6 @@ static inline void dwc2_hcd_qtd_unlink_and_free(struct dwc2_hsotg *hsotg,
 {
 	list_del(&qtd->qtd_list_entry);
 	kfree(qtd);
-	qtd = NULL;
 }
 
 /* Descriptor DMA support functions */
-- 
2.7.4


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

* Re: [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"
  2019-05-29 20:54 [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it" Guenter Roeck
@ 2019-05-29 21:00 ` Doug Anderson
  2019-05-30 14:21 ` Minas Harutyunyan
  1 sibling, 0 replies; 3+ messages in thread
From: Doug Anderson @ 2019-05-29 21:00 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Minas Harutyunyan, Greg Kroah-Hartman, linux-usb, LKML,
	Vardan Mikayelyan, John Youn, Douglas Anderson, Felipe Balbi

Hi,

On Wed, May 29, 2019 at 1:54 PM Guenter Roeck <linux@roeck-us.net> wrote:
>
> This reverts commit b0d659022e5c96ee5c4bd62d22d3da2d66de306b.
>
> The reverted commit does nothing but adding two unnecessary lines
> of code.  It sets a local variable to NULL in two functions, but
> that variable is not used anywhere in the rest of those functions.
> This is just confusing, so let's remove it.
>
> Cc: Vardan Mikayelyan <mvardan@synopsys.com>
> Cc: John Youn <johnyoun@synopsys.com>
> Cc: Douglas Anderson <dianders@chromiun.org>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
> ---
>  drivers/usb/dwc2/hcd.c | 1 -
>  drivers/usb/dwc2/hcd.h | 1 -
>  2 files changed, 2 deletions(-)

Reviewed-by: Douglas Anderson <dianders@chromium.org>

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

* Re: [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"
  2019-05-29 20:54 [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it" Guenter Roeck
  2019-05-29 21:00 ` Doug Anderson
@ 2019-05-30 14:21 ` Minas Harutyunyan
  1 sibling, 0 replies; 3+ messages in thread
From: Minas Harutyunyan @ 2019-05-30 14:21 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: Greg Kroah-Hartman, linux-usb, linux-kernel, John Youn, Felipe Balbi

On 5/30/2019 12:55 AM, Guenter Roeck wrote:
> This reverts commit b0d659022e5c96ee5c4bd62d22d3da2d66de306b.
> 
> The reverted commit does nothing but adding two unnecessary lines
> of code.  It sets a local variable to NULL in two functions, but
> that variable is not used anywhere in the rest of those functions.
> This is just confusing, so let's remove it.
> 
> Cc: Vardan Mikayelyan <mvardan@synopsys.com>
> Cc: John Youn <johnyoun@synopsys.com>
> Cc: Douglas Anderson <dianders@chromiun.org>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>

Acked-by: Minas Harutyunyan <hminas@synopsys.com>


> ---
>   drivers/usb/dwc2/hcd.c | 1 -
>   drivers/usb/dwc2/hcd.h | 1 -
>   2 files changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
> index b50ec3714fd8..bca64b0d4d15 100644
> --- a/drivers/usb/dwc2/hcd.c
> +++ b/drivers/usb/dwc2/hcd.c
> @@ -4676,7 +4676,6 @@ static int _dwc2_hcd_urb_enqueue(struct usb_hcd *hcd, struct urb *urb,
>   	spin_unlock_irqrestore(&hsotg->lock, flags);
>   	urb->hcpriv = NULL;
>   	kfree(qtd);
> -	qtd = NULL;
>   fail1:
>   	if (qh_allocated) {
>   		struct dwc2_qtd *qtd2, *qtd2_tmp;
> diff --git a/drivers/usb/dwc2/hcd.h b/drivers/usb/dwc2/hcd.h
> index c089ffa1f0a8..f6bc48432b04 100644
> --- a/drivers/usb/dwc2/hcd.h
> +++ b/drivers/usb/dwc2/hcd.h
> @@ -574,7 +574,6 @@ static inline void dwc2_hcd_qtd_unlink_and_free(struct dwc2_hsotg *hsotg,
>   {
>   	list_del(&qtd->qtd_list_entry);
>   	kfree(qtd);
> -	qtd = NULL;
>   }
>   
>   /* Descriptor DMA support functions */
> 


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

end of thread, other threads:[~2019-05-30 14:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-29 20:54 [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it" Guenter Roeck
2019-05-29 21:00 ` Doug Anderson
2019-05-30 14:21 ` Minas Harutyunyan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).