From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Linux PM list <linux-pm@vger.kernel.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Viresh Kumar <viresh.kumar@linaro.org>
Subject: Re: [PATCH 2/2] cpufreq: acpi-cpufreq: Drop pointless label from acpi_cpufreq_target()
Date: Thu, 25 Feb 2016 15:38:34 -0800 [thread overview]
Message-ID: <1456443514.17628.26.camel@linux.intel.com> (raw)
In-Reply-To: <1905248.5bkSJ3vszA@vostro.rjw.lan>
On Fri, 2016-02-26 at 00:03 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
>
> The "out" label at the final return statement in
> acpi_cpufreq_target()
> is totally pointless, so drop them and modify the code to return the
> right values immediately instead of jumping to it.
>
> No functional changes.
>
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> ---
> drivers/cpufreq/acpi-cpufreq.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> Index: linux-pm/drivers/cpufreq/acpi-cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/acpi-cpufreq.c
> +++ linux-pm/drivers/cpufreq/acpi-cpufreq.c
> @@ -434,7 +434,7 @@ static int acpi_cpufreq_target(struct cp
> } else {
> pr_debug("Already at target state (P%d)\n",
> next_perf_state);
> - goto out;
> + return 0;
> }
> }
>
> @@ -456,8 +456,7 @@ static int acpi_cpufreq_target(struct cp
> cmd.val = (u32) perf-
> >states[next_perf_state].control;
> break;
> default:
> - result = -ENODEV;
> - goto out;
> + return -ENODEV;
> }
>
> /* cpufreq holds the hotplug lock, so we are safe from here
> on */
> @@ -480,7 +479,6 @@ static int acpi_cpufreq_target(struct cp
> if (!result)
> perf->state = next_perf_state;
>
> -out:
> return result;
> }
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pm"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-25 23:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-25 23:01 [PATCH 0/2] cpufreq cleanups related to pointless labels Rafael J. Wysocki
2016-02-25 23:03 ` [PATCH 1/2] cpufreq: Rearrange __cpufreq_driver_target() Rafael J. Wysocki
2016-02-25 23:03 ` [PATCH 2/2] cpufreq: acpi-cpufreq: Drop pointless label from acpi_cpufreq_target() Rafael J. Wysocki
2016-02-25 23:38 ` Srinivas Pandruvada [this message]
2016-02-26 2:34 ` [PATCH 0/2] cpufreq cleanups related to pointless labels Viresh Kumar
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=1456443514.17628.26.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--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).