Re: [PATCH for-next 1/4] RDMA/hns: Fix the endian problem for hns

oulijun
2018-02-02T02:00:16Z

在 2018/2/2 7:18, Jason Gunthorpe 写道:
> On Fri, Feb 02, 2018 at 07:12:47AM +0800, kbuild test robot wrote:
>> Hi Lijun,
>>
>> I love your patch! Perhaps something to improve:
>>
>> [auto build test WARNING on linus/master]
>> [also build test WARNING on next-20180201]
>> [cannot apply to v4.15]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>>
>> url: https://github.com/0day-ci/linux/commits/Lijun-Ou/Fixes-for-hns/20180202-014309
>> reproduce:
>> # apt-get install sparse
>> make ARCH=x86_64 allmodconfig
>> make C=1 CF=-D__CHECK_ENDIAN__
>>
>>
>> sparse warnings: (new ones prefixed by >>)
>>
>>>> drivers/infiniband/hw/hns/hns_roce_qp.c:699:37: sparse: incorrect type in assignment (different base types) @@ expected unsigned int doorbell_qpn @@ got ed int doorbell_qpn @@
>> drivers/infiniband/hw/hns/hns_roce_qp.c:699:37: expected unsigned int doorbell_qpn
>> drivers/infiniband/hw/hns/hns_roce_qp.c:699:37: got restricted __le64 <noident>
>
> [..]
>
> Yikes, for a patch that is supposed to fix sparse warnings, there sure are a
> lot..
>
Sorry, I don't know why the kbuild check fail. I have make sparse clean by the result
based on the for-next branch before sending the patch.

> You are testing your patch with sparse, right? Can you send this patch so the
> driver is actually sparse clean as we did in userspace?
>
yes, I think that the kernel maybe have the same warning according to your reviews for
the userspace. as a result, I am preparing to resolving it before the first kbuild check.
I will do it again. thanks
> Jason