From patchwork Fri Mar 28 11:41:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27269 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f198.google.com (mail-qc0-f198.google.com [209.85.216.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EB0E82066E for ; Fri, 28 Mar 2014 11:43:39 +0000 (UTC) Received: by mail-qc0-f198.google.com with SMTP id r5sf10439869qcx.5 for ; Fri, 28 Mar 2014 04:43:39 -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=llnYJENVlR5YqwmOGg9rSxuLOaPCovN0RVwApFWpbpo=; b=gNlUbjTxpEvFYc+2v6BJUPaSPbSJgEv0wTso+0eJYEJtpwY4EOEvxW3sJm7TUVMWQn J3u80Z5aRKbSsf9RrYMy/ihwUq59phgryNHcYuJ1iY85GAGiMsuf4sTXj9zOPPs7Drh8 3Vn/vYFeug3JL0zeOwyPFFQkYvSCZjyzP2Kw38sHQwvrD+WdStttpVdsh9io/LDeRNoS gvibR2tSzrBUEQbANlWq6iZbGh2z36JntXhnLlXPktPNH5DoWW42k3cmrc5pOytRRZ7D OTCDP4dRZxASJOU1Es78JglSA24CMJyui7vwFrFZgNQdI2vHQ5yV57cHi+d1R7ta5nx6 yzOA== X-Gm-Message-State: ALoCoQnT33qNOJsnwuD6q971t4190KxA3UcqOwtbUwJLEv6DrcswPRMde1i4B8i8DIOevyOFLHHL X-Received: by 10.236.17.161 with SMTP id j21mr157791yhj.55.1396007019641; Fri, 28 Mar 2014 04:43:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.44.72 with SMTP id f66ls1457025qga.47.gmail; Fri, 28 Mar 2014 04:43:39 -0700 (PDT) X-Received: by 10.58.31.136 with SMTP id a8mr7000290vei.20.1396007019568; Fri, 28 Mar 2014 04:43:39 -0700 (PDT) Received: from mail-ve0-f171.google.com (mail-ve0-f171.google.com [209.85.128.171]) by mx.google.com with ESMTPS id o6si1084904vcz.184.2014.03.28.04.43.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.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.128.171; Received: by mail-ve0-f171.google.com with SMTP id jy13so2517408veb.30 for ; Fri, 28 Mar 2014 04:43:39 -0700 (PDT) X-Received: by 10.221.28.202 with SMTP id rv10mr6828252vcb.10.1396007019480; Fri, 28 Mar 2014 04:43:39 -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 v8csp1602vcv; Fri, 28 Mar 2014 04:43:39 -0700 (PDT) X-Received: by 10.66.227.104 with SMTP id rz8mr8172108pac.74.1396007018662; Fri, 28 Mar 2014 04:43:38 -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 S1752355AbaC1LnU (ORCPT + 27 others); Fri, 28 Mar 2014 07:43:20 -0400 Received: from mail-we0-f179.google.com ([74.125.82.179]:64102 "EHLO mail-we0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752315AbaC1LnQ (ORCPT ); Fri, 28 Mar 2014 07:43:16 -0400 Received: by mail-we0-f179.google.com with SMTP id x48so2615792wes.10 for ; Fri, 28 Mar 2014 04:43:15 -0700 (PDT) X-Received: by 10.180.81.228 with SMTP id d4mr20424556wiy.49.1396006994981; Fri, 28 Mar 2014 04:43:14 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id n15sm6476952wij.3.2014.03.28.04.43.11 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:14 -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 12/16] hrtimer: rewrite switch_hrtimer_base() to remove extra indentation level Date: Fri, 28 Mar 2014 17:11:31 +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.128.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 switch_hrtimer_base() 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 | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 04f8e44..30efa1c 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -203,33 +203,33 @@ again: new_cpu_base = &per_cpu(hrtimer_bases, cpu); new_base = &new_cpu_base->clock_base[base->index]; - if (base != new_base) { - /* - * We are trying to move timer to new_base. - * However we can't change timer's base while it is running, - * so we keep it on the same CPU. No hassle vs. reprogramming - * the event source in the high resolution case. The softirq - * code will take care of this when the timer function has - * completed. There is no conflict as we hold the lock until - * the timer is enqueued. - */ - if (unlikely(hrtimer_callback_running(timer))) - return; + if (base == new_base) + return; - /* See the comment in lock_timer_base() */ - timer->base = NULL; - raw_spin_unlock(&base->cpu_base->lock); - raw_spin_lock(&new_base->cpu_base->lock); + /* + * We are trying to move timer to new_base. However we can't change + * timer's base while it is running, so we keep it on the same CPU. No + * hassle vs. reprogramming the event source in the high resolution + * case. The softirq code will take care of this when the timer function + * has completed. There is no conflict as we hold the lock until the + * timer is enqueued. + */ + if (unlikely(hrtimer_callback_running(timer))) + return; - if (cpu != this_cpu && hrtimer_check_target(timer, new_base)) { - cpu = this_cpu; - raw_spin_unlock(&new_base->cpu_base->lock); - raw_spin_lock(&base->cpu_base->lock); - timer->base = base; - goto again; - } - timer->base = new_base; + /* See the comment in lock_timer_base() */ + timer->base = NULL; + raw_spin_unlock(&base->cpu_base->lock); + raw_spin_lock(&new_base->cpu_base->lock); + + if (cpu != this_cpu && hrtimer_check_target(timer, new_base)) { + cpu = this_cpu; + raw_spin_unlock(&new_base->cpu_base->lock); + raw_spin_lock(&base->cpu_base->lock); + timer->base = base; + goto again; } + timer->base = new_base; } #else /* CONFIG_SMP */