Re: [PATCH 5/5] usb: gadget: configfs: add some trace event
From: kernel test robot <hidden>
Date: 2021-09-02 19:28:18
Also in:
oe-kbuild-all
Hi Linyu, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on usb/usb-testing] [also build test WARNING on peter.chen-usb/for-usb-next next-20210902] [cannot apply to balbi-usb/testing/next v5.14] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch] url: https://github.com/0day-ci/linux/commits/Linyu-Yuan/usb-gadget-configfs-add-some-trace-event/20210902-211519 base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing config: x86_64-randconfig-s021-20210902 (attached as .config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.4-rc1-dirty # https://github.com/0day-ci/linux/commit/f173b8a0bbf4b051a79b533539e4469cfe050fc1 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Linyu-Yuan/usb-gadget-configfs-add-some-trace-event/20210902-211519 git checkout f173b8a0bbf4b051a79b533539e4469cfe050fc1 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/usb/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <redacted> sparse warnings: (new ones prefixed by >>) drivers/usb/gadget/configfs_trace.c: note: in included file (through include/trace/trace_events.h, include/trace/define_trace.h, drivers/usb/gadget/configfs_trace.h):
quoted
include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: cast to restricted __le16 include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: cast to restricted __le16 include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: restricted __le16 degrades to integer include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: restricted __le16 degrades to integer include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: cast to restricted __le16 include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: cast to restricted __le16 include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: restricted __le16 degrades to integer include/trace/../../drivers/usb/gadget/configfs_trace.h:14:1: sparse: sparse: restricted __le16 degrades to integer
vim +14 include/trace/../../drivers/usb/gadget/configfs_trace.h
13
> 14 DECLARE_EVENT_CLASS(log_gadget_info,
15 TP_PROTO(struct gadget_info *gi),
16 TP_ARGS(gi),
17 TP_STRUCT__entry(
18 /* gadget_info */
19 __string(gi_group, config_item_name(&gi->group.cg_item))
20 __field(bool, unbind)
21
22 /* usb_composite_dev */
23 __field(u8, b_vendor_code)
24 __field(bool, suspended)
25 __field(bool, setup_pending)
26 __field(bool, os_desc_pending)
27 __field(unsigned, deactivations)
28 __field(int, delayed_status)
29 __field(__le16, bcdUSB)
30 __field(__le16, bcdDevice)
31 __string(config, gi->cdev.config)
32
33 /* usb_composite_driver */
34 __field(unsigned, max_speed)
35 __field(bool, needs_serial)
36
37 /* usb_gadget_driver */
38 __string(udc_name, gi->composite.gadget_driver.udc_name)
39 ),
40 TP_fast_assign(
41 __assign_str(gi_group, config_item_name(&gi->group.cg_item));
42 __entry->unbind = gi->unbind;
43
44 __entry->b_vendor_code = gi->cdev.b_vendor_code;
45 __entry->suspended = gi->cdev.suspended;
46 __entry->setup_pending = gi->cdev.setup_pending;
47 __entry->os_desc_pending = gi->cdev.os_desc_pending;
48 __entry->deactivations = gi->cdev.deactivations;
49 __entry->delayed_status = gi->cdev.delayed_status;
50 __entry->bcdUSB = gi->cdev.desc.bcdUSB;
51 __entry->bcdDevice = gi->cdev.desc.bcdDevice;
52 __assign_str(config, config_to_string(gi));
53
54 __entry->max_speed = gi->composite.max_speed;
55 __entry->needs_serial = gi->composite.needs_serial;
56
57 __assign_str(udc_name, gi->composite.gadget_driver.udc_name);
58 ),
59 TP_printk("gi_group:%s,unbind:%d,"
60 " - "
61 "b_vendor_code:%d,suspended:%d,setup_pending:%d,"
62 "os_desc_pending:%d,deactivations:%d,delayed_status:%d,"
63 "bcdUSB:%04x,bcdDevice:%04x,config:%s,"
64 " - "
65 "max_speed:%d,needs_serial:%d,"
66 " - "
67 "udc_name:%s",
68
69 __get_str(gi_group),
70 __entry->unbind,
71
72 __entry->b_vendor_code,
73 __entry->suspended,
74 __entry->setup_pending,
75 __entry->os_desc_pending,
76 __entry->deactivations,
77 __entry->delayed_status,
78 le16_to_cpu(__entry->bcdUSB),
79 le16_to_cpu(__entry->bcdDevice),
80 __get_str(config),
81
82 __entry->max_speed,
83 __entry->needs_serial,
84
85 __get_str(udc_name)
86 )
87 );
88
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Attachments
- .config.gz [application/gzip] 42625 bytes