From patchwork Fri Mar 28 11:41:20 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27257 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0E9EA20062 for ; Fri, 28 Mar 2014 11:42:10 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fb1sf11840976pad.0 for ; Fri, 28 Mar 2014 04:42:10 -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=pd6Amdkma5+dnwl3XLPduiom5F9pXIrHTbPvhHAtKZI=; b=lt4OU1QcitiKWRY7zgmHO763UZpq5jLJpqSBTd32OHDlauEyqOe6pWMRGaw5o7AgIG xsKt4vFjY1RhvUPi3qOPARhO1rQnsmMh25XG/dmmk2QOYOcNlduboAZWi6ek/V08dftv HgEiXaX1t2b7q+zd549+xiJm64HsJw84VQwc+bxWkDVPwqlCPRHDot91S3NFLd49hox0 Mr9D0kSmZU9aw4JllR5Tobrl0plpFtkOHX0m3XF9m9wdZNr4lwF+Ua7JSQg6C8HP3xF2 hYceq/FazDwV/q/jmoumeShNDBL5K4E6qgk2fKp350op9hbj2qrGLBV1bm05k8y0wZ/S yzOw== X-Gm-Message-State: ALoCoQnTVsPwdTwVJY1Ft1ppkudkC/sYPudW69e3EjdHlcUHfTy61PmKntbb7NPG7JEX9OmwS07x X-Received: by 10.66.189.228 with SMTP id gl4mr3112557pac.26.1396006930000; Fri, 28 Mar 2014 04:42:10 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.26.183 with SMTP id 52ls1326837qgv.38.gmail; Fri, 28 Mar 2014 04:42:09 -0700 (PDT) X-Received: by 10.221.40.10 with SMTP id to10mr1069161vcb.22.1396006929818; Fri, 28 Mar 2014 04:42:09 -0700 (PDT) Received: from mail-ve0-f172.google.com (mail-ve0-f172.google.com [209.85.128.172]) by mx.google.com with ESMTPS id ru8si1200667vcb.29.2014.03.28.04.42.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:42:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.172 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.172; Received: by mail-ve0-f172.google.com with SMTP id jx11so5644592veb.3 for ; Fri, 28 Mar 2014 04:42:09 -0700 (PDT) X-Received: by 10.58.207.74 with SMTP id lu10mr6703931vec.15.1396006929740; Fri, 28 Mar 2014 04:42:09 -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 v8csp1528vcv; Fri, 28 Mar 2014 04:42:09 -0700 (PDT) X-Received: by 10.68.110.165 with SMTP id ib5mr8140669pbb.61.1396006928972; Fri, 28 Mar 2014 04:42:08 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m9si3526435pab.126.2014.03.28.04.42.08; Fri, 28 Mar 2014 04:42:08 -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 S1751848AbaC1Ll5 (ORCPT + 27 others); Fri, 28 Mar 2014 07:41:57 -0400 Received: from mail-we0-f170.google.com ([74.125.82.170]:33217 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773AbaC1Lly (ORCPT ); Fri, 28 Mar 2014 07:41:54 -0400 Received: by mail-we0-f170.google.com with SMTP id w61so2593197wes.15 for ; Fri, 28 Mar 2014 04:41:53 -0700 (PDT) X-Received: by 10.180.19.138 with SMTP id f10mr11820735wie.11.1396006913726; Fri, 28 Mar 2014 04:41:53 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id gx9sm6433223wib.13.2014.03.28.04.41.49 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:41:53 -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 01/16] hrtimer: move unlock_hrtimer_base() upwards Date: Fri, 28 Mar 2014 17:11:20 +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.172 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 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 e486a14..a710638 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -253,6 +253,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: @@ -801,15 +807,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