From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755857AbcIJKIi (ORCPT ); Sat, 10 Sep 2016 06:08:38 -0400 Received: from mout.web.de ([212.227.17.12]:63516 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755182AbcIJKIg (ORCPT ); Sat, 10 Sep 2016 06:08:36 -0400 Subject: [PATCH 26/30] ACPI-processor: Fix jump targets in acpi_processor_reevaluate_tstate() 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:08:24 +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:EGxQLHBk6hmPwyfuUjySb1RCF4OB2/zXthX5kdHGN6V+l7Rfuj9 FJ8XnZ4IV1AY4auu61Gdd5Blc2FXh7buubx4fN6PdDOv2R59aMIYcNCEII+hRFGCnek8Vva ggeE7ktiwCniWCUN8WmvD5SBK3pUkETBdTL9/AuKbhm+h6W/0ja08WctrUzMeCI7BQlw1LO g6pFbhAAFMvdc2mYes2qA== X-UI-Out-Filterresults: notjunk:1;V01:K0:013i1ZjVtS4=:cuwdHBEGpLpAoCAD5oBoK7 G1TlmegJ4rLrK226xgWIclxnBqQ1tKxcVxf2QTQ6Jo+YCZEdgGrCo8Lwbl3IGMXm1BqEXTh08 uwA4xB32/LuHxDOcnxqNB7MGwU6e4c6AQ7VT/kOE87oTwih5HAyQX4mZAyK3S/3GDY6r8TzrN PTY4VM2WQyU4CCcHxid9JuMe/IVIfday1cJd+R1McLrH1B1yHKEsjWTGAyXxSZCIV43c2zBxx 0P1e0Wy6A1f1WhBxtpNJyDyPqwicH9a7x6rz/DPj84NP+8jcLvT8ZO88j3+xVk2lQD6peYqb9 BAnKJ6Xqz4YHD3wgj+3eszvu4djHUif0QOSupC2FOx9sLeQmDSdXbP80+tM+EyoJrkdOHVAv8 0xj/GdlFDDB9yhQj+eaWB5Sbk1WmO7SawtkgHObOu4Gk9bjO8xE9bvkDEStq3nH/isPwIh1Ms tGHAOdnBzAQLVGl3xjOLEGyRz5iHLkFBzZY0/VI+ZacW29gb8Bdmb143wvAS2H+3h4jPyT1Mq xOYrvg03SNh1kRyHAHeZBGygFcwllUW60WRU5uWdUa9Lpc+rZxwNqK8IE1ydgeh1XvvgvtrWz 7mE9sY4H4w4ZSajh1xCbOD62ffBXuhID9s997YjDmKIrkiOcZrURoafwdrb8YnFzBxZ8NJkDo xv3D1s0xLG7giCJoOyVPHhGLsHL86jbrNH9ZYxQ4DbpvmDHNEgKSO7wDxK8JepGE7leM9mVdV 3bKEGMsSVyZPuZD85QxLuUtA2AY84/WxYx7VTPcQk2VbMt6utr1rEQCKinrwgINFaiKDB60cS WmADgTW 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 21:40:40 +0200 1. Adjust jump targets according to the current Linux coding style convention. 2. Delete a duplicate check then at the end. 3. Do not use curly brackets at two source code places where a single statement should be sufficient. Signed-off-by: Markus Elfring --- drivers/acpi/processor_throttling.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/acpi/processor_throttling.c b/drivers/acpi/processor_throttling.c index 0b4e058..994f21c 100644 --- a/drivers/acpi/processor_throttling.c +++ b/drivers/acpi/processor_throttling.c @@ -379,23 +379,19 @@ void acpi_processor_reevaluate_tstate(struct acpi_processor *pr, { int result = 0; - if (action == CPU_DEAD) { + if (action == CPU_DEAD) /* When one CPU is offline, the T-state throttling * will be invalidated. */ - pr->flags.throttling = 0; - return; - } + goto disable_throttling; /* the following is to recheck whether the T-state is valid for * the online CPU */ - if (!pr->throttling.state_count) { + if (!pr->throttling.state_count) /* If the number of T-state is invalid, it is * invalidated. */ - pr->flags.throttling = 0; - return; - } + goto disable_throttling; pr->flags.throttling = 1; /* Disable throttling (if enabled). We'll let subsequent @@ -405,17 +401,16 @@ void acpi_processor_reevaluate_tstate(struct acpi_processor *pr, result = acpi_processor_get_throttling(pr); if (result) - goto end; + goto disable_throttling; if (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; + disable_throttling: + pr->flags.throttling = 0; } /* * _PTC - Processor Throttling Control (and status) register location -- 2.10.0