From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755913AbcIJKCh (ORCPT ); Sat, 10 Sep 2016 06:02:37 -0400 Received: from mout.web.de ([217.72.192.78]:57682 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755315AbcIJKCe (ORCPT ); Sat, 10 Sep 2016 06:02:34 -0400 Subject: [PATCH 20/30] ACPI-processor: Fix jump targets in acpi_processor_get_throttling_info() To: linux-acpi@vger.kernel.org, Len Brown , "Rafael J. Wysocki" References: Cc: LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Paolo Bonzini From: SF Markus Elfring Message-ID: Date: Sat, 10 Sep 2016 12:02:22 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:nMQI+JXcW6dB4jsOz7fT25PKnoCDf/yu73RjrzSLoJa8MEm+Div Lf5ZB41pClmYobliAP+WgL30gcMI+b6CKSCGWXDrTb/cyE8xUEyc2vIwce/4hMGew9b7lnB L76WWIaIAdLpU4lK/IhAWD1+yjd9CaWzQ/0cZFHNqu/dxJg+2ZHysoZOglFDy2Du1aK83mM FXG9mU+5mwcEru62fvReA== X-UI-Out-Filterresults: notjunk:1;V01:K0:Kc2vPCP/dYI=:NpoIAJdFmVV2nyYDgObrhF BcVsdIZRdb2CfnD2UW01LI+N+zvoXg/xDAxVj5zM1mRjZfxKjrQVobuD8VmwIv7w4Mx2h2XaL MKhPg0qoFs1BODpZl7KRx9ZNK7cjAOgTWH5AAF58WHHgX3mfqTdEqjN9fR63rCNbcEhH1+pO6 3Whm4pyjaRlu0oxEEiXSiv1YvA2xES9I71AR8QtZCGnJxVxmPun3Oi691G4knwt5CDYwbOZCQ 2lUofjVKQRO18iu0ZMk9LbSe+vPbU1k1PzNuqfqN+KFd+Ar+DRAZO7tUxm/z4uSiPOME94Axb kNsL84yyHOQLcXSdbfFSqL14YcecK23z+aHB7Fkp9izxGOKMCPE/fTSFZgdCBZgrb0QZ3QUdk 7jXlvhT5+YsQCiZhxWD9GxpPGleNlanscBJunvn+8Mv85vNQxmyGWWQXG98viPva6/MgsBfu9 NoR5K1WzbHgKwFeTweeQZngzr/NaVOiyeSW2Jg6EfVsMgsR+WiZjH1rBG390lS4lueeVxkGjk eC8S0HwKD7hvqrARKHaJJjFXOain7syMGeFGN0uyv2MG1YO1r/vU8+1cp8d/iDGixju6NNo6U g/ha4wXY4m0rfWWJqTkVYWu3Idk3FdimBHu6d64oRe6Okh79KbOId5laW9BbdC1SRvNIFazTy K/l3L3B7p7a1s6nl3Ai4UgRddhS0x8C79sNKX8h9WT9gORsa6fP70GIgjF/ekpm6d7+Anlw1Q xYfsS5KyZ7FE8qAvGCgiJNpeKjMuloahNva4MKkKscfHpReIyzMRHdhwZzanWnPJkADivckLo zqD047D Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Markus Elfring Date: Tue, 6 Sep 2016 20:32:46 +0200 1. Adjust jump targets according to the current Linux coding style convention. 2. Delete a duplicate check then at the end. 3. Omit the explicit initialisation for the local variable "result" at the beginning which became unnecessary with this refactoring. Signed-off-by: Markus Elfring --- drivers/acpi/processor_throttling.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 8847bca..24bd97f 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -1184,7 +1184,7 @@ int acpi_processor_set_throttling(struct acpi_processor *pr, int acpi_processor_get_throttling_info(struct acpi_processor *pr) { - int result = 0; + int result; struct acpi_processor_throttling *pthrottling; ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -1249,7 +1249,7 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) result = acpi_processor_get_throttling(pr); if (result) - goto end; + goto disable_throttling; if (pr->throttling.state) { ACPI_DEBUG_PRINT((ACPI_DB_INFO, @@ -1257,13 +1257,11 @@ int acpi_processor_get_throttling_info(struct acpi_processor *pr) pr->throttling.state)); result = acpi_processor_set_throttling(pr, 0, false); if (result) - goto end; + goto disable_throttling; } - - end: - if (result) - pr->flags.throttling = 0; - + return 0; + disable_throttling: + pr->flags.throttling = 0; return result; } -- 2.10.0