From patchwork Fri Apr 4 06:36:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27761 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f70.google.com (mail-pa0-f70.google.com [209.85.220.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 458EA2036E for ; Fri, 4 Apr 2014 06:45:04 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf11047302pab.5 for ; Thu, 03 Apr 2014 23:45:03 -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=ijvOPKgXB++y3Dex7aHcLqXkMjuTdl3TpZC8cHMIMoE=; b=Iir+i0P6FtPfw1iAIhSl2x0Owhqi7/hzVUIQX8mOCPHMChR8YAGmsU1XV+mPbmv698 BzQ6XJDWYSiPggOVXiWASnC64dvvtAzHHdxXsxW7/yJ46/aQWqUcfYKNo1phMXq72pNX 7+2Cipk2Hdx7wIwRbK9TxHH3+FxK6I4Ah935oBq70ANMhgY9Q7TgooMVEf2u0otJCXeJ AvfzEN3b8qX5FdFOq3VjnkDE0TgHB8v+JwfWHv7pv9D0gDYyZgHblUbOS9EXgz+qYHZ8 Ra4Bn/yegIei/zm0KPszg+/zVwxvbrg53CiGS6uOG9wTisuyEPu7uqUWnaMsb8jbCqiN SsKw== X-Gm-Message-State: ALoCoQmMjURx9kDxMnfZqLwmHmZscOYh1Cw8kGCqYHVY5aUm8G2unHyiQyTUQDvHaj//U0ChNpK8 X-Received: by 10.66.216.167 with SMTP id or7mr3755323pac.44.1396593903490; Thu, 03 Apr 2014 23:45:03 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.82.231 with SMTP id h94ls926796qgd.61.gmail; Thu, 03 Apr 2014 23:45:03 -0700 (PDT) X-Received: by 10.52.90.37 with SMTP id bt5mr9857088vdb.7.1396593903384; Thu, 03 Apr 2014 23:45:03 -0700 (PDT) Received: from mail-vc0-f173.google.com (mail-vc0-f173.google.com [209.85.220.173]) by mx.google.com with ESMTPS id sn5si1641708vdc.65.2014.04.03.23.45.03 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:45:03 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.173 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.173; Received: by mail-vc0-f173.google.com with SMTP id il7so2839216vcb.32 for ; Thu, 03 Apr 2014 23:45:03 -0700 (PDT) X-Received: by 10.220.12.66 with SMTP id w2mr6771741vcw.15.1396593903236; Thu, 03 Apr 2014 23:45:03 -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 v8csp89416vcv; Thu, 3 Apr 2014 23:45:02 -0700 (PDT) X-Received: by 10.68.215.68 with SMTP id og4mr12817389pbc.112.1396593901389; Thu, 03 Apr 2014 23:45:01 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id dw1si4205753pbc.3.2014.04.03.23.45.00; Thu, 03 Apr 2014 23:45:00 -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 S1753157AbaDDGox (ORCPT + 27 others); Fri, 4 Apr 2014 02:44:53 -0400 Received: from mail-wi0-f172.google.com ([209.85.212.172]:47890 "EHLO mail-wi0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752931AbaDDGmz (ORCPT ); Fri, 4 Apr 2014 02:42:55 -0400 Received: by mail-wi0-f172.google.com with SMTP id hi2so591441wib.17 for ; Thu, 03 Apr 2014 23:42:54 -0700 (PDT) X-Received: by 10.180.90.140 with SMTP id bw12mr1870586wib.18.1396593774419; Thu, 03 Apr 2014 23:42:54 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id h1sm11029256wjy.7.2014.04.03.23.42.51 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 03 Apr 2014 23:42:53 -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 32/36] hrtimer: make switch_hrtimer_base() return void Date: Fri, 4 Apr 2014 12:06:15 +0530 Message-Id: <7cdbe065e7f05587461b21583ca76b63cee5f16e.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.173 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: , switch_hrtimer_base() always sets timer->base to the right base and so the caller can obtain it easily. So, this routine doesn't need to return anything. Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index fcbabcf..e581bba 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -211,8 +211,7 @@ hrtimer_check_target(struct hrtimer *timer, struct hrtimer_clock_base *new_base) /* * Switch the timer base to the current CPU when possible. */ -static inline struct hrtimer_clock_base * -switch_hrtimer_base(struct hrtimer *timer, int pinned) +static inline void switch_hrtimer_base(struct hrtimer *timer, int pinned) { struct hrtimer_clock_base *new_base, *base = timer->base; struct hrtimer_cpu_base *new_cpu_base; @@ -224,7 +223,7 @@ again: new_base = &new_cpu_base->clock_base[base->index]; if (base == new_base) - return base; + return; /* * We are trying to move timer to new_base. However we can't change @@ -235,7 +234,7 @@ again: * timer is enqueued. */ if (unlikely(hrtimer_callback_running(timer))) - return base; + return; /* See the comment in lock_timer_base() */ timer->base = NULL; @@ -251,7 +250,6 @@ again: } timer->base = new_base; - return new_base; } #else /* CONFIG_SMP */ @@ -266,7 +264,7 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) return base; } -# define switch_hrtimer_base(t, p) (t->base) +static inline void switch_hrtimer_base(struct hrtimer *timer, int pinned) {} #endif /* !CONFIG_SMP */ @@ -949,7 +947,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, unsigned long delta_ns, const enum hrtimer_mode mode, int wakeup) { - struct hrtimer_clock_base *base, *new_base; + struct hrtimer_clock_base *base; unsigned long flags; int ret, leftmost; @@ -975,7 +973,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, hrtimer_set_expires_range_ns(timer, tim, delta_ns); /* Switch the timer base, if necessary: */ - new_base = switch_hrtimer_base(timer, mode & HRTIMER_MODE_PINNED); + switch_hrtimer_base(timer, mode & HRTIMER_MODE_PINNED); timer_stats_hrtimer_set_start_info(timer); @@ -987,7 +985,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, * * XXX send_remote_softirq() ? */ - if (leftmost && base_on_this_cpu(new_base) + if (leftmost && base_on_this_cpu(timer->base) && hrtimer_enqueue_reprogram(timer)) { if (wakeup) { /*