Hi Youssef, kernel test robot noticed the following build errors:
[auto build test ERROR on drm-misc/drm-misc-next] [also build test ERROR on linus/master v6.19-rc2 next-20251219] [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/Youssef-Samir/accel-qaic-Handle-DBC-deactivation-if-the-owner-went-away/20251223-233305 base: https://gitlab.freedesktop.org/drm/misc/kernel.git drm-misc-next patch link: https://lore.kernel.org/r/20251223153151.2232297-1-youssef.abdulrahman%40oss.qualcomm.com patch subject: [PATCH] accel/qaic: Handle DBC deactivation if the owner went away config: i386-randconfig-012-20251224 (https://download.01.org/0day-ci/archive/20251224/[email protected]/config) compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251224/[email protected]/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All errors (new ones prefixed by >>): >> drivers/accel/qaic/qaic_control.c:1471:1: error: function definition is not >> allowed here 1471 | { | ^ drivers/accel/qaic/qaic_control.c:1484:1: error: function definition is not allowed here 1484 | { | ^ drivers/accel/qaic/qaic_control.c:1492:1: error: function definition is not allowed here 1492 | { | ^ drivers/accel/qaic/qaic_control.c:1515:1: error: function definition is not allowed here 1515 | { | ^ drivers/accel/qaic/qaic_control.c:1539:1: error: function definition is not allowed here 1539 | { | ^ drivers/accel/qaic/qaic_control.c:1544:1: error: function definition is not allowed here 1544 | { | ^ drivers/accel/qaic/qaic_control.c:1592:1: error: function definition is not allowed here 1592 | { | ^ >> drivers/accel/qaic/qaic_control.c:1602:2: error: expected '}' 1602 | } | ^ drivers/accel/qaic/qaic_control.c:1404:1: note: to match this '{' 1404 | { | ^ 8 errors generated. vim +1471 drivers/accel/qaic/qaic_control.c 129776ac2e3823 Jeff Hugo 2023-03-27 1469 129776ac2e3823 Jeff Hugo 2023-03-27 1470 static void free_wrapper_from_list(struct wrapper_list *wrappers, struct wrapper_msg *wrapper) 129776ac2e3823 Jeff Hugo 2023-03-27 @1471 { 129776ac2e3823 Jeff Hugo 2023-03-27 1472 bool all_done = false; 129776ac2e3823 Jeff Hugo 2023-03-27 1473 129776ac2e3823 Jeff Hugo 2023-03-27 1474 spin_lock(&wrappers->lock); 129776ac2e3823 Jeff Hugo 2023-03-27 1475 kref_put(&wrapper->ref_count, free_wrapper); 129776ac2e3823 Jeff Hugo 2023-03-27 1476 all_done = list_empty(&wrappers->list); 129776ac2e3823 Jeff Hugo 2023-03-27 1477 spin_unlock(&wrappers->lock); 129776ac2e3823 Jeff Hugo 2023-03-27 1478 129776ac2e3823 Jeff Hugo 2023-03-27 1479 if (all_done) 129776ac2e3823 Jeff Hugo 2023-03-27 1480 kfree(wrappers); 129776ac2e3823 Jeff Hugo 2023-03-27 1481 } 129776ac2e3823 Jeff Hugo 2023-03-27 1482 129776ac2e3823 Jeff Hugo 2023-03-27 1483 void qaic_mhi_ul_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result) 129776ac2e3823 Jeff Hugo 2023-03-27 1484 { 129776ac2e3823 Jeff Hugo 2023-03-27 1485 struct wire_msg *msg = mhi_result->buf_addr; 129776ac2e3823 Jeff Hugo 2023-03-27 1486 struct wrapper_msg *wrapper = container_of(msg, struct wrapper_msg, msg); 129776ac2e3823 Jeff Hugo 2023-03-27 1487 129776ac2e3823 Jeff Hugo 2023-03-27 1488 free_wrapper_from_list(wrapper->head, wrapper); 129776ac2e3823 Jeff Hugo 2023-03-27 1489 } 129776ac2e3823 Jeff Hugo 2023-03-27 1490 129776ac2e3823 Jeff Hugo 2023-03-27 1491 void qaic_mhi_dl_xfer_cb(struct mhi_device *mhi_dev, struct mhi_result *mhi_result) 129776ac2e3823 Jeff Hugo 2023-03-27 1492 { 129776ac2e3823 Jeff Hugo 2023-03-27 1493 struct qaic_device *qdev = dev_get_drvdata(&mhi_dev->dev); 129776ac2e3823 Jeff Hugo 2023-03-27 1494 struct wire_msg *msg = mhi_result->buf_addr; 129776ac2e3823 Jeff Hugo 2023-03-27 1495 struct resp_work *resp; 129776ac2e3823 Jeff Hugo 2023-03-27 1496 129776ac2e3823 Jeff Hugo 2023-03-27 1497 if (mhi_result->transaction_status || msg->hdr.magic_number != MANAGE_MAGIC_NUMBER) { 129776ac2e3823 Jeff Hugo 2023-03-27 1498 kfree(msg); 129776ac2e3823 Jeff Hugo 2023-03-27 1499 return; 129776ac2e3823 Jeff Hugo 2023-03-27 1500 } 129776ac2e3823 Jeff Hugo 2023-03-27 1501 129776ac2e3823 Jeff Hugo 2023-03-27 1502 resp = kmalloc(sizeof(*resp), GFP_ATOMIC); 129776ac2e3823 Jeff Hugo 2023-03-27 1503 if (!resp) { 129776ac2e3823 Jeff Hugo 2023-03-27 1504 kfree(msg); 129776ac2e3823 Jeff Hugo 2023-03-27 1505 return; 129776ac2e3823 Jeff Hugo 2023-03-27 1506 } 129776ac2e3823 Jeff Hugo 2023-03-27 1507 129776ac2e3823 Jeff Hugo 2023-03-27 1508 INIT_WORK(&resp->work, resp_worker); 129776ac2e3823 Jeff Hugo 2023-03-27 1509 resp->qdev = qdev; 129776ac2e3823 Jeff Hugo 2023-03-27 1510 resp->buf = msg; 129776ac2e3823 Jeff Hugo 2023-03-27 1511 queue_work(qdev->cntl_wq, &resp->work); 129776ac2e3823 Jeff Hugo 2023-03-27 1512 } 129776ac2e3823 Jeff Hugo 2023-03-27 1513 129776ac2e3823 Jeff Hugo 2023-03-27 1514 int qaic_control_open(struct qaic_device *qdev) 129776ac2e3823 Jeff Hugo 2023-03-27 1515 { 129776ac2e3823 Jeff Hugo 2023-03-27 1516 if (!qdev->cntl_ch) 129776ac2e3823 Jeff Hugo 2023-03-27 1517 return -ENODEV; 129776ac2e3823 Jeff Hugo 2023-03-27 1518 129776ac2e3823 Jeff Hugo 2023-03-27 1519 qdev->cntl_lost_buf = false; 129776ac2e3823 Jeff Hugo 2023-03-27 1520 /* 129776ac2e3823 Jeff Hugo 2023-03-27 1521 * By default qaic should assume that device has CRC enabled. 129776ac2e3823 Jeff Hugo 2023-03-27 1522 * Qaic comes to know if device has CRC enabled or disabled during the 129776ac2e3823 Jeff Hugo 2023-03-27 1523 * device status transaction, which is the first transaction performed 129776ac2e3823 Jeff Hugo 2023-03-27 1524 * on control channel. 129776ac2e3823 Jeff Hugo 2023-03-27 1525 * 129776ac2e3823 Jeff Hugo 2023-03-27 1526 * So CRC validation of first device status transaction response is 129776ac2e3823 Jeff Hugo 2023-03-27 1527 * ignored (by calling valid_crc_stub) and is done later during decoding 129776ac2e3823 Jeff Hugo 2023-03-27 1528 * if device has CRC enabled. 129776ac2e3823 Jeff Hugo 2023-03-27 1529 * Now that qaic knows whether device has CRC enabled or not it acts 129776ac2e3823 Jeff Hugo 2023-03-27 1530 * accordingly. 129776ac2e3823 Jeff Hugo 2023-03-27 1531 */ 129776ac2e3823 Jeff Hugo 2023-03-27 1532 qdev->gen_crc = gen_crc; 129776ac2e3823 Jeff Hugo 2023-03-27 1533 qdev->valid_crc = valid_crc_stub; 129776ac2e3823 Jeff Hugo 2023-03-27 1534 129776ac2e3823 Jeff Hugo 2023-03-27 1535 return mhi_prepare_for_transfer(qdev->cntl_ch); 129776ac2e3823 Jeff Hugo 2023-03-27 1536 } 129776ac2e3823 Jeff Hugo 2023-03-27 1537 129776ac2e3823 Jeff Hugo 2023-03-27 1538 void qaic_control_close(struct qaic_device *qdev) 129776ac2e3823 Jeff Hugo 2023-03-27 1539 { 129776ac2e3823 Jeff Hugo 2023-03-27 1540 mhi_unprepare_from_transfer(qdev->cntl_ch); 129776ac2e3823 Jeff Hugo 2023-03-27 1541 } 129776ac2e3823 Jeff Hugo 2023-03-27 1542 129776ac2e3823 Jeff Hugo 2023-03-27 1543 void qaic_release_usr(struct qaic_device *qdev, struct qaic_user *usr) 129776ac2e3823 Jeff Hugo 2023-03-27 1544 { 129776ac2e3823 Jeff Hugo 2023-03-27 1545 struct wire_trans_terminate_to_dev *trans; 129776ac2e3823 Jeff Hugo 2023-03-27 1546 struct wrapper_list *wrappers; 129776ac2e3823 Jeff Hugo 2023-03-27 1547 struct wrapper_msg *wrapper; 129776ac2e3823 Jeff Hugo 2023-03-27 1548 struct wire_msg *msg; 129776ac2e3823 Jeff Hugo 2023-03-27 1549 struct wire_msg *rsp; 129776ac2e3823 Jeff Hugo 2023-03-27 1550 129776ac2e3823 Jeff Hugo 2023-03-27 1551 wrappers = alloc_wrapper_list(); 129776ac2e3823 Jeff Hugo 2023-03-27 1552 if (!wrappers) 129776ac2e3823 Jeff Hugo 2023-03-27 1553 return; 129776ac2e3823 Jeff Hugo 2023-03-27 1554 129776ac2e3823 Jeff Hugo 2023-03-27 1555 wrapper = add_wrapper(wrappers, sizeof(*wrapper) + sizeof(*msg) + sizeof(*trans)); 129776ac2e3823 Jeff Hugo 2023-03-27 1556 if (!wrapper) 129776ac2e3823 Jeff Hugo 2023-03-27 1557 return; 129776ac2e3823 Jeff Hugo 2023-03-27 1558 129776ac2e3823 Jeff Hugo 2023-03-27 1559 msg = &wrapper->msg; 129776ac2e3823 Jeff Hugo 2023-03-27 1560 129776ac2e3823 Jeff Hugo 2023-03-27 1561 trans = (struct wire_trans_terminate_to_dev *)msg->data; 129776ac2e3823 Jeff Hugo 2023-03-27 1562 129776ac2e3823 Jeff Hugo 2023-03-27 1563 trans->hdr.type = cpu_to_le32(QAIC_TRANS_TERMINATE_TO_DEV); 129776ac2e3823 Jeff Hugo 2023-03-27 1564 trans->hdr.len = cpu_to_le32(sizeof(*trans)); 129776ac2e3823 Jeff Hugo 2023-03-27 1565 trans->handle = cpu_to_le32(usr->handle); 129776ac2e3823 Jeff Hugo 2023-03-27 1566 129776ac2e3823 Jeff Hugo 2023-03-27 1567 mutex_lock(&qdev->cntl_mutex); 129776ac2e3823 Jeff Hugo 2023-03-27 1568 wrapper->len = sizeof(msg->hdr) + sizeof(*trans); 129776ac2e3823 Jeff Hugo 2023-03-27 1569 msg->hdr.magic_number = MANAGE_MAGIC_NUMBER; 129776ac2e3823 Jeff Hugo 2023-03-27 1570 msg->hdr.sequence_number = cpu_to_le32(qdev->next_seq_num++); 129776ac2e3823 Jeff Hugo 2023-03-27 1571 msg->hdr.len = cpu_to_le32(wrapper->len); 129776ac2e3823 Jeff Hugo 2023-03-27 1572 msg->hdr.count = cpu_to_le32(1); 129776ac2e3823 Jeff Hugo 2023-03-27 1573 msg->hdr.handle = cpu_to_le32(usr->handle); 129776ac2e3823 Jeff Hugo 2023-03-27 1574 msg->hdr.padding = cpu_to_le32(0); 129776ac2e3823 Jeff Hugo 2023-03-27 1575 msg->hdr.crc32 = cpu_to_le32(qdev->gen_crc(wrappers)); 129776ac2e3823 Jeff Hugo 2023-03-27 1576 129776ac2e3823 Jeff Hugo 2023-03-27 1577 /* 129776ac2e3823 Jeff Hugo 2023-03-27 1578 * msg_xfer releases the mutex 129776ac2e3823 Jeff Hugo 2023-03-27 1579 * We don't care about the return of msg_xfer since we will not do 129776ac2e3823 Jeff Hugo 2023-03-27 1580 * anything different based on what happens. 129776ac2e3823 Jeff Hugo 2023-03-27 1581 * We ignore pending signals since one will be set if the user is 129776ac2e3823 Jeff Hugo 2023-03-27 1582 * killed, and we need give the device a chance to cleanup, otherwise 129776ac2e3823 Jeff Hugo 2023-03-27 1583 * DMA may still be in progress when we return. 129776ac2e3823 Jeff Hugo 2023-03-27 1584 */ 129776ac2e3823 Jeff Hugo 2023-03-27 1585 rsp = msg_xfer(qdev, wrappers, qdev->next_seq_num - 1, true); 129776ac2e3823 Jeff Hugo 2023-03-27 1586 if (!IS_ERR(rsp)) 129776ac2e3823 Jeff Hugo 2023-03-27 1587 kfree(rsp); 129776ac2e3823 Jeff Hugo 2023-03-27 1588 free_wrapper_from_list(wrappers, wrapper); 129776ac2e3823 Jeff Hugo 2023-03-27 1589 } 129776ac2e3823 Jeff Hugo 2023-03-27 1590 129776ac2e3823 Jeff Hugo 2023-03-27 1591 void wake_all_cntl(struct qaic_device *qdev) 129776ac2e3823 Jeff Hugo 2023-03-27 1592 { 129776ac2e3823 Jeff Hugo 2023-03-27 1593 struct xfer_queue_elem *elem; 129776ac2e3823 Jeff Hugo 2023-03-27 1594 struct xfer_queue_elem *i; 129776ac2e3823 Jeff Hugo 2023-03-27 1595 129776ac2e3823 Jeff Hugo 2023-03-27 1596 mutex_lock(&qdev->cntl_mutex); 129776ac2e3823 Jeff Hugo 2023-03-27 1597 list_for_each_entry_safe(elem, i, &qdev->cntl_xfer_list, list) { 129776ac2e3823 Jeff Hugo 2023-03-27 1598 list_del_init(&elem->list); 129776ac2e3823 Jeff Hugo 2023-03-27 1599 complete_all(&elem->xfer_done); 129776ac2e3823 Jeff Hugo 2023-03-27 1600 } 129776ac2e3823 Jeff Hugo 2023-03-27 1601 mutex_unlock(&qdev->cntl_mutex); 129776ac2e3823 Jeff Hugo 2023-03-27 @1602 } -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki
