[PATCH 1/3] arm64: topology: Add support for topology DT bindings

Mark Brown broonie at kernel.org
Wed Mar 19 12:33:39 EDT 2014


On Wed, Mar 19, 2014 at 04:04:14PM +0000, Lorenzo Pieralisi wrote:
> On Wed, Mar 05, 2014 at 08:59:33AM +0000, Mark Brown wrote:

> > +			if (leaf) {
> > +				ret = parse_core(c, cluster_id, core_id++);
> > +				if (ret != 0) {

> Should remove braces.

> > +					return ret;
> > +				}
> > +			} else {

They're there because it's nested inside another if statement with
braces - yes, there is indentation but it still helps.

> > +void __init init_cpu_topology(void)
> > +{
> > +	int ret;
> > +
> > +	reset_cpu_topology();
> > +
> > +	ret = parse_dt_topology();
> > +	if (ret != 0)
> > +		reset_cpu_topology();

> ret is unused so should be removed. You could remove the first reset call and

I'm sorry, I don't follow?  The use is quoted above...  

> use static initialization for that, it is a matter of taste though.

Static initialisation can't cover the calls to set_power_scale() and
having a different thing for default and unwinding cases seems likely to
be error prone.

> A comment is in order, whatever approach you go for.

I'm not sure what the confusion is here so I don't know what a comment
would clarify.  Could you say what it is you find confusing please?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20140319/7efeb44f/attachment.sig>


More information about the linux-arm-kernel mailing list