From: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
John Youn <John.Youn@synopsys.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>
Subject: Re: [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"
Date: Thu, 30 May 2019 18:21:34 +0400 [thread overview]
Message-ID: <1dcd53ee-7557-1974-1aea-33555e1fc67e@synopsys.com> (raw)
In-Reply-To: <1559163283-2429-1-git-send-email-linux@roeck-us.net>
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 */
>
prev parent reply other threads:[~2019-05-30 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1dcd53ee-7557-1974-1aea-33555e1fc67e@synopsys.com \
--to=minas.harutyunyan@synopsys.com \
--cc=John.Youn@synopsys.com \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux@roeck-us.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox