Linux USB
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Linyu Yuan <quic_linyyuan@quicinc.com>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
	Alan Stern <stern@rowland.harvard.edu>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH v7 2/4] usb: gadget: add anonymous definition in some struct for trace purpose
Date: Mon, 18 Sep 2023 14:06:34 +0200	[thread overview]
Message-ID: <2023091831-applause-headless-8e91@gregkh> (raw)
In-Reply-To: <20230918112534.2108-3-quic_linyyuan@quicinc.com>

On Mon, Sep 18, 2023 at 07:25:32PM +0800, Linyu Yuan wrote:
> Some UDC trace event will save usb udc information, but it use one int
> size buffer to save one bit information of usb udc, it waste trace buffer.
> 
> Add anonymous union which have u32 members can be used by trace event
> during fast assign stage to save more entries with same trace ring buffer
> size.
> 
> In order to access each bit with BIT() macro, add different definition for
> each bit fields according host little/big endian to make sure it has same
> eacho bit field have same bit position in memory.

typo?

> Add some macros or helper for later trace event usage which follow the
> udc structs, As when possible future changes to udc related structs,
> developers will easy notice them.

This isn't going to work at all, there's nothing to keep the two in
sync.

As you are using bitmasks now, wonderful, just use those only and ignore
the bitfield definitions, that's not going to work mixing the two at
all.

thanks,

greg k-h

  reply	other threads:[~2023-09-18 12:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 11:25 [PATCH v7 0/4] usb: gadget: reduce usb gadget trace event buffer usage Linyu Yuan
2023-09-18 11:25 ` [PATCH v7 1/4] usb: gadget: remove UDC_TRACE_STR_MAX definition Linyu Yuan
2023-09-18 11:25 ` [PATCH v7 2/4] usb: gadget: add anonymous definition in some struct for trace purpose Linyu Yuan
2023-09-18 12:06   ` Greg Kroah-Hartman [this message]
2023-09-18 14:14     ` Alan Stern
2023-09-19  0:01       ` Linyu Yuan
2023-09-19  7:07         ` Greg Kroah-Hartman
2023-09-18 11:25 ` [PATCH v7 3/4] usb: udc: trace: reduce buffer usage of trace event Linyu Yuan
2023-09-18 11:25 ` [PATCH v7 4/4] usb: dwc3: " Linyu Yuan

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=2023091831-applause-headless-8e91@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Thinh.Nguyen@synopsys.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=quic_linyyuan@quicinc.com \
    --cc=stern@rowland.harvard.edu \
    /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