Re: [PATCH v4 4/5] xhci: sideband: add api to trace sideband usage

From: Guan-Yu Lin
Date: Thu Oct 10 2024 - 00:16:33 EST


On Wed, Oct 9, 2024 at 8:48 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Wed, Oct 09, 2024 at 05:42:58AM +0000, Guan-Yu Lin wrote:
> > --- a/include/linux/usb/hcd.h
> > +++ b/include/linux/usb/hcd.h
> > @@ -84,6 +84,10 @@ struct usb_hcd {
> > struct urb *status_urb; /* the current status urb */
> > #ifdef CONFIG_PM
> > struct work_struct wakeup_work; /* for remote wakeup */
> > +#ifdef CONFIG_USB_XHCI_SIDEBAND
> > + /* Number of active sideband accessing the host controller. */
> > + atomic_t sb_usage_count;
>
> It's a reference count, use refcount_t please.

Appreciate the clear instructions, let me fix it in the next version.