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@xxxxxxxxxxx/ v2: fix two issue Reported-by: kernel test robot <lkp@xxxxxxxxx> 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 v13: rebase; add more trace entries; define three event class to remove lock concern trace event will looks like as below, config_usb_cfg_link: dummy: dummy: 1 128 2 gser configfs_composite_bind: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0000 00 00 00 00 0000 0000 0515 6 0 0000000000000000000000000000 gadget_dev_desc_UDC_store: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0000 00 00 00 00 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_reset: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0000 00 00 00 00 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_resume: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0000 00 00 00 00 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_setup: dummy: dummy_udc.0: 0 0 0 0 1 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_reset: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_resume: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_setup: dummy: dummy_udc.0: 0 0 0 0 1 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_setup: dummy: dummy_udc.0: 0 0 0 0 1 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_setup: dummy: dummy_udc.0: 0 0 0 0 1 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_setup: dummy: dummy_udc.0: 0 0 0 0 1 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 unregister_gadget: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_suspend: dummy: dummy_udc.0: 0 0 0 1 0 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_disconnect: dummy: dummy_udc.0: 0 0 0 0 0 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 configfs_composite_unbind: dummy: dummy_udc.0: 1 0 0 0 0 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 gadget_dev_desc_UDC_store: dummy: (null): 1 0 0 0 0 0 0 0 0200 00 00 00 40 0000 0000 0515 6 0 0000000000000000000000000000 Linyu Yuan (2): usb: gadget: configfs: add explicit gi variable usb: gadget: configfs: add trace events drivers/usb/gadget/configfs.c | 62 +++++--- drivers/usb/gadget/configfs_trace.h | 273 ++++++++++++++++++++++++++++++++++++ 2 files changed, 319 insertions(+), 16 deletions(-) create mode 100644 drivers/usb/gadget/configfs_trace.h -- 2.7.4