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] [day] [month] [year] [list]
Message-ID: <566804FF.5000607@huawei.com>
Date:	Wed, 9 Dec 2015 18:39:59 +0800
From:	"Yankejian (Hackim Yim)" <yankejian@...wei.com>
To:	Florian Fainelli <f.fainelli@...il.com>, <davem@...emloft.net>,
	<arnd@...db.de>, <fengguang.wu@...el.com>, <robh+dt@...nel.org>,
	<pawel.moll@....com>, <mark.rutland@....com>,
	<ijc+devicetree@...lion.org.uk>, <galak@...eaurora.org>,
	<catalin.marinas@....com>, <will.deacon@....com>,
	<salil.mehta@...wei.com>, <Yisen.Zhuang@...wei.com>,
	<liguozhu@...wei.com>, <lisheng011@...wei.com>,
	<huangdaode@...ilicon.com>, <xuwei5@...ilicon.com>
CC:	<devicetree@...r.kernel.org>, <haifeng.wei@...wei.com>,
	<netdev@...r.kernel.org>, <linuxarm@...wei.com>,
	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH net-next 1/2] net: hns: enet specisies a reference to dsaf



On 2015/12/9 2:10, Florian Fainelli wrote:
> Subject: s/specisies/specifies/?

Thanks for pointing it out. i will change it in next patchset.

Best Regards,
yankejian

> On 04/12/15 23:59, yankejian wrote:
>> enet is associating with dasf. before this patch, the association is
>> the same strings between ae-name and dsa-name. in a general way, enet
>> specifies a reference to dsaf should be a good idea. so this patch
>> deletes the ae-name in enet, and adds parsing the ae-handle
>> from DT to set the associating with dsaf.
>>
>> Signed-off-by: yankejian <yankejian@...wei.com>
>> ---
> [snip]
>
>> diff --git a/drivers/net/ethernet/hisilicon/hns/hnae.c b/drivers/net/ethernet/hisilicon/hns/hnae.c
>> index b364529..3bfe36f 100644
>> --- a/drivers/net/ethernet/hisilicon/hns/hnae.c
>> +++ b/drivers/net/ethernet/hisilicon/hns/hnae.c
>> @@ -95,21 +95,17 @@ static struct hnae_buf_ops hnae_bops = {
>>  static int __ae_match(struct device *dev, const void *data)
>>  {
>>  	struct hnae_ae_dev *hdev = cls_to_ae_dev(dev);
>> -	const char *ae_id = data;
>>  
>> -	if (!strncmp(ae_id, hdev->name, AE_NAME_SIZE))
>> -		return 1;
>> -
>> -	return 0;
>> +	return hdev->dev->of_node == data;
>>  }
>>  
>> -static struct hnae_ae_dev *find_ae(const char *ae_id)
>> +static struct hnae_ae_dev *find_ae(const struct device_node *ae_node)
>>  {
>>  	struct device *dev;
>>  
>> -	WARN_ON(!ae_id);
>> +	WARN_ON(!ae_node);
>>  
>> -	dev = class_find_device(hnae_class, NULL, ae_id, __ae_match);
>> +	dev = class_find_device(hnae_class, NULL, ae_node, __ae_match);
> of_find_net_device_by_node might be used for this maybe?
it needs return hnae_ae_dev so we didn't decide to use of_find_net_device_by_node.
Thanks



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ