mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] usb: dwc3: gadget: Remove duplicate check while setting xfer resource
@ 2025-06-19 12:03 Prashanth K
  2025-06-24  0:34 ` Thinh Nguyen
  0 siblings, 1 reply; 2+ messages in thread
From: Prashanth K @ 2025-06-19 12:03 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Thinh Nguyen; +Cc: linux-usb, linux-kernel, Prashanth K

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@oss.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


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

* Re: [PATCH] usb: dwc3: gadget: Remove duplicate check while setting xfer resource
  2025-06-19 12:03 [PATCH] usb: dwc3: gadget: Remove duplicate check while setting xfer resource Prashanth K
@ 2025-06-24  0:34 ` Thinh Nguyen
  0 siblings, 0 replies; 2+ messages in thread
From: Thinh Nguyen @ 2025-06-24  0:34 UTC (permalink / raw)
  To: Prashanth K; +Cc: Greg Kroah-Hartman, Thinh Nguyen, linux-usb, linux-kernel

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@oss.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@synopsys.com>

Thanks,
Thinh

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

end of thread, other threads:[~2025-06-24  0:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-06-19 12:03 [PATCH] usb: dwc3: gadget: Remove duplicate check while setting xfer resource Prashanth K
2025-06-24  0:34 ` Thinh Nguyen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®