[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3d4f625f-eecb-4265-ac86-1420d646aa14@rowland.harvard.edu>
Date: Mon, 13 Oct 2025 23:24:47 -0400
From: Alan Stern <stern@...land.harvard.edu>
To: Kuen-Han Tsai <khtsai@...gle.com>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
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 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?
Alan Stern
Powered by blists - more mailing lists