[PATCH] cpuidle/cpuidle-big_little: fix reading cpu id part number
Russell King - ARM Linux
linux at arm.linux.org.uk
Wed Aug 13 03:44:31 PDT 2014
On Wed, Aug 13, 2014 at 11:04:13AM +0100, Juri Lelli wrote:
> Thanks a lot for the comment. Does what below address it?
Yes, thanks, but a few of nitpicks though.
> + * smp_cpuid_part() - return part id for a given cpu
> + *
> + * @cpu: logical cpu id
> + *
> + * Return: part id of logical cpu passed as argument
> + *
> + */
If this is supposed to be a kerneldoc-compatible comment, please read
Documentation/kernel-doc-nano-HOWTO.txt for the correct format.
> +static inline unsigned int smp_cpuid_part(int cpu)
> + struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpu);
> + return is_smp() ? (cpu_info->cpuid & ARM_CPU_PART_MASK) :
Parens are not required, and there's a double space before &.
The BNF for the ?: operator is:
log-or-expr ? expr : cond-expr
So the compiler knows that whatever is between the ? and : is a single
expression, and the parens are surplus.
> -static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)
> +static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int match_id)
If we're changing the name, "part_id" would probably be better than the
opaque "match_id" here.
FTTC broadband for 0.8mile line: currently at 9.5Mbps down 400kbps up
according to speedtest.net.
More information about the linux-arm-kernel