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: <51351408.8060806@renesas.com>
Date:	Tue, 05 Mar 2013 06:37:12 +0900
From:	Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@...esas.com>
To:	Grant Likely <grant.likely@...retlab.ca>
Cc:	Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>,
	netdev@...r.kernel.org, devicetree-discuss@...ts.ozlabs.org,
	magnus.damm@...il.com, kda@...ux-powerpc.org,
	horms+renesas@...ge.net.au
Subject: Re: [PATCHi v2] net: sh_eth: Add support of device tree probe

(2013/03/04 17:05), Grant Likely wrote:
> On Thu, 14 Feb 2013 11:56:57 +0900, Nobuhiro Iwamatsu<nobuhiro.iwamatsu.yj@...esas.com>  wrote:
>> (2013/02/14 10:24), Kuninori Morimoto wrote:
>>>> +#ifdef CONFIG_OF
>>>> +	if (np&&   of_device_is_available(np)) {
>>>> +		pd = sh_eth_parse_dt(&pdev->dev, ndev);
>>>> +		if (pdev->dev.platform_data) {
>>>> +			struct sh_eth_plat_data *tmp =
>>>> +				pdev->dev.platform_data;
>>>> +			pd->set_mdio_gate = tmp->set_mdio_gate;
>>>> +			pd->needs_init = tmp->needs_init;
>>>> +		}
>>>> +	} else
>>>> +#endif
>>>
>>> sh_eth_parse_dt() was defined for both CONFIG_OF and !CONFIG_OF.
>>> But it is called only from CONFIG_OF ?
>>>
>>
>> Because of_device_is_available needs CONFIG_OF.
>> I already send a patch which add empty function of of_device_is_available.
>> If this was apply, this ifdef becomes without need.
> 
> Actually, there shouldn't be any reason for a device driver to call
> of_device_is_available() on its own node at all. If the device is not
> available, then a platform_device won't be created. "if (np)" here is
> sufficient.
> 

Yes, you are right.
I re-writed code without of_device_is_available(). I will send new patch soon.

Best regards,
  Nobuhiro
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ