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  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Tue, 27 Dec 2016 11:47:03 +0000
From:   Joao Pinto <>
To:     "" <>,
        Niklas Cassel <>,
        Giuseppe CAVALLARO <>,
        Florian Fainelli <>,
        netdev <>
Subject: Platform init code in stmmac_main


I spotted in stmmac_main.c, *_dvr_probe() function, some clocks initializations
that are related with platform based setups:

	priv->pclk = devm_clk_get(priv->device, "pclk");
	if (IS_ERR(priv->pclk)) {
		if (PTR_ERR(priv->pclk) == -EPROBE_DEFER) {
			ret = -EPROBE_DEFER;
			goto error_pclk_get;
		priv->pclk = NULL;

	priv->stmmac_rst = devm_reset_control_get(priv->device,
	if (IS_ERR(priv->stmmac_rst)) {
		if (PTR_ERR(priv->stmmac_rst) == -EPROBE_DEFER) {
			ret = -EPROBE_DEFER;
			goto error_hw_init;
		dev_info(priv->device, "no reset control found\n");
		priv->stmmac_rst = NULL;
	if (priv->stmmac_rst)

I am using PCI based setup, so these initializations are executed since they are
in common space in stmmac_main.c. Wouldn't be better to map these clocks in
stmmac_platform? This hasn't any problem for me, but I think it would improve
code readbility.

I would like to have your opinion about the subject!


Powered by blists - more mailing lists