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: <1472188934-21923-1-git-send-email-sean.wang@mediatek.com>
Date:   Fri, 26 Aug 2016 13:22:13 +0800
From:   Sean Wang <sean.wang@...iatek.com>
To:     <john@...ozen.org>
CC:     <davem@...emloft.net>, <nbd@...nwrt.org>, <netdev@...r.kernel.org>,
        <linux-mediatek@...ts.infradead.org>, <keyhaede@...il.com>
Subject: Re: [RESEND PATCH net 02/10] net: ethernet: mediatek: fix incorrect

On Date: Thu, 25 Aug 2016 15:49:10 +0200, John Crispin wrote:
>On 25/08/2016 12:44, Sean Wang wrote:
>> If the return value of devm_clk_get is EPROBE_DEFER, we should
>> defer probing the driver. The change is verified and works based
>> on 4.8-rc1 staying with the latest clk-next code for MT7623.
>> 
>> Signed-off-by: Sean Wang <sean.wang@...iatek.com>
>> ---
>>  drivers/net/ethernet/mediatek/mtk_eth_soc.c | 11 +++++++++--
>>  1 file changed, 9 insertions(+), 2 deletions(-)
...
>> +		    PTR_ERR(eth->clk_gp2) == -EPROBE_DEFER)
>> +			return -EPROBE_DEFER;
>> +		else
>> +			return -ENODEV;
>> +	}
>
>Hi Sean,
>
>this looks a bit tedious. maybe a better solution would be to add an
>array to struct mtk_eth for the clocks and an enum for the index
>mapping. that would allow the usage of loops to work out if all clocks
>are fine. the following code calling clk_prepare_enable() could then
>also be turned into a loop
>
>	John

The suggestion is better, so I will use your suggested way to 
to implement the logic in the next version.

>
>>  
>>  	clk_prepare_enable(eth->clk_ethif);
>>  	clk_prepare_enable(eth->clk_esw);
>> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ