linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Quentin Perret <quentin.perret@arm.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Matthias Kaehlcke <mka@chromium.org>,
	sudeep.holla@arm.com, rjw@rjwysocki.net, nm@ti.com,
	sboyd@kernel.org, linux-pm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, dietmar.eggemann@arm.com
Subject: Re: [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper
Date: Thu, 31 Jan 2019 09:34:21 +0000	[thread overview]
Message-ID: <20190131093418.umsbh4eevgod42sh@queper01-lin> (raw)
In-Reply-To: <20190131072209.nhbgid3cystvr2p5@vireshk-i7>

On Thursday 31 Jan 2019 at 12:52:09 (+0530), Viresh Kumar wrote:
> On 30-01-19, 11:07, Matthias Kaehlcke wrote:
> > On Wed, Jan 30, 2019 at 05:05:02PM +0000, Quentin Perret wrote:
> > > +static int __maybe_unused _get_cpu_power(unsigned long *mW, unsigned long *kHz,
> > > +					 int cpu)
> > 
> > why __maybe_unused?
> 
> Yeah, it isn't required I think. He probably added it for the case
> where CONFIG_ENERGY_MODEL=n, but even then an inline routine is
> defined which will accept it as argument and wouldn't do anything with
> it. Had it been a macro, we would have required __maybe_unused but not
> now.

The thing is, the EM_DATA_CB() macro _is_ stubbed for
CONFIG_ENERGY_MODEL=n:

https://elixir.bootlin.com/linux/v5.0-rc4/source/include/linux/energy_model.h#L165

So, without __maybe_unused you get do get a compiler warning.

Thanks,
Quentin

> 
> -- 
> viresh

  reply	other threads:[~2019-01-31  9:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30 17:05 [PATCH v2 0/5] Register an Energy Model for Arm reference platforms Quentin Perret
2019-01-30 17:05 ` [PATCH v2 1/5] PM / OPP: Introduce a power estimation helper Quentin Perret
2019-01-30 19:07   ` Matthias Kaehlcke
2019-01-31  7:22     ` Viresh Kumar
2019-01-31  9:34       ` Quentin Perret [this message]
2019-01-31  9:37         ` Viresh Kumar
2019-01-31  9:42     ` Quentin Perret
2019-01-31  7:26   ` Viresh Kumar
2019-01-31  9:51     ` Quentin Perret
2019-01-30 17:05 ` [PATCH v2 2/5] cpufreq: dt: Register an Energy Model Quentin Perret
2019-01-30 17:05 ` [PATCH v2 3/5] cpufreq: scpi: " Quentin Perret
2019-01-30 17:05 ` [PATCH v2 4/5] cpufreq: arm_big_little: " Quentin Perret
2019-01-30 17:05 ` [PATCH v2 5/5] cpufreq: scmi: " Quentin Perret

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=20190131093418.umsbh4eevgod42sh@queper01-lin \
    --to=quentin.perret@arm.com \
    --cc=dietmar.eggemann@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mka@chromium.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=sboyd@kernel.org \
    --cc=sudeep.holla@arm.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).