Re: [PATCH v7 2/4] usb: gadget: add anonymous definition in some struct for trace purpose

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux