CC: [email protected] BCC: [email protected] CC: [email protected] TO: popcornmix <[email protected]> CC: Kari Suvanto <[email protected]> CC: "Noralf Trønnes" <[email protected]> CC: Phil Elwell <[email protected]> CC: Malik Olivier Boussejra <[email protected]> CC: Paul Zimmerman <[email protected]> CC: "Greg Kroah-Hartman" <[email protected]> CC: Lukas Wunner <[email protected]> CC: Nathan Chancellor <[email protected]> CC: Dave Stevenson <[email protected]> CC: Michael Zoran <[email protected]> CC: "Marek Behún" <[email protected]> CC: Jonathan Bell <[email protected]> CC: Hui Wang <[email protected]> CC: Zixuan Wang <[email protected]>
tree: https://github.com/l1k/linux smsc95xx_5.17 head: 05d68ced287b30f62f18f95b5476135ef669804a commit: a8197852bb8f1f6804cff9442d426888e97aaed3 [56/887] Add dwc_otg driver :::::: branch date: 9 hours ago :::::: commit date: 3 weeks ago config: m68k-randconfig-m031-20220408 (https://download.01.org/0day-ci/archive/20220408/[email protected]/config) compiler: m68k-linux-gcc (GCC) 11.2.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> Reported-by: Dan Carpenter <[email protected]> smatch warnings: drivers/usb/core/otg_productlist.h:142 is_targeted() warn: ignoring unreachable code. drivers/usb/core/message.c:2155 usb_set_configuration() warn: curly braces intended? vim +142 drivers/usb/core/otg_productlist.h a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 88 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 89 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 90 static int is_targeted(struct usb_device *dev) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 91 { f8f02d5c671f79 drivers/usb/core/otg_productlist.h Greg Kroah-Hartman 2020-06-18 92 struct usb_device_id *id = productlist_table; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 93 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 94 /* HNP test device is _never_ targeted (see OTG spec 6.6.6) */ ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 95 if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 96 le16_to_cpu(dev->descriptor.idProduct) == 0xbadd)) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 97 return 0; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 98 e5dff0e80463cc drivers/usb/core/otg_whitelist.h Macpaul Lin 2015-01-23 99 /* OTG PET device is always targeted (see OTG 2.0 ECN 6.4.2) */ e5dff0e80463cc drivers/usb/core/otg_whitelist.h Macpaul Lin 2015-01-23 100 if ((le16_to_cpu(dev->descriptor.idVendor) == 0x1a0a && e5dff0e80463cc drivers/usb/core/otg_whitelist.h Macpaul Lin 2015-01-23 101 le16_to_cpu(dev->descriptor.idProduct) == 0x0200)) e5dff0e80463cc drivers/usb/core/otg_whitelist.h Macpaul Lin 2015-01-23 102 return 1; e5dff0e80463cc drivers/usb/core/otg_whitelist.h Macpaul Lin 2015-01-23 103 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 104 /* NOTE: can't use usb_match_id() since interface caches ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 105 * aren't set up yet. this is cut/paste from that code. ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 106 */ f8f02d5c671f79 drivers/usb/core/otg_productlist.h Greg Kroah-Hartman 2020-06-18 107 for (id = productlist_table; id->match_flags; id++) { ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 108 if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 109 id->idVendor != le16_to_cpu(dev->descriptor.idVendor)) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 110 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 111 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 112 if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 113 id->idProduct != le16_to_cpu(dev->descriptor.idProduct)) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 114 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 115 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 116 /* No need to test id->bcdDevice_lo != 0, since 0 is never ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 117 greater than any unsigned number. */ ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 118 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 119 (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice))) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 120 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 121 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 122 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 123 (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice))) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 124 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 125 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 126 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 127 (id->bDeviceClass != dev->descriptor.bDeviceClass)) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 128 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 129 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 130 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 131 (id->bDeviceSubClass != dev->descriptor.bDeviceSubClass)) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 132 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 133 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 134 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 135 (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 136 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 137 ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 138 return 1; a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 139 /* NOTE: can't use usb_match_id() since interface caches a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 140 * aren't set up yet. this is cut/paste from that code. a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 141 */ a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 @142 for (id = productlist_table; id->match_flags; id++) { a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 143 #ifdef DEBUG a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 144 dev_dbg(&dev->dev, a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 145 "ID: V:%04x P:%04x DC:%04x SC:%04x PR:%04x \n", a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 146 id->idVendor, a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 147 id->idProduct, a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 148 id->bDeviceClass, a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 149 id->bDeviceSubClass, a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 150 id->bDeviceProtocol); a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 151 #endif ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 152 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 153 if ((id->match_flags & USB_DEVICE_ID_MATCH_VENDOR) && a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 154 id->idVendor != le16_to_cpu(dev->descriptor.idVendor)) a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 155 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 156 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 157 if ((id->match_flags & USB_DEVICE_ID_MATCH_PRODUCT) && a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 158 id->idProduct != le16_to_cpu(dev->descriptor.idProduct)) a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 159 continue; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 160 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 161 /* No need to test id->bcdDevice_lo != 0, since 0 is never a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 162 greater than any unsigned number. */ a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 163 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_LO) && a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 164 (id->bcdDevice_lo > le16_to_cpu(dev->descriptor.bcdDevice))) a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 165 continue; a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 166 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 167 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_HI) && a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 168 (id->bcdDevice_hi < le16_to_cpu(dev->descriptor.bcdDevice))) a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 169 continue; a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 170 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 171 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_CLASS) && a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 172 (id->bDeviceClass != dev->descriptor.bDeviceClass)) a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 173 continue; a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 174 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 175 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_SUBCLASS) && a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 176 (id->bDeviceSubClass != dev->descriptor.bDeviceSubClass)) a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 177 continue; a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 178 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 179 if ((id->match_flags & USB_DEVICE_ID_MATCH_DEV_PROTOCOL) && a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 180 (id->bDeviceProtocol != dev->descriptor.bDeviceProtocol)) a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 181 continue; a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 182 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 183 return 1; a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 184 } a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 185 } a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 186 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 187 /* add other match criteria here ... */ 026f3fcbb0fc51 drivers/usb/core/otg_whitelist.h Peter Chen 2014-08-19 188 a8197852bb8f1f drivers/usb/core/otg_productlist.h popcornmix 2013-05-01 189 report_errors(dev); ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 190 return 0; ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 191 } ^1da177e4c3f41 drivers/usb/core/otg_whitelist.h Linus Torvalds 2005-04-16 192 -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
