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]
Date:	Wed, 13 Aug 2014 11:44:31 +0100
From:	Russell King - ARM Linux <linux@....linux.org.uk>
To:	Juri Lelli <juri.lelli@....com>
Cc:	Lorenzo Pieralisi <Lorenzo.Pieralisi@....com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Daniel Lezcano <daniel.lezcano@...aro.org>,
	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	"linux-pm@...r.kernel.org" <linux-pm@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	Juri Lelli <juri.lelli@...il.com>
Subject: Re: [PATCH] cpuidle/cpuidle-big_little: fix reading cpu id part
	number

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:

cond-expr:
	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.
--
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