Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbcCILTV (ORCPT ); Wed, 9 Mar 2016 06:19:21 -0500 Received: from szxga01-in.huawei.com ([58.251.152.64]:36193 "EHLO szxga01-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932287AbcCILTG (ORCPT ); Wed, 9 Mar 2016 06:19:06 -0500 Subject: Re: [PATCH 3/4] infiniband: hns: add Hisilicon RoCE support(driver code) To: Jiri Pirko , "Wei Hu(Xavier)" References: <1457080877-13456-1-git-send-email-xavier.huwei@huawei.com> <1457080877-13456-4-git-send-email-xavier.huwei@huawei.com> <20160304091628.GB2150@nanopsycho.orion> CC: , , , , , , , , , , , , , , , , , , From: oulijun Message-ID: <56E0066E.1000106@huawei.com> Date: Wed, 9 Mar 2016 19:18:06 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160304091628.GB2150@nanopsycho.orion> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.61.25.147] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.56E0067B.0044,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 7d96833407574cb1fe596ad1a70fbedd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1383 Lines: 51 Hi Jiri Pirko, thanks for reviewing On 2016/3/4 17:16, Jiri Pirko wrote: > Fri, Mar 04, 2016 at 09:41:16AM CET, xavier.huwei@huawei.com wrote: > > > >> +int hns_roce_buf_alloc( >> + struct hns_roce_dev *hr_dev, >> + int size, int max_direct, >> + struct hns_roce_buf *buf) > > > >> + >> + pages = >> + kmalloc(sizeof(*pages) * buf->nbufs, >> + GFP_KERNEL); > > > >> + >> + buf->direct.buf = vmap( >> + pages, buf->nbufs, VM_MAP, >> + PAGE_KERNEL); > > > >> + if ( >> + event_type != HNS_ROCE_EVENT_TYPE_CQ_ID_INVALID && >> + event_type != HNS_ROCE_EVENT_TYPE_CQ_ACCESS_ERROR && >> + event_type != HNS_ROCE_EVENT_TYPE_CQ_OVERFLOW) { >> + dev_err(&hr_dev->pdev->dev, >> + "hns_roce_ib: Unexpected event type 0x%x on CQ %06x\n", >> + event_type, hr_cq->cqn); >> + return; >> + } > > Although checkpatch does not complain, I find this semi-random adding of > newlines quite odd. > Really, the question you mentioned exit in many location in currently patch. I done it in order to make it complain checkpatch and linux norms. Now, I have checked and adjust it properly combined to checkpatch I will send a new patch in future. if not modified in some locations, it have to violate checkpatch once modified and is unable to adjust it better. About these, have you best strategy? Thanks Lijun Ou > . >