[balbi-usb:testing/next 50/50] drivers/usb/dwc3/./trace.h:216:449: warning: 's' may be used uninitialized in this function

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

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
head:   ad7b607f82731eec3ed17d9d22764eb6f09609f9
commit: ad7b607f82731eec3ed17d9d22764eb6f09609f9 [50/50] usb: dwc3: trace: add missing break statement to make compiler happy
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        git checkout ad7b607f82731eec3ed17d9d22764eb6f09609f9
        # save the attached .config to linux build tree
        make ARCH=i386 

Note: it may well be a FALSE warning. FWIW you are at least aware of it now.
http://gcc.gnu.org/wiki/Better_Uninitialized_Warnings

All warnings (new ones prefixed by >>):

   In file included from include/trace/trace_events.h:394:0,
                    from include/trace/define_trace.h:96,
                    from drivers/usb/dwc3/trace.h:342,
                    from drivers/usb/dwc3/trace.c:11:
   drivers/usb/dwc3/./trace.h: In function 'trace_raw_output_dwc3_log_trb':
>> drivers/usb/dwc3/./trace.h:216:449: warning: 's' may be used uninitialized in this function [-Wmaybe-uninitialized]
    DECLARE_EVENT_CLASS(dwc3_log_trb,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                    ^                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
   drivers/usb/dwc3/./trace.h:216:647: note: 's' was declared here
    DECLARE_EVENT_CLASS(dwc3_log_trb,
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          ^

vim +/s +216 drivers/usb/dwc3/./trace.h

2c4cbe6e5a Felipe Balbi    2014-04-30  215  
2c4cbe6e5a Felipe Balbi    2014-04-30 @216  DECLARE_EVENT_CLASS(dwc3_log_trb,
2c4cbe6e5a Felipe Balbi    2014-04-30  217  	TP_PROTO(struct dwc3_ep *dep, struct dwc3_trb *trb),
2c4cbe6e5a Felipe Balbi    2014-04-30  218  	TP_ARGS(dep, trb),
2c4cbe6e5a Felipe Balbi    2014-04-30  219  	TP_STRUCT__entry(
e42f09b85f Felipe Balbi    2017-04-28  220  		__string(name, dep->name)
2c4cbe6e5a Felipe Balbi    2014-04-30  221  		__field(struct dwc3_trb *, trb)
68d34c8a74 Felipe Balbi    2016-05-30  222  		__field(u32, allocated)
68d34c8a74 Felipe Balbi    2016-05-30  223  		__field(u32, queued)
4ac4fc9322 Felipe Balbi    2014-09-17  224  		__field(u32, bpl)
4ac4fc9322 Felipe Balbi    2014-09-17  225  		__field(u32, bph)
4ac4fc9322 Felipe Balbi    2014-09-17  226  		__field(u32, size)
4ac4fc9322 Felipe Balbi    2014-09-17  227  		__field(u32, ctrl)
fa8d965d73 Felipe Balbi    2016-09-28  228  		__field(u32, type)
2c4cbe6e5a Felipe Balbi    2014-04-30  229  	),
2c4cbe6e5a Felipe Balbi    2014-04-30  230  	TP_fast_assign(
e42f09b85f Felipe Balbi    2017-04-28  231  		__assign_str(name, dep->name);
2c4cbe6e5a Felipe Balbi    2014-04-30  232  		__entry->trb = trb;
4ac4fc9322 Felipe Balbi    2014-09-17  233  		__entry->bpl = trb->bpl;
4ac4fc9322 Felipe Balbi    2014-09-17  234  		__entry->bph = trb->bph;
4ac4fc9322 Felipe Balbi    2014-09-17  235  		__entry->size = trb->size;
4ac4fc9322 Felipe Balbi    2014-09-17  236  		__entry->ctrl = trb->ctrl;
fa8d965d73 Felipe Balbi    2016-09-28  237  		__entry->type = usb_endpoint_type(dep->endpoint.desc);
2c4cbe6e5a Felipe Balbi    2014-04-30  238  	),
0bd0f6d201 Felipe Balbi    2018-03-26  239  	TP_printk("%s: trb %p buf %08x%08x size %s%d ctrl %08x (%c%c%c%c:%c%c:%s)",
0bd0f6d201 Felipe Balbi    2018-03-26  240  		__get_str(name), __entry->trb, __entry->bph, __entry->bpl,
fa8d965d73 Felipe Balbi    2016-09-28  241  		({char *s;
fa8d965d73 Felipe Balbi    2016-09-28  242  		int pcm = ((__entry->size >> 24) & 3) + 1;
fa8d965d73 Felipe Balbi    2016-09-28  243  		switch (__entry->type) {
fa8d965d73 Felipe Balbi    2016-09-28  244  		case USB_ENDPOINT_XFER_INT:
fa8d965d73 Felipe Balbi    2016-09-28  245  		case USB_ENDPOINT_XFER_ISOC:
fa8d965d73 Felipe Balbi    2016-09-28  246  			switch (pcm) {
fa8d965d73 Felipe Balbi    2016-09-28  247  			case 1:
fa8d965d73 Felipe Balbi    2016-09-28  248  				s = "1x ";
fa8d965d73 Felipe Balbi    2016-09-28  249  				break;
fa8d965d73 Felipe Balbi    2016-09-28  250  			case 2:
fa8d965d73 Felipe Balbi    2016-09-28  251  				s = "2x ";
fa8d965d73 Felipe Balbi    2016-09-28  252  				break;
fa8d965d73 Felipe Balbi    2016-09-28  253  			case 3:
fa8d965d73 Felipe Balbi    2016-09-28  254  				s = "3x ";
fa8d965d73 Felipe Balbi    2016-09-28  255  				break;
fa8d965d73 Felipe Balbi    2016-09-28  256  			}
ad7b607f82 Andy Shevchenko 2018-12-03  257  			break;
fa8d965d73 Felipe Balbi    2016-09-28  258  		default:
fa8d965d73 Felipe Balbi    2016-09-28  259  			s = "";
fa8d965d73 Felipe Balbi    2016-09-28  260  		} s; }),
fa8d965d73 Felipe Balbi    2016-09-28  261  		DWC3_TRB_SIZE_LENGTH(__entry->size), __entry->ctrl,
22f2c619a1 Janusz Dziedzic 2016-05-20  262  		__entry->ctrl & DWC3_TRB_CTRL_HWO ? 'H' : 'h',
22f2c619a1 Janusz Dziedzic 2016-05-20  263  		__entry->ctrl & DWC3_TRB_CTRL_LST ? 'L' : 'l',
22f2c619a1 Janusz Dziedzic 2016-05-20  264  		__entry->ctrl & DWC3_TRB_CTRL_CHN ? 'C' : 'c',
22f2c619a1 Janusz Dziedzic 2016-05-20  265  		__entry->ctrl & DWC3_TRB_CTRL_CSP ? 'S' : 's',
22f2c619a1 Janusz Dziedzic 2016-05-20  266  		__entry->ctrl & DWC3_TRB_CTRL_ISP_IMI ? 'S' : 's',
22f2c619a1 Janusz Dziedzic 2016-05-20  267  		__entry->ctrl & DWC3_TRB_CTRL_IOC ? 'C' : 'c',
b5c7ed5cca Felipe Balbi    2017-03-31  268  		  dwc3_trb_type_string(DWC3_TRBCTL_TYPE(__entry->ctrl))
2c4cbe6e5a Felipe Balbi    2014-04-30  269  	)
2c4cbe6e5a Felipe Balbi    2014-04-30  270  );
2c4cbe6e5a Felipe Balbi    2014-04-30  271  

:::::: The code at line 216 was first introduced by commit
:::::: 2c4cbe6e5a9c71408b496e00a78ea9284e98af16 usb: dwc3: add tracepoints to aid debugging

:::::: TO: Felipe Balbi <balbi@xxxxxx>
:::::: CC: Felipe Balbi <balbi@xxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


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

  Powered by Linux