lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1456443514.17628.26.camel@linux.intel.com>
Date:	Thu, 25 Feb 2016 15:38:34 -0800
From:	Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>
To:	"Rafael J. Wysocki" <rjw@...ysocki.net>,
	Linux PM list <linux-pm@...r.kernel.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Viresh Kumar <viresh.kumar@...aro.org>
Subject: Re: [PATCH 2/2] cpufreq: acpi-cpufreq: Drop pointless label from
 acpi_cpufreq_target()

On Fri, 2016-02-26 at 00:03 +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.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@...el.com>
Reviewed-by: Srinivas Pandruvada <srinivas.pandruvada@...ux.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@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ