[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250624003416.ao7wwnkpe5lkai4n@synopsys.com>
Date: Tue, 24 Jun 2025 00:34:22 +0000
From: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
To: Prashanth K <prashanth.k@....qualcomm.com>
CC: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: dwc3: gadget: Remove duplicate check while setting
xfer resource
On Thu, Jun 19, 2025, Prashanth K wrote:
> Remove the duplicate check for DWC3_EP_RESOURCE_ALLOCATED flag,
> as its already checked inside dwc3_gadget_set_xfer_resource()
>
> Signed-off-by: Prashanth K <prashanth.k@....qualcomm.com>
> ---
> drivers/usb/dwc3/gadget.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 321361288935..e45f7cb17d72 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -924,11 +924,9 @@ static int __dwc3_gadget_ep_enable(struct dwc3_ep *dep, unsigned int action)
> if (ret)
> return ret;
>
> - if (!(dep->flags & DWC3_EP_RESOURCE_ALLOCATED)) {
> - ret = dwc3_gadget_set_xfer_resource(dep);
> - if (ret)
> - return ret;
> - }
> + ret = dwc3_gadget_set_xfer_resource(dep);
> + if (ret)
> + return ret;
>
> if (!(dep->flags & DWC3_EP_ENABLED)) {
> struct dwc3_trb *trb_st_hw;
> --
> 2.25.1
>
Acked-by: Thinh Nguyen <Thinh.Nguyen@...opsys.com>
Thanks,
Thinh
Powered by blists - more mailing lists