Re: [PATCH 1/3] infiniband: IB/hns: add Hisilicon RoCE support

oulijun
2016-03-19T11:12:34Z

On 2016/3/17 14:43, Leon Romanovsky wrote:
> On Wed, Mar 16, 2016 at 11:36:38AM +0100, Jiri Pirko wrote:
>>> so, I continue to have it.
>>
>> I will continue to bash on your odd codingstyle. Please fix it!
>
> Jiri,
>
> Checkpatch errors is an easiest issue with this patch.
>
> It is full of functions without use, unconnected macros and
> if you replace "hsi" to name of other well known driver, you will get
> same code :).
>
> They need to redesign the whole driver before resubmission.
>
> Thanks.
>
> .
>
Hi, Leon Romanovsky
Firstly, thanks for reviewing.
I have checked the patch v2, surely, some funtions without use and unconnected
macros exist. I have removed it according to analyse. I will leave few marcos as follow:
#define CQ_STATE_INVALID 0
#define CQ_STATE_RESERV 1
#define CQ_STATE_VALID 2
#define CQ_STATE_ERR 3

I thought that these are defined for hardware information. So, I reserved these macros.

In addtion, I didn't completly understand your review as below:
if you replace "hsi" to name of other well known driver, you will get > same code :).

thanks
Lijun Ou