Hi Wesley, [FYI, it's a private test report for your RFC patch.] [auto build test WARNING on broonie-sound/for-next] [also build test WARNING on tiwai-sound/for-next tiwai-sound/for-linus usb/usb-testing usb/usb-next usb/usb-linus linus/master v6.1 next-20221220] [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#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Wesley-Cheng/ASoC-Add-SOC-USB-APIs-for-adding-an-USB-backend/20221224-073625 base: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next patch link: https://lore.kernel.org/r/20221223233200.26089-10-quic_wcheng%40quicinc.com patch subject: [RFC PATCH 09/14] sound: usb: Introduce QC USB SND offloading support config: powerpc-allmodconfig compiler: powerpc-linux-gcc (GCC) 12.1.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 # https://github.com/intel-lab-lkp/linux/commit/99377c688b06fc755d9a23b53434da6d1305e21f git remote add linux-review https://github.com/intel-lab-lkp/linux git fetch --no-tags linux-review Wesley-Cheng/ASoC-Add-SOC-USB-APIs-for-adding-an-USB-backend/20221224-073625 git checkout 99377c688b06fc755d9a23b53434da6d1305e21f # save the config file mkdir build_dir && cp config build_dir/.config COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc olddefconfig COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash sound/usb/qcom/ If you fix the issue, kindly add following tag where applicable | Reported-by: kernel test robot All warnings (new ones prefixed by >>): >> sound/usb/qcom/qc_audio_offload.c:1394:5: warning: no previous prototype for 'qc_usb_audio_offload_init_qmi_dev' [-Wmissing-prototypes] 1394 | int qc_usb_audio_offload_init_qmi_dev(void) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> sound/usb/qcom/qc_audio_offload.c:1425:6: warning: no previous prototype for 'qc_usb_audio_offload_probe' [-Wmissing-prototypes] 1425 | void qc_usb_audio_offload_probe(struct usb_interface *intf, struct snd_usb_audio *chip) | ^~~~~~~~~~~~~~~~~~~~~~~~~~ >> sound/usb/qcom/qc_audio_offload.c:1469:6: warning: no previous prototype for 'qc_usb_audio_offload_disconnect' [-Wmissing-prototypes] 1469 | void qc_usb_audio_offload_disconnect(struct usb_interface *intf) | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ vim +/qc_usb_audio_offload_init_qmi_dev +1394 sound/usb/qcom/qc_audio_offload.c 1393 > 1394 int qc_usb_audio_offload_init_qmi_dev(void) 1395 { 1396 struct q6usb_offload *data; 1397 1398 uaudio_qdev = kzalloc(sizeof(struct uaudio_qmi_dev), 1399 GFP_KERNEL); 1400 if (!uaudio_qdev) 1401 return -ENOMEM; 1402 1403 /* initialize xfer ring and xfer buf iova list */ 1404 INIT_LIST_HEAD(&uaudio_qdev->xfer_ring_list); 1405 uaudio_qdev->curr_xfer_ring_iova = IOVA_XFER_RING_BASE; 1406 uaudio_qdev->xfer_ring_iova_size = 1407 IOVA_XFER_RING_MAX - IOVA_XFER_RING_BASE; 1408 1409 INIT_LIST_HEAD(&uaudio_qdev->xfer_buf_list); 1410 uaudio_qdev->curr_xfer_buf_iova = IOVA_XFER_BUF_BASE; 1411 uaudio_qdev->xfer_buf_iova_size = 1412 IOVA_XFER_BUF_MAX - IOVA_XFER_BUF_BASE; 1413 1414 data = snd_soc_usb_get_priv_data(); 1415 if (data) { 1416 uaudio_qdev->domain = data->domain; 1417 uaudio_qdev->intr_num = data->intr_num; 1418 uaudio_qdev->sid = data->sid; 1419 uaudio_qdev->dev = data->dev; 1420 } 1421 1422 return 0; 1423 } 1424 > 1425 void qc_usb_audio_offload_probe(struct usb_interface *intf, struct snd_usb_audio *chip) 1426 { 1427 if (!uaudio_qdev) 1428 qc_usb_audio_offload_init_qmi_dev(); 1429 1430 atomic_inc(&uaudio_qdev->qdev_in_use); 1431 uadev[chip->card->number].chip = chip; 1432 uaudio_qdev->last_card_num = chip->card->number; 1433 snd_soc_usb_connect(chip->index); 1434 } 1435 1436 static void uaudio_dev_cleanup(struct uaudio_dev *dev) 1437 { 1438 int if_idx; 1439 1440 if (!dev->udev) { 1441 pr_info("USB audio device memory is already freed.\n"); 1442 return; 1443 } 1444 1445 /* free xfer buffer and unmap xfer ring and buf per interface */ 1446 for (if_idx = 0; if_idx < dev->num_intf; if_idx++) { 1447 if (!dev->info[if_idx].in_use) 1448 continue; 1449 uaudio_dev_intf_cleanup(dev->udev, &dev->info[if_idx]); 1450 pr_debug("release resources: intf# %d card# %d\n", 1451 dev->info[if_idx].intf_num, dev->card_num); 1452 } 1453 1454 dev->num_intf = 0; 1455 1456 /* free interface info */ 1457 kfree(dev->info); 1458 dev->info = NULL; 1459 uaudio_event_ring_cleanup_free(dev); 1460 dev->udev = NULL; 1461 } 1462 1463 static void qc_usb_audio_cleanup_qmi_dev(void) 1464 { 1465 kfree(uaudio_qdev); 1466 uaudio_qdev = NULL; 1467 } 1468 > 1469 void qc_usb_audio_offload_disconnect(struct usb_interface *intf) 1470 { 1471 int ret; 1472 struct snd_usb_audio *chip = usb_get_intfdata(intf); 1473 struct uaudio_dev *dev; 1474 int card_num; 1475 struct uaudio_qmi_svc *svc = uaudio_svc; 1476 struct qmi_uaudio_stream_ind_msg_v01 disconnect_ind = {0}; 1477 1478 if (!chip) { 1479 pr_err("chip is NULL\n"); 1480 return; 1481 } 1482 1483 card_num = chip->card->number; 1484 pr_debug("intf: %s: %p chip: %p card: %d\n", dev_name(&intf->dev), 1485 intf, chip, card_num); 1486 1487 if (card_num >= SNDRV_CARDS) { 1488 pr_err("invalid card number\n"); 1489 return; 1490 } 1491 1492 dev = &uadev[card_num]; 1493 1494 /* clean up */ 1495 if (!dev->udev) { 1496 pr_debug("no clean up required\n"); 1497 goto done; 1498 } 1499 1500 if (atomic_read(&dev->in_use)) { 1501 pr_debug("sending qmi indication disconnect\n"); 1502 pr_debug("sq->sq_family:%x sq->sq_node:%x sq->sq_port:%x\n", 1503 svc->client_sq.sq_family, 1504 svc->client_sq.sq_node, svc->client_sq.sq_port); 1505 disconnect_ind.dev_event = USB_AUDIO_DEV_DISCONNECT_V01; 1506 disconnect_ind.slot_id = dev->udev->slot_id; 1507 disconnect_ind.controller_num = dev->usb_core_id; 1508 disconnect_ind.controller_num_valid = 1; 1509 ret = qmi_send_indication(svc->uaudio_svc_hdl, &svc->client_sq, 1510 QMI_UAUDIO_STREAM_IND_V01, 1511 QMI_UAUDIO_STREAM_IND_MSG_V01_MAX_MSG_LEN, 1512 qmi_uaudio_stream_ind_msg_v01_ei, 1513 &disconnect_ind); 1514 if (ret < 0) 1515 pr_err("qmi send failed with err: %d\n", ret); 1516 1517 ret = wait_event_interruptible_timeout(dev->disconnect_wq, 1518 !atomic_read(&dev->in_use), 1519 msecs_to_jiffies(DEV_RELEASE_WAIT_TIMEOUT)); 1520 if (!ret) { 1521 pr_err("timeout while waiting for dev_release\n"); 1522 atomic_set(&dev->in_use, 0); 1523 } else if (ret < 0) { 1524 pr_err("failed with ret %d\n", ret); 1525 atomic_set(&dev->in_use, 0); 1526 } 1527 } 1528 1529 uaudio_dev_cleanup(dev); 1530 done: 1531 uadev[card_num].chip = NULL; 1532 1533 atomic_dec(&uaudio_qdev->qdev_in_use); 1534 if (!atomic_read(&uaudio_qdev->qdev_in_use)) { 1535 snd_soc_usb_disconnect(); 1536 qc_usb_audio_cleanup_qmi_dev(); 1537 } 1538 } 1539 -- 0-DAY CI Kernel Test Service https://01.org/lkp