Hi "Håkon, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on rdma/for-next] [also build test WARNING on v5.13-rc7 next-20210624] [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] url: https://github.com/0day-ci/linux/commits/H-kon-Bugge/RDMA-core-sa_query-Remove-unused-argument/20210625-163535 base: https://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma.git for-next config: xtensa-allyesconfig (attached as .config) compiler: xtensa-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 # https://github.com/0day-ci/linux/commit/221208707e992338935b3e2e4d87aadbadf898c3 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review H-kon-Bugge/RDMA-core-sa_query-Remove-unused-argument/20210625-163535 git checkout 221208707e992338935b3e2e4d87aadbadf898c3 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): drivers/infiniband/core/sa_query.c: In function 'ib_sa_path_rec_get': drivers/infiniband/core/sa_query.c:1567:67: error: expected ';' before 'if' 1567 | status = opa_pr_query_possible(client, sa_dev, device, port_num) | ^ | ; 1568 | if (status == PR_NOT_SUPPORTED) { | ~~ drivers/infiniband/core/sa_query.c:1631:1: warning: label 'err1' defined but not used [-Wunused-label] 1631 | err1: | ^~~~ >> drivers/infiniband/core/sa_query.c:1548:24: warning: variable 'status' set but not used [-Wunused-but-set-variable] 1548 | enum opa_pr_supported status; | ^~~~~~ vim +/status +1548 drivers/infiniband/core/sa_query.c ^1da177e4c3f41 Linus Torvalds 2005-04-16 1506 ^1da177e4c3f41 Linus Torvalds 2005-04-16 1507 /** ^1da177e4c3f41 Linus Torvalds 2005-04-16 1508 * ib_sa_path_rec_get - Start a Path get query c1a0b23bf477c2 Michael S. Tsirkin 2006-08-21 1509 * @client:SA client ^1da177e4c3f41 Linus Torvalds 2005-04-16 1510 * @device:device to send query on ^1da177e4c3f41 Linus Torvalds 2005-04-16 1511 * @port_num: port number to send query on ^1da177e4c3f41 Linus Torvalds 2005-04-16 1512 * @rec:Path Record to send in query ^1da177e4c3f41 Linus Torvalds 2005-04-16 1513 * @comp_mask:component mask to send in query ^1da177e4c3f41 Linus Torvalds 2005-04-16 1514 * @timeout_ms:time to wait for response ^1da177e4c3f41 Linus Torvalds 2005-04-16 1515 * @gfp_mask:GFP mask to use for internal allocations ^1da177e4c3f41 Linus Torvalds 2005-04-16 1516 * @callback:function called when query completes, times out or is ^1da177e4c3f41 Linus Torvalds 2005-04-16 1517 * canceled ^1da177e4c3f41 Linus Torvalds 2005-04-16 1518 * @context:opaque user context passed to callback ^1da177e4c3f41 Linus Torvalds 2005-04-16 1519 * @sa_query:query context, used to cancel query ^1da177e4c3f41 Linus Torvalds 2005-04-16 1520 * ^1da177e4c3f41 Linus Torvalds 2005-04-16 1521 * Send a Path Record Get query to the SA to look up a path. The ^1da177e4c3f41 Linus Torvalds 2005-04-16 1522 * callback function will be called when the query completes (or ^1da177e4c3f41 Linus Torvalds 2005-04-16 1523 * fails); status is 0 for a successful response, -EINTR if the query ^1da177e4c3f41 Linus Torvalds 2005-04-16 1524 * is canceled, -ETIMEDOUT is the query timed out, or -EIO if an error ^1da177e4c3f41 Linus Torvalds 2005-04-16 1525 * occurred sending the query. The resp parameter of the callback is ^1da177e4c3f41 Linus Torvalds 2005-04-16 1526 * only valid if status is 0. ^1da177e4c3f41 Linus Torvalds 2005-04-16 1527 * ^1da177e4c3f41 Linus Torvalds 2005-04-16 1528 * If the return value of ib_sa_path_rec_get() is negative, it is an ^1da177e4c3f41 Linus Torvalds 2005-04-16 1529 * error code. Otherwise it is a query ID that can be used to cancel ^1da177e4c3f41 Linus Torvalds 2005-04-16 1530 * the query. ^1da177e4c3f41 Linus Torvalds 2005-04-16 1531 */ c1a0b23bf477c2 Michael S. Tsirkin 2006-08-21 1532 int ib_sa_path_rec_get(struct ib_sa_client *client, 1fb7f8973f51ca Mark Bloch 2021-03-01 1533 struct ib_device *device, u32 port_num, c2f8fc4ec44009 Dasaratharaman Chandramouli 2017-04-27 1534 struct sa_path_rec *rec, ^1da177e4c3f41 Linus Torvalds 2005-04-16 1535 ib_sa_comp_mask comp_mask, dbace111e5b320 Leon Romanovsky 2018-10-11 1536 unsigned long timeout_ms, gfp_t gfp_mask, ^1da177e4c3f41 Linus Torvalds 2005-04-16 1537 void (*callback)(int status, c2f8fc4ec44009 Dasaratharaman Chandramouli 2017-04-27 1538 struct sa_path_rec *resp, ^1da177e4c3f41 Linus Torvalds 2005-04-16 1539 void *context), ^1da177e4c3f41 Linus Torvalds 2005-04-16 1540 void *context, ^1da177e4c3f41 Linus Torvalds 2005-04-16 1541 struct ib_sa_query **sa_query) ^1da177e4c3f41 Linus Torvalds 2005-04-16 1542 { ^1da177e4c3f41 Linus Torvalds 2005-04-16 1543 struct ib_sa_path_query *query; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1544 struct ib_sa_device *sa_dev = ib_get_client_data(device, &sa_client); 56c202d6e4f542 Roland Dreier 2005-10-13 1545 struct ib_sa_port *port; 56c202d6e4f542 Roland Dreier 2005-10-13 1546 struct ib_mad_agent *agent; 34816ad98efe4d Sean Hefty 2005-10-25 1547 struct ib_sa_mad *mad; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 @1548 enum opa_pr_supported status; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1549 int ret; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1550 56c202d6e4f542 Roland Dreier 2005-10-13 1551 if (!sa_dev) 56c202d6e4f542 Roland Dreier 2005-10-13 1552 return -ENODEV; 56c202d6e4f542 Roland Dreier 2005-10-13 1553 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1554 if ((rec->rec_type != SA_PATH_REC_TYPE_IB) && 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1555 (rec->rec_type != SA_PATH_REC_TYPE_OPA)) dfa834e1d97e24 Dasaratharaman Chandramouli 2017-04-27 1556 return -EINVAL; dfa834e1d97e24 Dasaratharaman Chandramouli 2017-04-27 1557 56c202d6e4f542 Roland Dreier 2005-10-13 1558 port = &sa_dev->port[port_num - sa_dev->start_port]; 56c202d6e4f542 Roland Dreier 2005-10-13 1559 agent = port->agent; 56c202d6e4f542 Roland Dreier 2005-10-13 1560 5d2657708ec25b Kaike Wan 2015-08-14 1561 query = kzalloc(sizeof(*query), gfp_mask); ^1da177e4c3f41 Linus Torvalds 2005-04-16 1562 if (!query) ^1da177e4c3f41 Linus Torvalds 2005-04-16 1563 return -ENOMEM; 34816ad98efe4d Sean Hefty 2005-10-25 1564 2aec5c602c6a44 Sean Hefty 2007-06-18 1565 query->sa_query.port = port; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1566 if (rec->rec_type == SA_PATH_REC_TYPE_OPA) { 221208707e9923 Håkon Bugge 2021-06-25 1567 status = opa_pr_query_possible(client, sa_dev, device, port_num) 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1568 if (status == PR_NOT_SUPPORTED) { 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1569 ret = -EINVAL; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1570 goto err1; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1571 } else if (status == PR_OPA_SUPPORTED) { 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1572 query->sa_query.flags |= IB_SA_QUERY_OPA; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1573 } else { 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1574 query->conv_pr = 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1575 kmalloc(sizeof(*query->conv_pr), gfp_mask); 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1576 if (!query->conv_pr) { 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1577 ret = -ENOMEM; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1578 goto err1; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1579 } 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1580 } 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1581 } 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1582 2aec5c602c6a44 Sean Hefty 2007-06-18 1583 ret = alloc_mad(&query->sa_query, gfp_mask); 2aec5c602c6a44 Sean Hefty 2007-06-18 1584 if (ret) 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1585 goto err2; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1586 c1a0b23bf477c2 Michael S. Tsirkin 2006-08-21 1587 ib_sa_client_get(client); c1a0b23bf477c2 Michael S. Tsirkin 2006-08-21 1588 query->sa_query.client = client; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1589 query->callback = callback; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1590 query->context = context; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1591 34816ad98efe4d Sean Hefty 2005-10-25 1592 mad = query->sa_query.mad_buf->mad; 2196f2716292c3 Dasaratharaman Chandramouli 2017-04-28 1593 init_mad(&query->sa_query, agent); ^1da177e4c3f41 Linus Torvalds 2005-04-16 1594 e4f50f003dc568 Roland Dreier 2005-05-25 1595 query->sa_query.callback = callback ? ib_sa_path_rec_callback : NULL; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1596 query->sa_query.release = ib_sa_path_rec_release; 34816ad98efe4d Sean Hefty 2005-10-25 1597 mad->mad_hdr.method = IB_MGMT_METHOD_GET; 34816ad98efe4d Sean Hefty 2005-10-25 1598 mad->mad_hdr.attr_id = cpu_to_be16(IB_SA_ATTR_PATH_REC); 34816ad98efe4d Sean Hefty 2005-10-25 1599 mad->sa_hdr.comp_mask = comp_mask; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1600 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1601 if (query->sa_query.flags & IB_SA_QUERY_OPA) { 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1602 ib_pack(opa_path_rec_table, ARRAY_SIZE(opa_path_rec_table), 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1603 rec, mad->data); 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1604 } else if (query->conv_pr) { 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1605 sa_convert_path_opa_to_ib(query->conv_pr, rec); 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1606 ib_pack(path_rec_table, ARRAY_SIZE(path_rec_table), 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1607 query->conv_pr, mad->data); 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1608 } else { 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1609 ib_pack(path_rec_table, ARRAY_SIZE(path_rec_table), 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1610 rec, mad->data); 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1611 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 1612 ^1da177e4c3f41 Linus Torvalds 2005-04-16 1613 *sa_query = &query->sa_query; dae4c1d2362292 Roland Dreier 2005-06-27 1614 2ca546b92a024d Kaike Wan 2015-08-14 1615 query->sa_query.flags |= IB_SA_ENABLE_LOCAL_SERVICE; 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1616 query->sa_query.mad_buf->context[1] = (query->conv_pr) ? 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1617 query->conv_pr : rec; 2ca546b92a024d Kaike Wan 2015-08-14 1618 e322fedf0c5993 Michael S. Tsirkin 2006-07-14 1619 ret = send_mad(&query->sa_query, timeout_ms, gfp_mask); 34816ad98efe4d Sean Hefty 2005-10-25 1620 if (ret < 0) 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1621 goto err3; 34816ad98efe4d Sean Hefty 2005-10-25 1622 34816ad98efe4d Sean Hefty 2005-10-25 1623 return ret; 34816ad98efe4d Sean Hefty 2005-10-25 1624 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1625 err3: ^1da177e4c3f41 Linus Torvalds 2005-04-16 1626 *sa_query = NULL; c1a0b23bf477c2 Michael S. Tsirkin 2006-08-21 1627 ib_sa_client_put(query->sa_query.client); 2aec5c602c6a44 Sean Hefty 2007-06-18 1628 free_mad(&query->sa_query); 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1629 err2: 4c33bd1926ccbf Dasaratharaman Chandramouli 2017-04-27 1630 kfree(query->conv_pr); 34816ad98efe4d Sean Hefty 2005-10-25 1631 err1: 34816ad98efe4d Sean Hefty 2005-10-25 1632 kfree(query); dae4c1d2362292 Roland Dreier 2005-06-27 1633 return ret; ^1da177e4c3f41 Linus Torvalds 2005-04-16 1634 } ^1da177e4c3f41 Linus Torvalds 2005-04-16 1635 EXPORT_SYMBOL(ib_sa_path_rec_get); ^1da177e4c3f41 Linus Torvalds 2005-04-16 1636 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip