[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAOuDEK2av=TmLu5L5xMryh9jCu0hsXNwcC=ZJjnjrtkwG0+bPQ@mail.gmail.com>
Date: Wed, 16 Apr 2025 18:21:00 +0800
From: Guan-Yu Lin <guanyulin@...gle.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: mathias.nyman@...el.com, stern@...land.harvard.edu, gargaditya08@...e.com,
kekrby@...il.com, jeff.johnson@....qualcomm.com, elder@...nel.org,
quic_zijuhu@...cinc.com, ben@...adent.org.uk, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v11 2/4] usb: add apis for offload usage tracking
On Fri, Apr 11, 2025 at 10:01 PM Greg KH <gregkh@...uxfoundation.org> wrote:
>
> On Tue, Apr 08, 2025 at 03:57:22AM +0000, Guan-Yu Lin wrote:
> > @@ -733,6 +734,8 @@ struct usb_device {
> >
> > u16 hub_delay;
> > unsigned use_generic_driver:1;
> > +
> > + refcount_t offload_usage;
>
> You now have 2 different "refcounts" for the same structure, which of
> course is crazy and will do nothing but cause massive problems.
>
> I know this isn't going to be used to "reference count" the structure,
> and surely you don't need/want the atomic properties of a "real"
> reference count, so why isn't this a simple integer?
>
> thanks,
>
> greg k-h
Thanks for pointing out the blind spots. I'll change it to an integer
in the next version.
Regards,
Guan-Yu
Powered by blists - more mailing lists