All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jason Gunthorpe <jgg@nvidia.com>
To: Wenpeng Liang <liangwenpeng@huawei.com>
Cc: leon@kernel.org, linux-rdma@vger.kernel.org, linuxarm@huawei.com
Subject: Re: [PATCH rdma-core 5/7] libhns: Fix wrong type of variables and fields
Date: Tue, 23 Nov 2021 10:13:08 -0400	[thread overview]
Message-ID: <20211123141308.GA42666@nvidia.com> (raw)
In-Reply-To: <20211109124103.54326-6-liangwenpeng@huawei.com>

On Tue, Nov 09, 2021 at 08:41:01PM +0800, Wenpeng Liang wrote:
> From: Xinhao Liu <liuxinhao5@hisilicon.com>
> 
> Some variables and fields should be in type of unsigned instead of signed.
> 
> Signed-off-by: Xinhao Liu <liuxinhao5@hisilicon.com>
> Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
>  providers/hns/hns_roce_u.h       |  6 +++---
>  providers/hns/hns_roce_u_hw_v1.c |  6 +++---
>  providers/hns/hns_roce_u_hw_v2.c | 11 +++++------
>  3 files changed, 11 insertions(+), 12 deletions(-)
> 
> diff --git a/providers/hns/hns_roce_u.h b/providers/hns/hns_roce_u.h
> index 0d7abd81..d5963941 100644
> +++ b/providers/hns/hns_roce_u.h
> @@ -99,7 +99,7 @@
>  #define roce_set_bit(origin, shift, val) \
>  	roce_set_field((origin), (1ul << (shift)), (shift), (val))
>  
> -#define hr_ilog32(n)		ilog32((n) - 1)
> +#define hr_ilog32(n)		ilog32((unsigned int)(n) - 1)

This should be a static inline function not a macro, then it can have
the correct type.

Also please send this series as a PR on the github

Thanks,
Jason

  reply	other threads:[~2021-11-23 14:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-09 12:40 [PATCH rdma-core 0/7] libhns: Cleanup about removing redundant code and cleaning up static alarms Wenpeng Liang
2021-11-09 12:40 ` [PATCH rdma-core 1/7] libhns: Remove unused macros Wenpeng Liang
2021-11-09 12:40 ` [PATCH rdma-core 2/7] libhns: Remove unsupported QP type Wenpeng Liang
2021-11-09 12:40 ` [PATCH rdma-core 3/7] libhns: Remove redundant variable initialization Wenpeng Liang
2021-11-09 12:41 ` [PATCH rdma-core 4/7] libhns: Fix wrong print format for unsigned type Wenpeng Liang
2021-11-09 12:41 ` [PATCH rdma-core 5/7] libhns: Fix wrong type of variables and fields Wenpeng Liang
2021-11-23 14:13   ` Jason Gunthorpe [this message]
2021-11-24 11:39     ` Wenpeng Liang
2021-11-24 15:40       ` Jason Gunthorpe
2021-11-25 12:35         ` Wenpeng Liang
2021-11-09 12:41 ` [PATCH rdma-core 6/7] libhns: The content of the header file should be protected with #define Wenpeng Liang
2021-11-09 12:41 ` [PATCH rdma-core 7/7] libhns: The function declaration should be the same as the definition Wenpeng Liang
2021-11-10 14:30 ` [PATCH rdma-core 0/7] libhns: Cleanup about removing redundant code and cleaning up static alarms Leon Romanovsky

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=20211123141308.GA42666@nvidia.com \
    --to=jgg@nvidia.com \
    --cc=leon@kernel.org \
    --cc=liangwenpeng@huawei.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    /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.