mbox series

[v12,0/4] usb: gadget: configfs: add some trace event

Message ID 1634649997-28745-1-git-send-email-quic_linyyuan@quicinc.com (mailing list archive)
Headers show
Series usb: gadget: configfs: add some trace event | expand

Message

Linyu Yuan Oct. 19, 2021, 1:26 p.m. UTC
this series make some minor change to gadget configfs and
add some important trace event from configfs layer.

follow suggestion from Felipe Balbi in link below,
https://lore.kernel.org/linux-usb/1629777281-30188-1-git-send-email-quic_linyyuan@quicinc.com/

v2: fix two issue Reported-by: kernel test robot <lkp@intel.com>
v3: do not move private structure to configfs.h
v4: add missing new file configfs_trace.h
v5: lost some change of v2, add it again
v6: fix comments from Greg Kroah-Hartman
v7: three minor changes according to coding rules
v8: change two trace location
v9: fix when config is empty
v10: fix wrong api in v9
v11: split to three changes, minor change to trace event print format
v12: use mutex lock gi->lock to make sure data safe for trace

trace event will looks like as below,
config_usb_cfg_link: g1: 0 0 0 0 0 0 0 0 0000 0510 6 0 {1 80 2 Function FS Gadget,}; - (null)
gadget_dev_desc_UDC_store: g1: 0 0 0 0 0 0 0 0 0000 0510 6 0 {1 80 2 Function FS Gadget,}; - dummy_udc
unregister_gadget: g1: 0 0 0 0 0 0 0 0 0000 0510 6 0 {1 80 2 Function FS Gadget,}; - dummy_udc
config_usb_cfg_unlink: g1: 0 0 0 0 0 0 0 0 0000 0510 6 0 {1 80 2 }, - (null)

Linyu Yuan (4):
  usb: gadget: configfs: add cfg_to_gadget_info() helper
  usb: gadget: configfs: change config attributes file operation
  usb: gadget: configfs: use gi->lock to protect write operation
  usb: gadget: add configfs trace events

 drivers/usb/gadget/configfs.c       |  61 ++++++++++---
 drivers/usb/gadget/configfs_trace.h | 168 ++++++++++++++++++++++++++++++++++++
 2 files changed, 218 insertions(+), 11 deletions(-)
 create mode 100644 drivers/usb/gadget/configfs_trace.h

Comments

Greg Kroah-Hartman Oct. 22, 2021, 9:19 a.m. UTC | #1
On Tue, Oct 19, 2021 at 09:26:33PM +0800, Linyu Yuan wrote:
> this series make some minor change to gadget configfs and
> add some important trace event from configfs layer.
> 
> follow suggestion from Felipe Balbi in link below,
> https://lore.kernel.org/linux-usb/1629777281-30188-1-git-send-email-quic_linyyuan@quicinc.com/

I've applied the first 2 patches here, as they are nice "cleanup"
changes.  But I had a problem with patch 3, and I need others to help
review patch 4 so I can not take them at this point in time yet.  Feel
free to rebase the remaining patches on my tree so you no longer have to
send the first 2 anymore.

thanks,

greg k-h