Re: [RESEND PATCH v7 07/21] IB/hns: Add event queue support

From: Doug Ledford
Date: Fri May 13 2016 - 17:21:53 EST


On 05/09/2016 11:04 PM, Lijun Ou wrote:

> --- a/drivers/infiniband/hw/hns/hns_roce_device.h
> +++ b/drivers/infiniband/hw/hns/hns_roce_device.h

> @@ -29,10 +31,93 @@
> #define HNS_ROCE_AEQE_VEC_NUM 1
> #define HNS_ROCE_AEQE_OF_VEC_NUM 1
>
> +#define ADDR_SHIFT_12 12
> #define ADDR_SHIFT_32 32
> +#define ADDR_SHIFT_44 44

I saw some of the early review requests to replace hard coded values
with defines so that things made more sense. And you've done a lot of
that quite well. However, this one is not so helpful. Sure, it's an
address shift, but the define gives no context as to why these shifts
are what they are. Someone from the x86 world might mistakenly think
the 12 shift is all about page size shifting, but on arm you have
multiple different page sizes and 12 may not work at all. So, some
context in the name for these items, or else a comment above these
defines letting us know what's special about these three shift values
would be helpful.

--
Doug Ledford <dledford@xxxxxxxxxx>
GPG KeyID: 0E572FDD


Attachment: signature.asc
Description: OpenPGP digital signature