From: Thomas Renninger <trenn@suse.de>
To: Sherry Hurwitz <sherry.hurwitz@amd.com>
Cc: linux-pm@vger.kernel.org, "Rafael J. Wysocki" <rjw@rjwysocki.net>
Subject: Re: [PATCH 1/2] cpupower: Fix bug where return value was not used
Date: Fri, 23 Jun 2017 16:00:57 +0200 [thread overview]
Message-ID: <6275735.KfbznezEp5@skinner> (raw)
In-Reply-To: <20170620070241.21434.57148.stgit@Diesel2540.amd.com>
On Tuesday, June 20, 2017 02:07:37 AM Sherry Hurwitz wrote:
> Save return value from amd_pci_get_num_boost_states
> and remove redundant setting of *support
>
> Signed-off-by: Sherry Hurwitz <sherry.hurwitz@amd.com>
Acked-by: Thomas Renninger <trenn@suse.com>
Reviewed-by: Thomas Renninger <trenn@suse.com>
whatever is more appropriate or both...
Thanks, good catch!
Rafael can you queue this an the next one, please?
Thanks,
Thomas
> ---
> tools/power/cpupower/utils/helpers/misc.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/tools/power/cpupower/utils/helpers/misc.c
b/tools/power/cpupower/utils/helpers/misc.c
> index 1609243..6952a6a 100644
> --- a/tools/power/cpupower/utils/helpers/misc.c
> +++ b/tools/power/cpupower/utils/helpers/misc.c
> @@ -16,10 +16,9 @@ int cpufreq_has_boost_support(unsigned int cpu, int
*support, int *active,
>
> if (cpupower_cpu_info.caps & CPUPOWER_CAP_AMD_CBP) {
> *support = 1;
> - amd_pci_get_num_boost_states(active, states);
> - if (ret <= 0)
> + ret = amd_pci_get_num_boost_states(active, states);
> + if (ret)
> return ret;
> - *support = 1;
> } else if (cpupower_cpu_info.caps & CPUPOWER_CAP_INTEL_IDA)
> *support = *active = 1;
> return 0;
>
>
next prev parent reply other threads:[~2017-06-23 14:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 7:02 [PATCH 0/2] Series short description Sherry Hurwitz
2017-06-20 7:07 ` [PATCH 1/2] cpupower: Fix bug where return value was not used Sherry Hurwitz
2017-06-23 14:00 ` Thomas Renninger [this message]
2017-06-23 23:03 ` Rafael J. Wysocki
2017-06-20 7:08 ` [PATCH 2/2] cpupower: Add support for new AMD family 0x17 Sherry Hurwitz
2017-06-23 14:04 ` Thomas Renninger
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=6275735.KfbznezEp5@skinner \
--to=trenn@suse.de \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=sherry.hurwitz@amd.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