Re: [PATCH v2 for-next 8/9] RDMA/hns: Fix non-standard error codes

Leon Romanovsky
2019-11-05T17:01:09Z

On Tue, Nov 05, 2019 at 07:08:01PM +0800, Weihang Li wrote:
> From: Yixian Liu <liuyixian@huawei.com>
>
> It is better to return a linux error code than define a private constant.
>
> Signed-off-by: Yixian Liu <liuyixian@huawei.com>
> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
> Signed-off-by: Weihang Li <liweihang@hisilicon.com>
> ---
> drivers/infiniband/hw/hns/hns_roce_alloc.c | 4 ++--
> drivers/infiniband/hw/hns/hns_roce_cq.c | 4 ++--
> drivers/infiniband/hw/hns/hns_roce_mr.c | 15 ++++++++-------
> drivers/infiniband/hw/hns/hns_roce_pd.c | 2 +-
> drivers/infiniband/hw/hns/hns_roce_srq.c | 2 +-
> 5 files changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/infiniband/hw/hns/hns_roce_alloc.c b/drivers/infiniband/hw/hns/hns_roce_alloc.c
> index 8c063c5..da574c2 100644
> --- a/drivers/infiniband/hw/hns/hns_roce_alloc.c
> +++ b/drivers/infiniband/hw/hns/hns_roce_alloc.c
> @@ -55,7 +55,7 @@ int hns_roce_bitmap_alloc(struct hns_roce_bitmap *bitmap, unsigned long *obj)

Why do HNS driver have custom bitmap functions instead of include/linux/bitmap.h?

Thanks