lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160309112552.GA2300@nanopsycho.orion>
Date:	Wed, 9 Mar 2016 12:25:52 +0100
From:	Jiri Pirko <jiri@...nulli.us>
To:	oulijun <oulijun@...wei.com>
Cc:	"Wei Hu(Xavier)" <xavier.huwei@...wei.com>, dledford@...hat.com,
	sean.hefty@...el.com, hal.rosenstock@...il.com,
	davem@...emloft.net, jeffrey.t.kirsher@...el.com,
	jiri@...lanox.com, ogerlitz@...lanox.com,
	linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org, gongyangming@...wei.com,
	xiaokun@...wei.com, tangchaofei@...wei.com, haifeng.wei@...wei.com,
	yisen.zhuang@...wei.com, yankejian@...wei.com,
	lisheng011@...wei.com, charles.chenxin@...wei.com,
	linuxarm@...wei.com
Subject: Re: [PATCH 3/4] infiniband: hns: add Hisilicon RoCE support(driver
 code)

Wed, Mar 09, 2016 at 12:18:06PM CET, oulijun@...wei.com wrote:
>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@...wei.com wrote:
>> 
>> <snip>
>> 
>>> +int hns_roce_buf_alloc(
>>> +			struct hns_roce_dev *hr_dev,
>>> +			int size, int max_direct,
>>> +			struct hns_roce_buf *buf)
>> 
>> <snip>	
>> 	
>>> +
>>> +			pages =
>>> +				kmalloc(sizeof(*pages) * buf->nbufs,
>>> +					GFP_KERNEL);
>> 
>> <snip>
>> 
>>> +
>>> +			buf->direct.buf = vmap(
>>> +						pages, buf->nbufs, VM_MAP,
>>> +						PAGE_KERNEL);
>> 
>> <snip>
>> 
>>> +	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?

I'm not sure what violation you are talking about. I'm just simply
suggesting to change:
			buf->direct.buf = vmap(
						pages, buf->nbufs, VM_MAP,
						PAGE_KERNEL);
to:
			buf->direct.buf = vmap(pages, buf->nbufs, VM_MAP,
					       PAGE_KERNEL);


and to change:
			pages =
				kmalloc(sizeof(*pages) * buf->nbufs,
					GFP_KERNEL);
to:
			pages = kmalloc(sizeof(*pages) * buf->nbufs,
					GFP_KERNEL);


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ