diff mbox series

usb: dwc3: gadget: Let pm runtime get/put paired

Message ID 20230731023323.16046-1-surong.pang@unisoc.com (mailing list archive)
State Superseded
Headers show
Series usb: dwc3: gadget: Let pm runtime get/put paired | expand

Commit Message

Surong Pang July 31, 2023, 2:33 a.m. UTC
Pm_runtime_get is called when setting pending_events to true.
Pm_runtime_put is needed for pairing with pm_runtime_get.

Fixes: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
Signed-off-by: Surong Pang <surong.pang@unisoc.com>
---
 drivers/usb/dwc3/gadget.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thinh Nguyen Aug. 1, 2023, 12:49 a.m. UTC | #1
Hi,

On Mon, Jul 31, 2023, Surong Pang wrote:
> Pm_runtime_get is called when setting pending_events to true.
> Pm_runtime_put is needed for pairing with pm_runtime_get.
> 
> Fixes: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")

Please fix your Fixes tag. Run checkpatch.pl before submit.

Thanks,
Thinh

> Signed-off-by: Surong Pang <surong.pang@unisoc.com>
> ---
>  drivers/usb/dwc3/gadget.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 5fd067151fbf..9c835c5f9928 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -4720,5 +4720,6 @@ void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
>  		dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf);
>  		dwc->pending_events = false;
>  		enable_irq(dwc->irq_gadget);
> +		pm_runtime_put(dwc->dev);
>  	}
>  }
> -- 
> 2.17.1
>
Greg KH Aug. 1, 2023, 4:44 a.m. UTC | #2
On Tue, Aug 01, 2023 at 12:49:24AM +0000, Thinh Nguyen wrote:
> Hi,
> 
> On Mon, Jul 31, 2023, Surong Pang wrote:
> > Pm_runtime_get is called when setting pending_events to true.
> > Pm_runtime_put is needed for pairing with pm_runtime_get.
> > 
> > Fixes: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
> 
> Please fix your Fixes tag. Run checkpatch.pl before submit.

I don't see what's wrong with it, one extra character is just fine.

thanks,

greg k-h
Thinh Nguyen Aug. 1, 2023, 11:56 p.m. UTC | #3
On Tue, Aug 01, 2023, gregkh@linuxfoundation.org wrote:
> On Tue, Aug 01, 2023 at 12:49:24AM +0000, Thinh Nguyen wrote:
> > Hi,
> > 
> > On Mon, Jul 31, 2023, Surong Pang wrote:
> > > Pm_runtime_get is called when setting pending_events to true.
> > > Pm_runtime_put is needed for pairing with pm_runtime_get.
> > > 
> > > Fixes: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
> > 
> > Please fix your Fixes tag. Run checkpatch.pl before submit.
> 
> I don't see what's wrong with it, one extra character is just fine.
> 

This inconsistency bugs me a bit. :)

It's noted in the kernel documentation that it should be tagged with the
first 12 char of the commit id, and the checkpatch also complaints when
it's not.

Just trying to be consistent and request to run for checkpatch and fix
these things. If these issues should be ignored, I'll keep it in mind...

BR,
Thinh
Greg KH Aug. 4, 2023, 12:38 p.m. UTC | #4
On Tue, Aug 01, 2023 at 11:56:26PM +0000, Thinh Nguyen wrote:
> On Tue, Aug 01, 2023, gregkh@linuxfoundation.org wrote:
> > On Tue, Aug 01, 2023 at 12:49:24AM +0000, Thinh Nguyen wrote:
> > > Hi,
> > > 
> > > On Mon, Jul 31, 2023, Surong Pang wrote:
> > > > Pm_runtime_get is called when setting pending_events to true.
> > > > Pm_runtime_put is needed for pairing with pm_runtime_get.
> > > > 
> > > > Fixes: fc8bb91bc83ef ("usb: dwc3: implement runtime PM")
> > > 
> > > Please fix your Fixes tag. Run checkpatch.pl before submit.
> > 
> > I don't see what's wrong with it, one extra character is just fine.
> > 
> 
> This inconsistency bugs me a bit. :)
> 
> It's noted in the kernel documentation that it should be tagged with the
> first 12 char of the commit id, and the checkpatch also complaints when
> it's not.

Fair enough, consistency is good.

greg k-h
diff mbox series

Patch

diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 5fd067151fbf..9c835c5f9928 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -4720,5 +4720,6 @@  void dwc3_gadget_process_pending_events(struct dwc3 *dwc)
 		dwc3_interrupt(dwc->irq_gadget, dwc->ev_buf);
 		dwc->pending_events = false;
 		enable_irq(dwc->irq_gadget);
+		pm_runtime_put(dwc->dev);
 	}
 }