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: <Pine.LNX.4.44L0.1405101023510.1268-100000@netrider.rowland.org>
Date:	Sat, 10 May 2014 10:35:49 -0400 (EDT)
From:	Alan Stern <stern@...land.harvard.edu>
To:	Maxime Ripard <maxime.ripard@...e-electrons.com>
cc:	Emilio Lopez <emilio@...pez.com.ar>,
	Mike Turquette <mturquette@...aro.org>, <kishon@...com>,
	<hdegoede@...hat.com>, Boris Brezillon <boris@...e-electrons.com>,
	<linux-kernel@...r.kernel.org>,
	<linux-arm-kernel@...ts.infradead.org>,
	<linux-usb@...r.kernel.org>, <kevin.z.m.zh@...il.com>,
	<sunny@...winnertech.com>, <shuge@...winnertech.com>,
	<zhuzhenhua@...winnertech.com>, <linux-sunxi@...glegroups.com>,
	Boris BREZILLON <boris.brezillon@...e-electrons.com>
Subject: Re: [PATCH v2 4/7] usb: ehci-platform: add optional reset controller
 retrieval

On Sat, 10 May 2014, Maxime Ripard wrote:

> From: Boris BREZILLON <boris.brezillon@...e-electrons.com>
> 
> On the Allwinner's A31 SoC the reset line connected to the EHCI IP has to
> be deasserted for the EHCI block to be usable.
> 
> Add support for an optional reset controller that will be deasserted on
> power off and asserted on power on.
> 
> Signed-off-by: Boris BREZILLON <boris.brezillon@...e-electrons.com>
> Signed-off-by: Maxime Ripard <maxime.ripard@...e-electrons.com>
> Reviewed-by: Hans de Goede <hdegoede@...hat.com>

This basically is good. fine.  I have only two comments, and one of
them is a matter of taste rather than substance.

> @@ -206,6 +208,19 @@ static int ehci_platform_probe(struct platform_device *dev)
>  				break;
>  			}
>  		}
> +
> +		priv->rst = devm_reset_control_get_optional(&dev->dev,
> +							    NULL);

I hate the style that matches arguments on a continuation line with the
opening paren of the function call, for a couple of reasons.  Instead I
simply indent continuation lines by two or more tab stops.  But some
people seem to be incurably attached to it.

> +		if (IS_ERR(priv->rst)) {
> +			err = PTR_ERR(priv->rst);
> +			if (err == -EPROBE_DEFER)
> +				goto err_put_clks;
> +			priv->rst = NULL;
> +		} else {
> +			err = reset_control_deassert(priv->rst);
> +			if (err)
> +				goto err_put_clks;
> +		}
>  	}
>  
>  	if (pdata->big_endian_desc)

The new code was added inside an "if" statement, which will cause it to
apply only to OF devices.  Is there any reason not to put the new code
outside the "if" statement, so it applies to all devices?

Alan Stern

--
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