All of lore.kernel.org
 help / color / mirror / Atom feed
From: Leon Romanovsky <leonro@nvidia.com>
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	[thread overview]
Message-ID: <YEtNf8dTozeka9vN@unreal> (raw)
In-Reply-To: <202103121147.T1JKjuZV-lkp@intel.com>

[-- Attachment #1: Type: text/plain, Size: 3053 bytes --]

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.git rdma-next
> head:   05f9b877d9328976740745c6f5451a83685920d6
> commit: 44d753250016442d012948cd500e94dfb4f1eea4 [13/42] RDMA/mlx5: Create 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 <lkp@intel.com>
>
> 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: should '(((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 = {};
>   1537		int err = 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 = dev;
>   1548
>   1549		eq->pool = mempool_create_kmalloc_pool(MLX5_IB_NUM_PF_DRAIN,
>   1550						       sizeof(struct mlx5_pagefault));
>   1551		if (!eq->pool) {
>   1552			err = -ENOMEM;
>   1553			goto unlock;
>   1554		}
>   1555
>   1556		eq->wq = 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 = -ENOMEM;
>   1561			goto err_mempool;
>   1562		}
>   1563
>   1564		eq->irq_nb.notifier_call = mlx5_ib_eq_pf_int;
>   1565		param = (struct mlx5_eq_param){
>   1566			.irq_index = 0,
>   1567			.nent = MLX5_IB_NUM_PF_EQE,
>   1568		};
>   1569		param.mask[0] = 1ull << MLX5_EVENT_TYPE_PAGE_FAULT;
>   1570		eq->core = mlx5_eq_create_generic(dev->mdev, &param);
>   1571		if (IS_ERR(eq->core)) {
>   1572			err = PTR_ERR(eq->core);
>   1573			goto err_wq;
>   1574		}
>   1575		err = 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 = 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


      reply	other threads:[~2021-03-12 11:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-12  3:04 [leon-rdma:rdma-next 13/42] drivers/infiniband/hw/mlx5/odp.c:1544 mlx5r_odp_create_eq() warn: missing error code 'err' kernel test robot
2021-03-12 11:16 ` Leon Romanovsky [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YEtNf8dTozeka9vN@unreal \
    --to=leonro@nvidia.com \
    --cc=kbuild-all@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.