Re: [PATCH rdma-next v2 08/13] RDMA/nldev: Allow optional-counter status configuration through RDMA netlink

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 30, 2021 at 11:02:24AM +0300, Leon Romanovsky wrote:
> -	if (nla_get_u32(tb[RDMA_NLDEV_ATTR_STAT_RES]) != RDMA_NLDEV_ATTR_RES_QP)
> -		return -EINVAL;
> +	target = kcalloc(BITS_TO_LONGS(stats->num_counters),
> +		       sizeof(long), GFP_KERNEL);
> +	if (!target)
> +		return -ENOMEM;

Same comment about the type here

This almost wants to be two patches to split up the set_doit then add
the new setter, it is hard to read..

Jason



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux