From patchwork Fri Apr 4 06:35:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27740 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f200.google.com (mail-ve0-f200.google.com [209.85.128.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2C9812036E for ; Fri, 4 Apr 2014 06:42:29 +0000 (UTC) Received: by mail-ve0-f200.google.com with SMTP id oy12sf4759102veb.7 for ; Thu, 03 Apr 2014 23:42:28 -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=RuEnmZVPMSSvWsmp/oOBsnP8u2w7dvPKoIB7gGr3fxc=; b=W9Wue/g+QMxQR8NPiTCCq7eeo83N7UWTx7TmwiTBDBJgUw6vevUC3DeDYLO3SEgRHZ 6qMEn7U9Bcyb1AsCUOLcxqXS92hoAGj7rI+QFdHWIVh6glVC81ZeQctj91+6I1w7v3CU kKQMYoAdcmJUMLVWcpDF7sXrPDE1wE7ZR0OsB+mzlvBAUWSno7SiPf9rjhlZ/s+ZbT5r /b1Vf2oNx8FSnAS85+22ewtDyVGI13QodMt5cmS7t0FVVf4AcMA1plZv5nIFZxDL9C3V WxB6lYqPBDrV/AXBX5dabpOSXlzfgCEgGO1tok5okszTi0F0JNtv3aerX/i9dKm4D2VN VtaQ== X-Gm-Message-State: ALoCoQlH73Q7dXLCvaLKo/NHlrYCCMDJZn03i1ZZSvJpW504m8eE76uA37THM3YbWaexvw2kVwb1 X-Received: by 10.236.28.163 with SMTP id g23mr5782119yha.18.1396593748824; Thu, 03 Apr 2014 23:42:28 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.106.71 with SMTP id d65ls939797qgf.17.gmail; Thu, 03 Apr 2014 23:42:28 -0700 (PDT) X-Received: by 10.58.49.10 with SMTP id q10mr3506130ven.5.1396593748727; Thu, 03 Apr 2014 23:42:28 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id sq9si1630535vdc.143.2014.04.03.23.42.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:42:28 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.169 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.169; Received: by mail-vc0-f169.google.com with SMTP id ik5so2822466vcb.14 for ; Thu, 03 Apr 2014 23:42:28 -0700 (PDT) X-Received: by 10.52.240.207 with SMTP id wc15mr9941581vdc.14.1396593748498; Thu, 03 Apr 2014 23:42:28 -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 v8csp89270vcv; Thu, 3 Apr 2014 23:42:28 -0700 (PDT) X-Received: by 10.68.236.229 with SMTP id ux5mr12771782pbc.98.1396593747592; Thu, 03 Apr 2014 23:42:27 -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.26; Thu, 03 Apr 2014 23:42:26 -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 S1752486AbaDDGlO (ORCPT + 27 others); Fri, 4 Apr 2014 02:41:14 -0400 Received: from mail-we0-f176.google.com ([74.125.82.176]:52541 "EHLO mail-we0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752135AbaDDGkf (ORCPT ); Fri, 4 Apr 2014 02:40:35 -0400 Received: by mail-we0-f176.google.com with SMTP id x48so2937610wes.35 for ; Thu, 03 Apr 2014 23:40:34 -0700 (PDT) X-Received: by 10.181.13.11 with SMTP id eu11mr1815265wid.30.1396593634547; Thu, 03 Apr 2014 23:40:34 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id er4sm11000573wjd.38.2014.04.03.23.40.31 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:40:33 -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 08/36] hrtimer: move unlock_hrtimer_base() upwards Date: Fri, 4 Apr 2014 12:05:51 +0530 Message-Id: <9279b89e2ff1f531e9b8cbf09d30f68c1de1c433.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.169 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: , unlock_hrtimer_base() was handled specially at a separate place earlier as lock_hrtimer_base() had separate definitions for SMP and non-SMP cases, but unlock_hrtimer_base() had only a single definition. And so probably it was kept at the end of this #ifdef/endif CONFIG_SMP. But this #ifdef ends right after lock_hrtimer_base()'s definition (Atleast in the current code) and so we can move unlock_hrtimer_base() upwards, i.e. closer to its counterparts. This improves readability of the code. Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index db580ab..3b29023 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -254,6 +254,12 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) #endif /* !CONFIG_SMP */ +static inline +void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) +{ + raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags); +} + /* * Functions for the union type storage format of ktime_t which are * too large for inlining: @@ -805,15 +811,6 @@ static inline void timer_stats_account_hrtimer(struct hrtimer *timer) #endif } -/* - * Counterpart to lock_hrtimer_base above: - */ -static inline -void unlock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) -{ - raw_spin_unlock_irqrestore(&timer->base->cpu_base->lock, *flags); -} - /** * hrtimer_forward - forward the timer expiry * @timer: hrtimer to forward