CC: kbuild-...@lists.01.org CC: linux-ker...@vger.kernel.org TO: Rasmus Villemoes <li...@rasmusvillemoes.dk> CC: Li Yang <leoyang...@nxp.com> CC: Timur Tabi <ti...@kernel.org>
Hi Rasmus, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 4286d192c803571e8ca43b0f1f8ea04d663a278a commit: 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 soc: fsl: qe: remove PPC32 dependency from CONFIG_QUICC_ENGINE date: 6 months ago :::::: branch date: 3 hours ago :::::: commit date: 6 months ago config: powerpc64-randconfig-m001-20200521 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.0 reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross git checkout 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64 If you fix the issue, kindly add following tag as appropriate Reported-by: kbuild test robot <l...@intel.com> Reported-by: Dan Carpenter <dan.carpen...@oracle.com> smatch warnings: drivers/usb/host/fhci-tds.c:325 fhci_td_transaction_confirm() error: we previously assumed 'pkt' could be null (see line 319) # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git git remote update linus git checkout 5a35435ef4e6e4bd2aabd6706b146b298a9cffe5 vim +/pkt +325 drivers/usb/host/fhci-tds.c 236dd4d18f293e Anton Vorontsov 2009-01-10 267 236dd4d18f293e Anton Vorontsov 2009-01-10 268 /* 236dd4d18f293e Anton Vorontsov 2009-01-10 269 * Collect the submitted frames and inform the application about them 48e34d0f4f357b Justin P. Mattock 2010-12-30 270 * It is also preparing the TDs for new frames. If the Tx interrupts 48e34d0f4f357b Justin P. Mattock 2010-12-30 271 * are disabled, the application should call that routine to get 236dd4d18f293e Anton Vorontsov 2009-01-10 272 * confirmation about the submitted frames. Otherwise, the routine is 25985edcedea63 Lucas De Marchi 2011-03-30 273 * called from the interrupt service routine during the Tx interrupt. 236dd4d18f293e Anton Vorontsov 2009-01-10 274 * In that case the application is informed by calling the application 236dd4d18f293e Anton Vorontsov 2009-01-10 275 * specific 'fhci_transaction_confirm' routine 236dd4d18f293e Anton Vorontsov 2009-01-10 276 */ 236dd4d18f293e Anton Vorontsov 2009-01-10 277 static void fhci_td_transaction_confirm(struct fhci_usb *usb) 236dd4d18f293e Anton Vorontsov 2009-01-10 278 { 236dd4d18f293e Anton Vorontsov 2009-01-10 279 struct endpoint *ep = usb->ep0; 236dd4d18f293e Anton Vorontsov 2009-01-10 280 struct packet *pkt; 236dd4d18f293e Anton Vorontsov 2009-01-10 281 struct usb_td __iomem *td; 236dd4d18f293e Anton Vorontsov 2009-01-10 282 u16 extra_data; 236dd4d18f293e Anton Vorontsov 2009-01-10 283 u16 td_status; 236dd4d18f293e Anton Vorontsov 2009-01-10 284 u16 td_length; 236dd4d18f293e Anton Vorontsov 2009-01-10 285 u32 buf; 236dd4d18f293e Anton Vorontsov 2009-01-10 286 236dd4d18f293e Anton Vorontsov 2009-01-10 287 /* 236dd4d18f293e Anton Vorontsov 2009-01-10 288 * collect transmitted BDs from the chip. The routine clears all BDs 236dd4d18f293e Anton Vorontsov 2009-01-10 289 * with R bit = 0 and the pointer to data buffer is not NULL, that is 236dd4d18f293e Anton Vorontsov 2009-01-10 290 * BDs which point to the transmitted data buffer 236dd4d18f293e Anton Vorontsov 2009-01-10 291 */ 236dd4d18f293e Anton Vorontsov 2009-01-10 292 while (1) { 236dd4d18f293e Anton Vorontsov 2009-01-10 293 td = ep->conf_td; 236dd4d18f293e Anton Vorontsov 2009-01-10 294 td_status = in_be16(&td->status); 236dd4d18f293e Anton Vorontsov 2009-01-10 295 td_length = in_be16(&td->length); 236dd4d18f293e Anton Vorontsov 2009-01-10 296 buf = in_be32(&td->buf_ptr); 236dd4d18f293e Anton Vorontsov 2009-01-10 297 extra_data = in_be16(&td->extra); 236dd4d18f293e Anton Vorontsov 2009-01-10 298 236dd4d18f293e Anton Vorontsov 2009-01-10 299 /* check if the TD is empty */ 236dd4d18f293e Anton Vorontsov 2009-01-10 300 if (!(!(td_status & TD_R) && ((td_status & ~TD_W) || buf))) 236dd4d18f293e Anton Vorontsov 2009-01-10 301 break; 236dd4d18f293e Anton Vorontsov 2009-01-10 302 /* check if it is a dummy buffer */ 236dd4d18f293e Anton Vorontsov 2009-01-10 303 else if ((buf == DUMMY_BD_BUFFER) && !(td_status & ~TD_W)) 236dd4d18f293e Anton Vorontsov 2009-01-10 304 break; 236dd4d18f293e Anton Vorontsov 2009-01-10 305 236dd4d18f293e Anton Vorontsov 2009-01-10 306 /* mark TD as empty */ 236dd4d18f293e Anton Vorontsov 2009-01-10 307 clrbits16(&td->status, ~TD_W); 236dd4d18f293e Anton Vorontsov 2009-01-10 308 out_be16(&td->length, 0); 236dd4d18f293e Anton Vorontsov 2009-01-10 309 out_be32(&td->buf_ptr, 0); 236dd4d18f293e Anton Vorontsov 2009-01-10 310 out_be16(&td->extra, 0); 236dd4d18f293e Anton Vorontsov 2009-01-10 311 /* advance the TD pointer */ 236dd4d18f293e Anton Vorontsov 2009-01-10 312 ep->conf_td = next_bd(ep->td_base, ep->conf_td, td_status); 236dd4d18f293e Anton Vorontsov 2009-01-10 313 236dd4d18f293e Anton Vorontsov 2009-01-10 314 /* check if it is a dummy buffer(type2) */ 236dd4d18f293e Anton Vorontsov 2009-01-10 315 if ((buf == DUMMY2_BD_BUFFER) && !(td_status & ~TD_W)) 236dd4d18f293e Anton Vorontsov 2009-01-10 316 continue; 236dd4d18f293e Anton Vorontsov 2009-01-10 317 45465487897a1c Stefani Seibold 2009-12-21 318 pkt = cq_get(&ep->conf_frame_Q); 236dd4d18f293e Anton Vorontsov 2009-01-10 @319 if (!pkt) 236dd4d18f293e Anton Vorontsov 2009-01-10 320 fhci_err(usb->fhci, "no frame to confirm\n"); 236dd4d18f293e Anton Vorontsov 2009-01-10 321 236dd4d18f293e Anton Vorontsov 2009-01-10 322 if (td_status & TD_ERRORS) { 236dd4d18f293e Anton Vorontsov 2009-01-10 323 if (td_status & TD_RXER) { 236dd4d18f293e Anton Vorontsov 2009-01-10 324 if (td_status & TD_CR) 236dd4d18f293e Anton Vorontsov 2009-01-10 @325 pkt->status = USB_TD_RX_ER_CRC; 236dd4d18f293e Anton Vorontsov 2009-01-10 326 else if (td_status & TD_AB) 236dd4d18f293e Anton Vorontsov 2009-01-10 327 pkt->status = USB_TD_RX_ER_BITSTUFF; 236dd4d18f293e Anton Vorontsov 2009-01-10 328 else if (td_status & TD_OV) 236dd4d18f293e Anton Vorontsov 2009-01-10 329 pkt->status = USB_TD_RX_ER_OVERUN; 236dd4d18f293e Anton Vorontsov 2009-01-10 330 else if (td_status & TD_BOV) 236dd4d18f293e Anton Vorontsov 2009-01-10 331 pkt->status = USB_TD_RX_DATA_OVERUN; 236dd4d18f293e Anton Vorontsov 2009-01-10 332 else if (td_status & TD_NO) 236dd4d18f293e Anton Vorontsov 2009-01-10 333 pkt->status = USB_TD_RX_ER_NONOCT; 236dd4d18f293e Anton Vorontsov 2009-01-10 334 else 236dd4d18f293e Anton Vorontsov 2009-01-10 335 fhci_err(usb->fhci, "illegal error " 25985edcedea63 Lucas De Marchi 2011-03-30 336 "occurred\n"); 236dd4d18f293e Anton Vorontsov 2009-01-10 337 } else if (td_status & TD_NAK) 236dd4d18f293e Anton Vorontsov 2009-01-10 338 pkt->status = USB_TD_TX_ER_NAK; 236dd4d18f293e Anton Vorontsov 2009-01-10 339 else if (td_status & TD_TO) 236dd4d18f293e Anton Vorontsov 2009-01-10 340 pkt->status = USB_TD_TX_ER_TIMEOUT; 236dd4d18f293e Anton Vorontsov 2009-01-10 341 else if (td_status & TD_UN) 236dd4d18f293e Anton Vorontsov 2009-01-10 342 pkt->status = USB_TD_TX_ER_UNDERUN; 236dd4d18f293e Anton Vorontsov 2009-01-10 343 else if (td_status & TD_STAL) 236dd4d18f293e Anton Vorontsov 2009-01-10 344 pkt->status = USB_TD_TX_ER_STALL; 236dd4d18f293e Anton Vorontsov 2009-01-10 345 else 25985edcedea63 Lucas De Marchi 2011-03-30 346 fhci_err(usb->fhci, "illegal error occurred\n"); 236dd4d18f293e Anton Vorontsov 2009-01-10 347 } else if ((extra_data & TD_TOK_IN) && 236dd4d18f293e Anton Vorontsov 2009-01-10 348 pkt->len > td_length - CRC_SIZE) { 236dd4d18f293e Anton Vorontsov 2009-01-10 349 pkt->status = USB_TD_RX_DATA_UNDERUN; 236dd4d18f293e Anton Vorontsov 2009-01-10 350 } 236dd4d18f293e Anton Vorontsov 2009-01-10 351 236dd4d18f293e Anton Vorontsov 2009-01-10 352 if (extra_data & TD_TOK_IN) 236dd4d18f293e Anton Vorontsov 2009-01-10 353 pkt->len = td_length - CRC_SIZE; 236dd4d18f293e Anton Vorontsov 2009-01-10 354 else if (pkt->info & PKT_ZLP) 236dd4d18f293e Anton Vorontsov 2009-01-10 355 pkt->len = 0; 236dd4d18f293e Anton Vorontsov 2009-01-10 356 else 236dd4d18f293e Anton Vorontsov 2009-01-10 357 pkt->len = td_length; 236dd4d18f293e Anton Vorontsov 2009-01-10 358 236dd4d18f293e Anton Vorontsov 2009-01-10 359 fhci_transaction_confirm(usb, pkt); 236dd4d18f293e Anton Vorontsov 2009-01-10 360 } 236dd4d18f293e Anton Vorontsov 2009-01-10 361 } 236dd4d18f293e Anton Vorontsov 2009-01-10 362 :::::: The code at line 325 was first introduced by commit :::::: 236dd4d18f293e3c9798f35c08272196826a980d USB: Driver for Freescale QUICC Engine USB Host Controller :::::: TO: Anton Vorontsov <avoront...@ru.mvista.com> :::::: CC: Greg Kroah-Hartman <gre...@kvm.kroah.org> --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-...@lists.01.org
.config.gz
Description: application/gzip
_______________________________________________ kbuild mailing list -- kbuild@lists.01.org To unsubscribe send an email to kbuild-le...@lists.01.org