Re: [PATCH 2/2] cpufreq: acpi-cpufreq: Drop pointless label from acpi_cpufreq_target()

From: Srinivas Pandruvada
Date: Thu Feb 25 2016 - 18:40:13 EST


On Fri, 2016-02-26 at 00:03 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> 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@xxxxxxxxx>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@xxxxxxxxxxxxxxx>

> ---
> Â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@xxxxxxxxxxxxxxx
> More majordomo info atÂÂhttp://vger.kernel.org/majordomo-info.html