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]
Date: Mon, 11 Mar 2024 17:55:36 +0800
From: Jijie Shao <shaojijie@...wei.com>
To: Simon Horman <horms@...nel.org>
CC: <shaojijie@...wei.com>, <yisen.zhuang@...wei.com>,
	<salil.mehta@...wei.com>, <davem@...emloft.net>, <edumazet@...gle.com>,
	<kuba@...nel.org>, <pabeni@...hat.com>, <jiri@...nulli.us>,
	<shenjian15@...wei.com>, <wangjie125@...wei.com>, <liuyonglong@...wei.com>,
	<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH V5 net-next 4/4] net: hns3: add support to query scc
 version by devlink info


on 2024/3/11 17:19, Simon Horman wrote:
>> +#define HNAE3_SCC_VERSION_BYTE1_SHIFT	8
>> +#define HNAE3_SCC_VERSION_BYTE1_MASK	GENMASK(15, 8)
>> +#define HNAE3_SCC_VERSION_BYTE0_SHIFT	0
>> +#define HNAE3_SCC_VERSION_BYTE0_MASK	GENMASK(7, 0)
> Not strictly related to this patch, but FWIIW, I suspect that
> hnae3_set_field() and hnae3_get_field() could be reworked to use / replaced
> by use of FIELD_PREP and FIELD_GET.  In which case I suspect that the
> *_SHIFT #defines would no longer be needed.

Yes, using FIELD_PREP and FIELD_GET is a better option.
But I'm not going to modify this patch.
If it's necessary, I will send a cleanup patch later to
replace all hnae3_set_field/hnae3_get_field in driver.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ