All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Lina Iyer <ilina@codeaurora.org>, Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-pm@vger.kernel.org, khilman@kernel.org,
	Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH v2] PM / Domains: Fixup domain-idle-states OF parsing
Date: Thu, 08 Feb 2018 11:09:49 +0100	[thread overview]
Message-ID: <2218102.7hfeEuz1Tu@aspire.rjw.lan> (raw)
In-Reply-To: <20180123210128.GA16708@codeaurora.org>

On Tuesday, January 23, 2018 10:01:28 PM CET Lina Iyer wrote:
> On Tue, Jan 23 2018 at 20:43 +0000, Ulf Hansson wrote:
> >The commit b539cc82d493 ("PM / Domains: Ignore domain-idle-states that are
> >not compatible"), made it possible to ignore non-compatible
> >domain-idle-states OF nodes. However, in case that happens while doing the
> >OF parsing, the number of elements in the allocated array would exceed the
> >numbers actually needed, thus wasting memory.
> >
> >Fix this by pre-iterating the genpd OF node and counting the number of
> >compatible domain-idle-states nodes, before doing the allocation. While
> >doing this, it makes sense to rework the code a bit to avoid open coding,
> >of parts responsible for the OF node iteration.
> >
> >Let's also take the opportunity to clarify the function header for
> >of_genpd_parse_idle_states(), about what is being returned in case of
> >errors.
> >
> >Fixes: b539cc82d493 ("PM / Domains: Ignore domain-idle-states that are not compatible")
> >Cc: Lina Iyer <ilina@codeaurora.org>
> >Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> >---
> >
> >Changes in v2:
> >	- Updated changelog to clarify the problem is really about avoiding to
> >	waste memory, according to comment from Lina.
> >
> >---
> Reviewed-by: Lina Iyer <ilina@codeaurora.org>
> 

Patch applied, thanks!

      reply	other threads:[~2018-02-08 10:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-23 20:43 [PATCH v2] PM / Domains: Fixup domain-idle-states OF parsing Ulf Hansson
2018-01-23 21:01 ` Lina Iyer
2018-02-08 10:09   ` Rafael J. Wysocki [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2218102.7hfeEuz1Tu@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=ilina@codeaurora.org \
    --cc=khilman@kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ulf.hansson@linaro.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.