Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1423050

Re: [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT

From Mark Brown <broonie@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT
Date 2016-06-15 16:00 +0200
Message-ID <rKjwn-3eA-47@gated-at.bofh.it> (permalink)
References <rKg5r-1fI-11@gated-at.bofh.it> <rKg5r-1fI-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

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?

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v5 0/8] CPUs capacity information for heterogeneous systems Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:20 +0200
  [PATCH v5 7/8] arm: add sysfs cpu_capacity attribute Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:20 +0200
  [PATCH v5 1/8] Documentation: arm: define DT cpu capacity-dmips-mhz bindings Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:20 +0200
    Re: [PATCH v5 1/8] Documentation: arm: define DT cpu  capacity-dmips-mhz bindings Vincent Guittot <vincent.guittot@linaro.org> - 2016-06-15 15:00 +0200
      Re: [PATCH v5 1/8] Documentation: arm: define DT cpu  capacity-dmips-mhz bindings Juri Lelli <juri.lelli@arm.com> - 2016-06-15 16:30 +0200
    Re: [PATCH v5 1/8] Documentation: arm: define DT cpu  capacity-dmips-mhz bindings Mark Brown <broonie@kernel.org> - 2016-06-15 16:10 +0200
      Re: [PATCH v5 1/8] Documentation: arm: define DT cpu  capacity-dmips-mhz bindings Juri Lelli <juri.lelli@arm.com> - 2016-06-15 16:30 +0200
    Re: [PATCH v5 1/8] Documentation: arm: define DT cpu  capacity-dmips-mhz bindings Rob Herring <robh+dt@kernel.org> - 2016-06-16 00:20 +0200
      Re: [PATCH v5 1/8] Documentation: arm: define DT cpu  capacity-dmips-mhz bindings Juri Lelli <juri.lelli@arm.com> - 2016-06-16 10:30 +0200
        Re: [PATCH v5 1/8] Documentation: arm: define DT cpu  capacity-dmips-mhz bindings Juri Lelli <juri.lelli@arm.com> - 2016-06-22 19:00 +0200
  [PATCH v5 3/8] arm, dts: add TC2 cpu capacity-dmips-mhz information Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:20 +0200
  [PATCH v5 6/8] arm64, dts: add Juno r2 cpu capacity-dmips-mhz information Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:20 +0200
  [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:20 +0200
    Re: [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:30 +0200
    Re: [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT Mark Brown <broonie@kernel.org> - 2016-06-15 16:00 +0200
      Re: [PATCH v5 4/8] arm64: parse cpu capacity-dmips-mhz from DT Juri Lelli <juri.lelli@arm.com> - 2016-06-15 16:50 +0200
  [PATCH v5 2/8] arm: parse cpu capacity-dmips-mhz from DT Juri Lelli <juri.lelli@arm.com> - 2016-06-15 12:30 +0200

csiph-web