Linux Power Management development
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Nick Desaulniers <ndesaulniers@google.com>,
	Nathan Chancellor <natechancellor@gmail.com>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	linux-pm@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] cpufreq / CPPC: Mark acpi_ids as used
Date: Fri, 05 Oct 2018 11:51:34 +0200	[thread overview]
Message-ID: <1561369.7cfCgrRCj6@aspire.rjw.lan> (raw)
In-Reply-To: <CAKwvOdnbnw-yciWkuuKMye=57qwpXDX4oPaoNUoeYvbpn-Tavw@mail.gmail.com>

On Wednesday, October 3, 2018 12:40:19 AM CEST Nick Desaulniers wrote:
> On Tue, Oct 2, 2018 at 3:35 PM Nathan Chancellor
> <natechancellor@gmail.com> wrote:
> >
> > Clang warns:
> >
> > drivers/cpufreq/cppc_cpufreq.c:431:36: warning: variable 'cppc_acpi_ids'
> > is not needed and will not be emitted [-Wunneeded-internal-declaration]
> > static const struct acpi_device_id cppc_acpi_ids[] = {
> >                                    ^
> > 1 warning generated.
> >
> > Mark the definition as used so that Clang understands we don't want this
> > warning while not inhibiting Clang's dead code elimination from removing
> > the unreferenced internal symbol when moving the data it contains to the
> > globally available symbol via MODULE_DEVICE_TABLE.
> >
> > $ nm -S drivers/cpufreq/cppc_cpufreq.o | grep acpi | tail -1
> > 0000000000000000 0000000000000040 R __mod_acpi__cppc_acpi_ids_device_table
> >
> > Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
> > Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> > ---
> >  drivers/cpufreq/cppc_cpufreq.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/cpufreq/cppc_cpufreq.c b/drivers/cpufreq/cppc_cpufreq.c
> > index 30f302149730..fd25c21cee72 100644
> > --- a/drivers/cpufreq/cppc_cpufreq.c
> > +++ b/drivers/cpufreq/cppc_cpufreq.c
> > @@ -428,7 +428,7 @@ MODULE_LICENSE("GPL");
> >
> >  late_initcall(cppc_cpufreq_init);
> >
> > -static const struct acpi_device_id cppc_acpi_ids[] = {
> > +static const struct acpi_device_id cppc_acpi_ids[] __used = {
> >         {ACPI_PROCESSOR_DEVICE_HID, },
> >         {}
> >  };
> > --

Patch applied, thanks!

      reply	other threads:[~2018-10-05  9:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-02 22:34 [PATCH] cpufreq / CPPC: Mark acpi_ids as used Nathan Chancellor
2018-10-02 22:40 ` Nick Desaulniers
2018-10-05  9:51   ` 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=1561369.7cfCgrRCj6@aspire.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.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