From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============8419861288328691249==" MIME-Version: 1.0 From: Leon Romanovsky To: kbuild-all@lists.01.org Subject: Re: [leon-rdma:rdma-next 13/42] drivers/infiniband/hw/mlx5/odp.c:1544 mlx5r_odp_create_eq() warn: missing error code 'err' Date: Fri, 12 Mar 2021 13:16:15 +0200 Message-ID: In-Reply-To: <202103121147.T1JKjuZV-lkp@intel.com> List-Id: --===============8419861288328691249== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On Fri, Mar 12, 2021 at 11:04:49AM +0800, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.g= it rdma-next > head: 05f9b877d9328976740745c6f5451a83685920d6 > commit: 44d753250016442d012948cd500e94dfb4f1eea4 [13/42] RDMA/mlx5: Creat= e ODP EQ only when ODP MR is created > config: arc-randconfig-m031-20210311 (attached as .config) > compiler: arceb-elf-gcc (GCC) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > New smatch warnings: > drivers/infiniband/hw/mlx5/odp.c:1544 mlx5r_odp_create_eq() warn: missing= error code 'err' It is false alarm, we are returning err which is set to be 0. Thanks > > Old smatch warnings: > drivers/infiniband/hw/mlx5/odp.c:264 mlx5_ib_invalidate_range() warn: sho= uld '(((1))) << (umem_odp->page_shift)' be a 64 bit type? > > vim +/err +1544 drivers/infiniband/hw/mlx5/odp.c > > 1533 > 1534 int mlx5r_odp_create_eq(struct mlx5_ib_dev *dev, struct mlx5_ib_pf= _eq *eq) > 1535 { > 1536 struct mlx5_eq_param param =3D {}; > 1537 int err =3D 0; > 1538 > 1539 if (eq->core) > 1540 return 0; > 1541 > 1542 mutex_lock(&dev->odp_eq_mutex); > 1543 if (eq->core) > > 1544 goto unlock; > 1545 INIT_WORK(&eq->work, mlx5_ib_eq_pf_action); > 1546 spin_lock_init(&eq->lock); > 1547 eq->dev =3D dev; > 1548 > 1549 eq->pool =3D mempool_create_kmalloc_pool(MLX5_IB_NUM_PF_DRAIN, > 1550 sizeof(struct mlx5_pagefault)); > 1551 if (!eq->pool) { > 1552 err =3D -ENOMEM; > 1553 goto unlock; > 1554 } > 1555 > 1556 eq->wq =3D alloc_workqueue("mlx5_ib_page_fault", > 1557 WQ_HIGHPRI | WQ_UNBOUND | WQ_MEM_RECLAIM, > 1558 MLX5_NUM_CMD_EQE); > 1559 if (!eq->wq) { > 1560 err =3D -ENOMEM; > 1561 goto err_mempool; > 1562 } > 1563 > 1564 eq->irq_nb.notifier_call =3D mlx5_ib_eq_pf_int; > 1565 param =3D (struct mlx5_eq_param){ > 1566 .irq_index =3D 0, > 1567 .nent =3D MLX5_IB_NUM_PF_EQE, > 1568 }; > 1569 param.mask[0] =3D 1ull << MLX5_EVENT_TYPE_PAGE_FAULT; > 1570 eq->core =3D mlx5_eq_create_generic(dev->mdev, ¶m); > 1571 if (IS_ERR(eq->core)) { > 1572 err =3D PTR_ERR(eq->core); > 1573 goto err_wq; > 1574 } > 1575 err =3D mlx5_eq_enable(dev->mdev, eq->core, &eq->irq_nb); > 1576 if (err) { > 1577 mlx5_ib_err(dev, "failed to enable odp EQ %d\n", err); > 1578 goto err_eq; > 1579 } > 1580 > 1581 mutex_unlock(&dev->odp_eq_mutex); > 1582 return 0; > 1583 err_eq: > 1584 mlx5_eq_destroy_generic(dev->mdev, eq->core); > 1585 err_wq: > 1586 eq->core =3D NULL; > 1587 destroy_workqueue(eq->wq); > 1588 err_mempool: > 1589 mempool_destroy(eq->pool); > 1590 unlock: > 1591 mutex_unlock(&dev->odp_eq_mutex); > 1592 return err; > 1593 } > 1594 > > --- > 0-DAY CI Kernel Test Service, Intel Corporation > https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============8419861288328691249==--