All of lore.kernel.org
 help / color / mirror / Atom feed
From: Axel Haslam <ahaslam@baylibre.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: "Ulf Hansson" <ulf.hansson@linaro.org>,
	"Kevin Hilman" <khilman@linaro.org>,
	"Krzysztof Kozłowski" <k.kozlowski.k@gmail.com>,
	"Rafael J. Wysocki" <rjw@rjwysocki.net>,
	"Benoit Cousson" <bcousson@baylibre.com>,
	"Linux PM list" <linux-pm@vger.kernel.org>
Subject: Re: [RFC v5 1/8] PM / Domains: structure changes for multiple states
Date: Mon, 27 Apr 2015 10:26:51 +0200	[thread overview]
Message-ID: <553DF2CB.3070306@baylibre.com> (raw)
In-Reply-To: <CAMuHMdWx=g+NLOcJyCAzhFjM-woMEzZQq1Tn4d+ctpGmzyzDxA@mail.gmail.com>

Hi Geert,

Thanks for the review!

On 26/04/2015 10:42, Geert Uytterhoeven wrote:

>>                  return;
>>
>> +       if (genpd->state_count > 0) {
>> +               /* Copy the state data to allocated memory */
>> +               genpd->states = genpd_alloc_states_data(genpd);
>> +               if (!genpd->states)
>> +                       return;
>> +       }
>> +
>
> So the above replaces genpd->states (which is usually pointing to a an
> array of static data) by an allocated copy?
> Nice trick, but I'm wondering whether it may bite us one day?
> This also means the static data can't be const.
>
> Both could be solved by e.g. passing the states array to pm_genpd_init().

i thought i should avoid adding an argument to init. But you are right, 
i guess its better that way. ill do it on the on the next spin.

BTW, im thinking i should add a default OFF state in case the 
state_count is 0, that way, platforms could not worry about states
at all in case they dont define latencies.


Thanks again,
Axel.

>
> Gr{oetje,eeting}s,
>
>                          Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                  -- Linus Torvalds
>

  reply	other threads:[~2015-04-27  8:27 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 17:35 [RFC v5 0/8] genpd multiple states v5 ahaslam
2015-04-24 17:35 ` [RFC v5 1/8] PM / Domains: structure changes for multiple states ahaslam
2015-04-26  8:42   ` Geert Uytterhoeven
2015-04-27  8:26     ` Axel Haslam [this message]
2015-04-27  8:30       ` Geert Uytterhoeven
2015-04-24 17:35 ` [RFC v5 2/8] PM / Domains: select deepest state ahaslam
2015-04-24 17:35 ` [RFC v5 3/8] ARM: s3c64xx: pm: Convert to multiple states ahaslam
2015-04-24 17:35 ` [RFC v5 4/8] ARM: exynos: " ahaslam
2015-04-24 17:35 ` [RFC v5 5/8] ARM: r8a7779: " ahaslam
2015-04-26  8:43   ` Geert Uytterhoeven
2015-04-27  9:32     ` Axel Haslam
2015-04-24 17:35 ` [RFC v5 6/8] ARM: rmobile: " ahaslam
2015-04-26  8:44   ` Geert Uytterhoeven
2015-04-24 17:35 ` [RFC v5 7/8] ARM: ux500: " ahaslam
2015-04-24 17:35 ` [RFC v5 8/8] PM / Domains: remove old power on/off callbacks ahaslam

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=553DF2CB.3070306@baylibre.com \
    --to=ahaslam@baylibre.com \
    --cc=bcousson@baylibre.com \
    --cc=geert@linux-m68k.org \
    --cc=k.kozlowski.k@gmail.com \
    --cc=khilman@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=ulf.hansson@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.