[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2025101423-caravan-dominoes-0037@gregkh>
Date: Tue, 14 Oct 2025 07:17:53 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: Alan Stern <stern@...land.harvard.edu>
Cc: Kuen-Han Tsai <khtsai@...gle.com>,
Mathias Nyman <mathias.nyman@...ux.intel.com>,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] usb: core: Add tracepoints for device allocation and
state changes
On Mon, Oct 13, 2025 at 11:24:47PM -0400, Alan Stern wrote:
> On Tue, Oct 14, 2025 at 08:05:25AM +0800, Kuen-Han Tsai wrote:
> > Hi Alan,
> >
> > On Mon, Oct 13, 2025 at 9:20 PM Alan Stern <stern@...land.harvard.edu> wrote:
> > >
> > > Suggestion: Rather than printing the meaningless numerical value of
> > > __entry->state, print the string value returned by
> > > usb_state_string(__entry->state).
> >
> > I kept it consistent with the udc_log_gadget tracepoint, which also
> > uses the numerical value for the USB state.
> >
> > If we change the state to a string, should we convert the speed field
> > to a string using usb_speed_string()?
> >
> > I lean toward keeping both as numerical values, but I am happy to
> > switch both to strings if you prefer. Please let me know what you
> > think is best.
>
> I agree that if one of them uses strings then so should the other.
>
> As for whether you should change them... I don't care very much, since
> I haven't used tracepoints in my gadget debugging. I was just thinking
> of what other people might like.
>
> Greg, do you have a recommendation?
Strings are always easier for people to understand, otherwise we have to
go look the value up somewhere. So both should use them.
thanks,
greg k-h
Powered by blists - more mailing lists