From patchwork Fri Mar 28 11:41:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27270 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 9857D20062 for ; Fri, 28 Mar 2014 11:43:41 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id j17sf17520970oag.10 for ; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=V5owgJmx6jW7MRgyoEGb96NCFMWFo1TWO1XqYE7/4Pc=; b=jvPzWurYkj3fubeE0G9nL8lnyU6rhbIi3u5GjJFJLVlr8K+VQNTYkKcH+91E8HhmH3 ro2EF/9NJ//9G0p/FXCUHr5XLM8g2ZCj3FY4e5ch49ScGiM0/30sWq9qd8Y8r35enwKz rjdUQdeYWw4JFqjzoVrOPA/SDfJs7uYNzSwaxabjsFJLFV4BxkwSNoO17+Vc/lICwp9O 3R4vNuSUx3zZG141H/YtBQqTCVLRuIyskqBQzu71eBgzHPG7rwn3JorXa8PoydPT15DR yiP/404+iMkK9z/lJiYJZ61E6It0t3rusurwEYg3QxjHrCu2tpzlF9mx39wlnWwq7SoA zV+w== X-Gm-Message-State: ALoCoQky+XpJlJtKgXD9tm5lUG8aDUUs2dhK+ZtrmmOY1hBtQACB5LO3TZtieizzhOTKQ8ZURD5M X-Received: by 10.183.1.7 with SMTP id bc7mr517237obd.47.1396007021174; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.103.77 with SMTP id x71ls1564716qge.31.gmail; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Received: by 10.52.147.238 with SMTP id tn14mr5697779vdb.23.1396007021078; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id ww7si1195285vec.102.2014.03.28.04.43.41 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:41 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so5824824vcb.30 for ; Fri, 28 Mar 2014 04:43:41 -0700 (PDT) X-Received: by 10.220.250.203 with SMTP id mp11mr6755721vcb.2.1396007020985; Fri, 28 Mar 2014 04:43:40 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.12.8 with SMTP id v8csp1605vcv; Fri, 28 Mar 2014 04:43:40 -0700 (PDT) X-Received: by 10.66.141.197 with SMTP id rq5mr8137979pab.64.1396007020304; Fri, 28 Mar 2014 04:43:40 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id et3si3511120pbc.420.2014.03.28.04.43.38; Fri, 28 Mar 2014 04:43:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752400AbaC1Ln2 (ORCPT + 27 others); Fri, 28 Mar 2014 07:43:28 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:50866 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752360AbaC1LnX (ORCPT ); Fri, 28 Mar 2014 07:43:23 -0400 Received: by mail-we0-f174.google.com with SMTP id t60so2600444wes.33 for ; Fri, 28 Mar 2014 04:43:21 -0700 (PDT) X-Received: by 10.180.12.43 with SMTP id v11mr46528158wib.33.1396007001854; Fri, 28 Mar 2014 04:43:21 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id h5sm6397865wiy.18.2014.03.28.04.43.17 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:20 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, linaro-networking@linaro.org, Arvind.Chauhan@arm.com, Viresh Kumar Subject: [PATCH 13/16] hrtimer: rewrite remove_hrtimer() to remove extra indentation level Date: Fri, 28 Mar 2014 17:11:32 +0530 Message-Id: X-Mailer: git-send-email 1.7.12.rc2.18.g61b472e In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Complete bottom part of remove_hrtimer() is part of a 'if' block and so all code present in that block has extra indentation level before it. Rewrite it to remove this extra indentation level. Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 30efa1c..0ae0fbf 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -896,32 +896,29 @@ static void __remove_hrtimer(struct hrtimer *timer, unsigned long newstate, /* remove hrtimer, called with base lock held */ static inline int remove_hrtimer(struct hrtimer *timer) { - if (hrtimer_is_queued(timer)) { - unsigned long state; - int reprogram; + unsigned long state; - /* - * Remove the timer and force reprogramming when high - * resolution mode is active and the timer is on the current - * CPU. If we remove a timer on another CPU, reprogramming is - * skipped. The interrupt event on this CPU is fired and - * reprogramming happens in the interrupt handler. This is a - * rare case and less expensive than a smp call. - */ - debug_deactivate(timer); - timer_stats_hrtimer_clear_start_info(timer); - reprogram = - timer->base->cpu_base == &__get_cpu_var(hrtimer_bases); - /* - * We must preserve the CALLBACK state flag here, - * otherwise we could move the timer base in - * switch_hrtimer_base. - */ - state = timer->state & HRTIMER_STATE_CALLBACK; - __remove_hrtimer(timer, state, reprogram); - return 1; - } - return 0; + if (!hrtimer_is_queued(timer)) + return 0; + + /* + * Remove the timer and force reprogramming when high resolution mode is + * active and the timer is on the current CPU. If we remove a timer on + * another CPU, reprogramming is skipped. The interrupt event on this + * CPU is fired and reprogramming happens in the interrupt handler. This + * is a rare case and less expensive than a smp call. + */ + debug_deactivate(timer); + timer_stats_hrtimer_clear_start_info(timer); + + /* + * We must preserve the CALLBACK state flag here, otherwise we could + * move the timer base in switch_hrtimer_base. + */ + state = timer->state & HRTIMER_STATE_CALLBACK; + __remove_hrtimer(timer, state, + timer->base->cpu_base == &__get_cpu_var(hrtimer_bases)); + return 1; } int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,