[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160615134938.GA2282@sirena.org.uk>
Date: Wed, 15 Jun 2016 14:49:38 +0100
From: Mark Brown <broonie@...nel.org>
To: Juri Lelli <juri.lelli@....com>
Cc: linux-kernel@...r.kernel.org, linux-pm@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, devicetree@...r.kernel.org,
peterz@...radead.org, vincent.guittot@...aro.org,
robh+dt@...nel.org, mark.rutland@....com, linux@....linux.org.uk,
sudeep.holla@....com, lorenzo.pieralisi@....com,
catalin.marinas@....com, will.deacon@....com,
morten.rasmussen@....com, dietmar.eggemann@....com,
sgurrappadi@...dia.com
Subject: Re: [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT
On Wed, Jun 15, 2016 at 11:17:53AM +0100, Juri Lelli wrote:
> + if (!raw_capacity) {
> + raw_capacity = kzalloc(sizeof(*raw_capacity) *
> + num_possible_cpus(), GFP_KERNEL);
kcalloc()?
> + if (!raw_capacity) {
> + pr_err("cpu_capacity: failed to allocate memory"
> + " for raw capacities\n");
It's normally better to avoid splitting errors message so people can
grep if they see the error.
> + } else {
> + pr_err("cpu_capacity: missing %s raw capacity "
> + "(fallback to 1024 for all CPUs)\n",
> + cpu_node->full_name);
That's going to complain fairly loudly for all existing DTs isn't it and
it's kind of redundant if all the cores have the same capacity (which is
a very common case)? How about printing an error only if we already
found one, or printing a single warning at the end if we didn't get
anything?
Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)
Powered by blists - more mailing lists