From patchwork Fri Mar 28 11:41:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27265 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C6F4420062 for ; Fri, 28 Mar 2014 11:43:13 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id hl1sf1878659igb.8 for ; Fri, 28 Mar 2014 04:43:13 -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=gwqkzURpbDRpMHETRWWE02hrVpe0Eyu8N16kIKS8oBk=; b=kEPRoWxaf1WYFTblgQV0Ueo7UWB/JM/M6uT01PHaDtj5ut4St8YASi9q+g97Y3EETk KWYAk2+wii3GSG3lYVGR4K37m3lY1OvVoOkFSLJujPY0XwTBc9ovbHFItMW7jiMyUvOO vWGH5t9RT9jG9qUUGygn9msdWWi/Ll3MxKa8/bzw0laWWmrtgHJO772FZ+og8q9BmuOh OCgNYKufCRGse7Bl/ehthxzjy8cXtrgwR3monyw6c868Ken8ymVCwf0mZSllUC2TjjPS zNAcflAfHXz9sJt1CcA6tZ6dd4qQxAPZqxB8FOCMS6mOmC8kTeaGOqclZns/PfbfejWx HbSA== X-Gm-Message-State: ALoCoQmp7aW16PYQE/a5PetxWK7dNFojLzBkGjYZiR2GPHCwfItde3s7RF4ZYntFuBrG+cUfuH3+ X-Received: by 10.182.126.137 with SMTP id my9mr3058391obb.13.1396006993145; Fri, 28 Mar 2014 04:43:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.241 with SMTP id u104ls1468231qga.81.gmail; Fri, 28 Mar 2014 04:43:13 -0700 (PDT) X-Received: by 10.58.37.232 with SMTP id b8mr128163vek.27.1396006993048; Fri, 28 Mar 2014 04:43:13 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id sy7si1199799vdc.28.2014.03.28.04.43.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:43:13 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.181 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.181; Received: by mail-vc0-f181.google.com with SMTP id id10so5843504vcb.12 for ; Fri, 28 Mar 2014 04:43:13 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr5751812vdb.18.1396006992977; Fri, 28 Mar 2014 04:43:12 -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 v8csp1579vcv; Fri, 28 Mar 2014 04:43:12 -0700 (PDT) X-Received: by 10.68.163.3 with SMTP id ye3mr8153845pbb.78.1396006992214; Fri, 28 Mar 2014 04:43:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tk9si3522806pac.170.2014.03.28.04.43.11; Fri, 28 Mar 2014 04:43:11 -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 S1752195AbaC1Lmu (ORCPT + 27 others); Fri, 28 Mar 2014 07:42:50 -0400 Received: from mail-wg0-f41.google.com ([74.125.82.41]:59572 "EHLO mail-wg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbaC1Lmr (ORCPT ); Fri, 28 Mar 2014 07:42:47 -0400 Received: by mail-wg0-f41.google.com with SMTP id n12so3400750wgh.0 for ; Fri, 28 Mar 2014 04:42:46 -0700 (PDT) X-Received: by 10.180.11.239 with SMTP id t15mr20236042wib.51.1396006966190; Fri, 28 Mar 2014 04:42:46 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id fs16sm6424559wic.18.2014.03.28.04.42.41 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:42:45 -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 08/16] hrtimer: make switch_hrtimer_base() return void Date: Fri, 28 Mar 2014 17:11:27 +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.220.181 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 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 98a73d9..d98c1ec 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -194,8 +194,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; @@ -217,7 +216,7 @@ again: * the timer is enqueued. */ if (unlikely(hrtimer_callback_running(timer))) - return base; + return; /* See the comment in lock_timer_base() */ timer->base = NULL; @@ -233,7 +232,6 @@ again: } timer->base = new_base; } - return new_base; } #else /* CONFIG_SMP */ @@ -248,7 +246,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 */ @@ -952,7 +950,8 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, ret = remove_hrtimer(timer); /* Switch the timer base, if necessary: */ - new_base = switch_hrtimer_base(timer, mode & HRTIMER_MODE_PINNED); + switch_hrtimer_base(timer, mode & HRTIMER_MODE_PINNED); + new_base = timer->base; if (mode & HRTIMER_MODE_REL) { tim = ktime_add_safe(tim, new_base->get_time());