[PATCH] ppc64 cpu hotplug

Dave Hansen haveblue at us.ibm.com
Wed Mar 24 11:53:49 EST 2004


On Tue, 2004-03-23 at 16:41, jschopp at austin.ibm.com wrote:
> As always feedback and flames welcome.
> +			if (unlikely(!ireg)){
> +			    ireg = (unsigned int*) get_property(np, "reg", &len);/* fake it with phys id */
> +			    if(!ireg)
> +				continue;
> +			}

See Documentation/CodingStyle.

Should be
	if (unlikely(!ireg)) {
not
	if (unlikely(!ireg)){

And should have tabs instead of 4 spaces for indenting.

Please don't use unlikely() except in real hot paths.  I don't think
find_physical_cpu_to_start() is in a hot path.

That for loop is getting a little bit too indented.  You might want to
wrap it up in another function or break it up somehow.  Or, instead of
having the entire for loop's contents in an if(), use a continue:

        for(...) {
                if (status != 0)
                	continue;
        	...
        }


** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/





More information about the Linuxppc64-dev mailing list