linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: shuah <shuah@kernel.org>
To: Nathan Chancellor <natechancellor@gmail.com>,
	Thomas Renninger <trenn@suse.com>
Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	clang-built-linux@googlegroups.com, shuah <shuah@kernel.org>
Subject: Re: [PATCH] tools/power/cpupower: Fix initializer override in hsw_ext_cstates
Date: Fri, 27 Sep 2019 13:10:58 -0600	[thread overview]
Message-ID: <209b17e8-9800-eec9-f781-8becebeddea9@kernel.org> (raw)
In-Reply-To: <20190927162642.2292584-1-natechancellor@gmail.com>

On 9/27/19 10:26 AM, Nathan Chancellor wrote:
> When building cpupower with clang, the following warning appears:
> 
>   utils/idle_monitor/hsw_ext_idle.c:42:16: warning: initializer overrides
>   prior initialization of this subobject [-Winitializer-overrides]
>                   .desc                   = N_("Processor Package C2"),
>                                                ^~~~~~~~~~~~~~~~~~~~~~
>   ./utils/helpers/helpers.h:25:33: note: expanded from macro 'N_'
>   #define N_(String) gettext_noop(String)
>                                   ^~~~~~
>   ./utils/helpers/helpers.h:23:30: note: expanded from macro
>   'gettext_noop'
>   #define gettext_noop(String) String
>                                ^~~~~~
>   utils/idle_monitor/hsw_ext_idle.c:41:16: note: previous initialization
>   is here
>                   .desc                   = N_("Processor Package C9"),
>                                                ^~~~~~~~~~~~~~~~~~~~~~
>   ./utils/helpers/helpers.h:25:33: note: expanded from macro 'N_'
>   #define N_(String) gettext_noop(String)
>                                   ^~~~~~
>   ./utils/helpers/helpers.h:23:30: note: expanded from macro
>   'gettext_noop'
>   #define gettext_noop(String) String
>                               ^~~~~~
>   1 warning generated.
> 
> This appears to be a copy and paste or merge mistake because the name
> and id fields both have PC9 in them, not PC2. Remove the second
> assignment to fix the warning.
> 
> Fixes: 7ee767b69b68 ("cpupower: Add Haswell family 0x45 specific idle monitor to show PC8,9,10 states")
> Link: https://github.com/ClangBuiltLinux/linux/issues/718
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> ---
>   tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c b/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c
> index 7c7451d3f494..58dbdfd4fa13 100644
> --- a/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c
> +++ b/tools/power/cpupower/utils/idle_monitor/hsw_ext_idle.c
> @@ -39,7 +39,6 @@ static cstate_t hsw_ext_cstates[HSW_EXT_CSTATE_COUNT] = {
>   	{
>   		.name			= "PC9",
>   		.desc			= N_("Processor Package C9"),
> -		.desc			= N_("Processor Package C2"),
>   		.id			= PC9,
>   		.range			= RANGE_PACKAGE,
>   		.get_count_percent	= hsw_ext_get_count_percent,
> 

Looks good to me. I will queue this up for 5.4-rc2 or rc3.

thanks,
-- Shuah

      reply	other threads:[~2019-09-27 19:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-27 16:26 [PATCH] tools/power/cpupower: Fix initializer override in hsw_ext_cstates Nathan Chancellor
2019-09-27 19:10 ` shuah [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=209b17e8-9800-eec9-f781-8becebeddea9@kernel.org \
    --to=shuah@kernel.org \
    --cc=clang-built-linux@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=natechancellor@gmail.com \
    --cc=trenn@suse.com \
    /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).