From: Alan Stern <stern@rowland.harvard.edu>
To: Kuen-Han Tsai <khtsai@google.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Mathias Nyman <mathias.nyman@linux.intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] usb: core: Add tracepoints for device allocation and state changes
Date: Mon, 13 Oct 2025 23:24:47 -0400 [thread overview]
Message-ID: <3d4f625f-eecb-4265-ac86-1420d646aa14@rowland.harvard.edu> (raw)
In-Reply-To: <CAKzKK0pzfSFJ15esnGB9gY_HMrgubZ1QtSkLOUo2FvsNGtCi6g@mail.gmail.com>
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@rowland.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
next prev parent reply other threads:[~2025-10-14 3:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-13 2:01 [PATCH 0/2] usb: core: Improve device lifecycle debuggability Kuen-Han Tsai
2025-10-13 2:01 ` [PATCH 1/2] usb: core: Centralize device state update logic Kuen-Han Tsai
2025-10-13 13:16 ` Alan Stern
2025-10-14 0:06 ` Kuen-Han Tsai
2025-10-13 2:01 ` [PATCH 2/2] usb: core: Add tracepoints for device allocation and state changes Kuen-Han Tsai
2025-10-13 13:20 ` Alan Stern
2025-10-14 0:05 ` Kuen-Han Tsai
2025-10-14 3:24 ` Alan Stern [this message]
2025-10-14 5:17 ` Greg Kroah-Hartman
2025-10-14 7:57 ` Greg Kroah-Hartman
2025-10-14 19:37 ` Kuen-Han Tsai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3d4f625f-eecb-4265-ac86-1420d646aa14@rowland.harvard.edu \
--to=stern@rowland.harvard.edu \
--cc=gregkh@linuxfoundation.org \
--cc=khtsai@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®