From patchwork Fri Mar 28 11:41:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27262 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f197.google.com (mail-ie0-f197.google.com [209.85.223.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 114A020062 for ; Fri, 28 Mar 2014 11:42:45 +0000 (UTC) Received: by mail-ie0-f197.google.com with SMTP id rd18sf17276047iec.0 for ; Fri, 28 Mar 2014 04:42:45 -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=eJCABoQTvJxD3J2co0TWZ+utR4aO/tQoJFf/MXIixaY=; b=Uelg1z2Tae9orkNrqIwiSp+bRIE9gwDOBWTAPF1vJpk/7W67EDlxSJV1YPFX5NLnpa fojW7A7m9y0E2h/llZ1YT26qF4v4fcwtFXYNU2APubkA1uBkiykqjslO5DhMJl7ffoPZ tRulj+se89qpBcOtan0J/t5yPhH4sUKA+jnqAnM9vf1rM9HDPP7Xq/YYiUsZQpW78ZTI s08sI42Aaud9u515y1GesoW/nPNIHiMkVucKUQVxeByzFhPptY3yoJVzF2OH+MRHKq09 cRoLlfkM6tjU3tdEGD1eaAjePaw0tf9RbD5z7H2YlJCmFvgBy8Cmx+djZdlbl3Lprud+ 47xg== X-Gm-Message-State: ALoCoQkvFpUsFyDj7JcYRUQvSHw4Xuhoi9qBbD5VZE8LoSS05b2x3tSR1SJ4pSrzzvV7axraAfc0 X-Received: by 10.182.28.36 with SMTP id y4mr2988384obg.46.1396006965521; Fri, 28 Mar 2014 04:42:45 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.43.134 with SMTP id e6ls1378941qga.17.gmail; Fri, 28 Mar 2014 04:42:45 -0700 (PDT) X-Received: by 10.58.96.36 with SMTP id dp4mr1263354veb.21.1396006965432; Fri, 28 Mar 2014 04:42:45 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id sc7si1199155vdc.13.2014.03.28.04.42.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:42:45 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 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.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so5719271veb.27 for ; Fri, 28 Mar 2014 04:42:45 -0700 (PDT) X-Received: by 10.52.51.197 with SMTP id m5mr5680521vdo.9.1396006965347; Fri, 28 Mar 2014 04:42:45 -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 v8csp1553vcv; Fri, 28 Mar 2014 04:42:44 -0700 (PDT) X-Received: by 10.69.31.171 with SMTP id kn11mr8069353pbd.47.1396006964519; Fri, 28 Mar 2014 04:42:44 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id og9si3504616pbb.413.2014.03.28.04.42.43; Fri, 28 Mar 2014 04:42:43 -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 S1752099AbaC1Lm3 (ORCPT + 27 others); Fri, 28 Mar 2014 07:42:29 -0400 Received: from mail-wi0-f177.google.com ([209.85.212.177]:65271 "EHLO mail-wi0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751370AbaC1LmZ (ORCPT ); Fri, 28 Mar 2014 07:42:25 -0400 Received: by mail-wi0-f177.google.com with SMTP id cc10so650495wib.4 for ; Fri, 28 Mar 2014 04:42:24 -0700 (PDT) X-Received: by 10.180.85.234 with SMTP id k10mr46480023wiz.32.1396006944489; Fri, 28 Mar 2014 04:42:24 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id em1sm6464105wid.5.2014.03.28.04.42.20 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:42:23 -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 05/16] hrtimer: remove 'base' parameter from switch_hrtimer_base() Date: Fri, 28 Mar 2014 17:11:24 +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.182 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: , clock 'base' can be obtained easily by doing timer->base and switch_hrtimer_base() never gets anything else than timer->base as its parameter. And so this routines doesn't require this parameter. Remove it. Signed-off-by: Viresh Kumar --- kernel/hrtimer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 343fe99..9561336 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -195,10 +195,9 @@ 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, struct hrtimer_clock_base *base, - int pinned) +switch_hrtimer_base(struct hrtimer *timer, int pinned) { - struct hrtimer_clock_base *new_base; + struct hrtimer_clock_base *new_base, *base = timer->base; struct hrtimer_cpu_base *new_cpu_base; int this_cpu = smp_processor_id(); int cpu = get_nohz_timer_target(pinned); @@ -249,7 +248,7 @@ lock_hrtimer_base(const struct hrtimer *timer, unsigned long *flags) return base; } -# define switch_hrtimer_base(t, b, p) (b) +# define switch_hrtimer_base(t, p) (t->base) #endif /* !CONFIG_SMP */ @@ -955,7 +954,7 @@ 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, base, mode & HRTIMER_MODE_PINNED); + new_base = switch_hrtimer_base(timer, mode & HRTIMER_MODE_PINNED); if (mode & HRTIMER_MODE_REL) { tim = ktime_add_safe(tim, new_base->get_time());