From patchwork Fri Apr 4 06:36:02 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27746 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f199.google.com (mail-ig0-f199.google.com [209.85.213.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 88FDC2036E for ; Fri, 4 Apr 2014 06:42:37 +0000 (UTC) Received: by mail-ig0-f199.google.com with SMTP id c1sf1213921igq.6 for ; Thu, 03 Apr 2014 23:42:37 -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=qYwb+EEBWDuLdAjKzh5xzgmTW693sXwEM3BycWR43kU=; b=WMO6ihEgjw4KVoEgzszp9z259HdDIs1Unvpo/QMBDSVdIR6m/ZSyqt4KxPfKaDXwNK rU8HQjjQ9Pp6mJ/s7EMdtxNgG3ZMignCd7kXiCYRTLMHrieQQ9AwqwwaLmKt2z/DpjnH 5dluNGIOejKHhwwqDXVNBuoW1A/WjkbZ2XuAsYfNgzKXBboABhCU4znYfVMzk+2aXIec qCyGaSBEwjiiYTueltRzsKSa0Pvup779FErK1P5iHrezrjnX4bcTEbXRzXsSVWtKhAoZ LvFnT72Cjj/iI6I5zQ7tLFggGsKEt4e/7QSAF63TpX8kmnYsdfGMKWg/81kgC/qlhwcz dCbA== X-Gm-Message-State: ALoCoQnCEgYG8Ir+W+m4XpMMhjqRy44W9yL7RuMFfIzpQRGikHCheBjdQtLxuw5RwGGsJdaHhWmJ X-Received: by 10.43.14.137 with SMTP id pq9mr6311058icb.12.1396593756949; Thu, 03 Apr 2014 23:42:36 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.31.66 with SMTP id e60ls808357qge.51.gmail; Thu, 03 Apr 2014 23:42:36 -0700 (PDT) X-Received: by 10.220.162.6 with SMTP id t6mr6879054vcx.12.1396593756840; Thu, 03 Apr 2014 23:42:36 -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 u5si1628557vdo.166.2014.04.03.23.42.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:42:36 -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 lg15so2841740vcb.30 for ; Thu, 03 Apr 2014 23:42:36 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr6762988vcw.15.1396593756763; Thu, 03 Apr 2014 23:42:36 -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 v8csp89286vcv; Thu, 3 Apr 2014 23:42:36 -0700 (PDT) X-Received: by 10.68.170.66 with SMTP id ak2mr12885863pbc.5.1396593752978; Thu, 03 Apr 2014 23:42:32 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xt7si4198997pab.20.2014.04.03.23.42.32; Thu, 03 Apr 2014 23:42:32 -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 S1752661AbaDDGlp (ORCPT + 27 others); Fri, 4 Apr 2014 02:41:45 -0400 Received: from mail-we0-f177.google.com ([74.125.82.177]:52532 "EHLO mail-we0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752633AbaDDGlk (ORCPT ); Fri, 4 Apr 2014 02:41:40 -0400 Received: by mail-we0-f177.google.com with SMTP id u57so2927037wes.36 for ; Thu, 03 Apr 2014 23:41:39 -0700 (PDT) X-Received: by 10.180.182.166 with SMTP id ef6mr1723961wic.29.1396593698911; Thu, 03 Apr 2014 23:41:38 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id fs4sm2711126wib.11.2014.04.03.23.41.35 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:41:38 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, fweisbec@gmail.com, linaro-networking@linaro.org, Arvind.Chauhan@arm.com, linux-kernel@vger.kernel.org, Viresh Kumar Subject: [PATCH V2 19/36] hrtimer: rewrite remove_hrtimer() to remove extra indentation level Date: Fri, 4 Apr 2014 12:06:02 +0530 Message-Id: <7ec75008ea6342e7dfac95c6a9cc8bf77b8ba153.1396592516.git.viresh.kumar@linaro.org> 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 | 46 ++++++++++++++++++++++------------------------ 1 file changed, 22 insertions(+), 24 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index fe13dcf..2ac423d 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -913,31 +913,29 @@ static void __remove_hrtimer(struct hrtimer *timer, static inline int remove_hrtimer(struct hrtimer *timer, struct hrtimer_clock_base *base) { - 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 = 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, base, 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, base, state, + base->cpu_base == &__get_cpu_var(hrtimer_bases)); + return 1; } int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim,