From patchwork Fri Mar 28 11:41:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 27263 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f70.google.com (mail-qa0-f70.google.com [209.85.216.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1353120062 for ; Fri, 28 Mar 2014 11:42:46 +0000 (UTC) Received: by mail-qa0-f70.google.com with SMTP id hw13sf9473175qab.1 for ; Fri, 28 Mar 2014 04:42:46 -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=Uj4agsp3YII29JKcqf+8ZmB95mnQt1n9KidGmNTMzgQ=; b=bichVw8XkWxvRwzIdTqCl6w/FpegXkqxGc3ulq0xRR78DsbnI52atfls+2wZAbGnD1 jSbp426wT+anz992CpFetTDiWrpQ/vC6EnDgCqJOjwxXv8xeze6HA/0acOm7M8eEOj2f os391+unHiZS2PZfKWqBGQe6fY44xUgc0eydjGfp1FFrZKbw5kf4/Ih5lEd8kirslrks K+1uU3mDNq9cvR2q/XInC3EiGvm8UMk+Vv7PkqPm40Uzg5n9/XfzNpSArRbBXeui0ajl /9UMjD0NKbCXyJJtvhmJngXUYmRDapmnkAbYVCTPrv/DlJH9v2rQNu+FAZFJ+V42jW8p 6wWg== X-Gm-Message-State: ALoCoQlQDM0bJ0hgYRdcFDb1v2WTsrbBwbV+nzkX2nKS5+fFNStPa/wPTQ56dMMelemuRQguKxz0 X-Received: by 10.58.46.204 with SMTP id x12mr1795874vem.19.1396006966895; Fri, 28 Mar 2014 04:42:46 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.20.22 with SMTP id 22ls1470363qgi.63.gmail; Fri, 28 Mar 2014 04:42:46 -0700 (PDT) X-Received: by 10.220.163.3 with SMTP id y3mr6792216vcx.7.1396006966834; Fri, 28 Mar 2014 04:42:46 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id iy9si1145505vec.33.2014.03.28.04.42.46 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:42:46 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.175 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.175; Received: by mail-vc0-f175.google.com with SMTP id lh14so5697400vcb.34 for ; Fri, 28 Mar 2014 04:42:46 -0700 (PDT) X-Received: by 10.52.18.70 with SMTP id u6mr5749460vdd.11.1396006966753; Fri, 28 Mar 2014 04:42:46 -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 v8csp1556vcv; Fri, 28 Mar 2014 04:42:46 -0700 (PDT) X-Received: by 10.68.184.66 with SMTP id es2mr8057342pbc.19.1396006966019; Fri, 28 Mar 2014 04:42:46 -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.44; Fri, 28 Mar 2014 04:42:44 -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 S1752129AbaC1Lmf (ORCPT + 27 others); Fri, 28 Mar 2014 07:42:35 -0400 Received: from mail-wg0-f47.google.com ([74.125.82.47]:62186 "EHLO mail-wg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbaC1Lmc (ORCPT ); Fri, 28 Mar 2014 07:42:32 -0400 Received: by mail-wg0-f47.google.com with SMTP id x12so3416486wgg.6 for ; Fri, 28 Mar 2014 04:42:31 -0700 (PDT) X-Received: by 10.180.189.169 with SMTP id gj9mr47226142wic.17.1396006951672; Fri, 28 Mar 2014 04:42:31 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id qg3sm6413706wic.10.2014.03.28.04.42.27 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 28 Mar 2014 04:42:30 -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 06/16] hrtimer: remove 'base' parameter from enqueue_hrtimer() Date: Fri, 28 Mar 2014 17:11:25 +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.175 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 enqueue_hrtimer() 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 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/kernel/hrtimer.c b/kernel/hrtimer.c index 9561336..d6724b5 100644 --- a/kernel/hrtimer.c +++ b/kernel/hrtimer.c @@ -855,9 +855,10 @@ EXPORT_SYMBOL_GPL(hrtimer_forward); * * Returns 1 when the new timer is the leftmost timer in the tree. */ -static int enqueue_hrtimer(struct hrtimer *timer, - struct hrtimer_clock_base *base) +static int enqueue_hrtimer(struct hrtimer *timer) { + struct hrtimer_clock_base *base = timer->base; + debug_activate(timer); timerqueue_add(&base->active, &timer->node); @@ -974,7 +975,7 @@ int __hrtimer_start_range_ns(struct hrtimer *timer, ktime_t tim, timer_stats_hrtimer_set_start_info(timer); - leftmost = enqueue_hrtimer(timer, new_base); + leftmost = enqueue_hrtimer(timer); /* * Only allow reprogramming if the new base is on this CPU. @@ -1207,8 +1208,7 @@ EXPORT_SYMBOL_GPL(hrtimer_get_res); static void __run_hrtimer(struct hrtimer *timer, ktime_t *now) { - struct hrtimer_clock_base *base = timer->base; - struct hrtimer_cpu_base *cpu_base = base->cpu_base; + struct hrtimer_cpu_base *cpu_base = timer->base->cpu_base; enum hrtimer_restart (*fn)(struct hrtimer *); int restart; @@ -1237,7 +1237,7 @@ static void __run_hrtimer(struct hrtimer *timer, ktime_t *now) */ if (restart != HRTIMER_NORESTART) { BUG_ON(timer->state != HRTIMER_STATE_CALLBACK); - enqueue_hrtimer(timer, base); + enqueue_hrtimer(timer); } WARN_ON_ONCE(!(timer->state & HRTIMER_STATE_CALLBACK)); @@ -1670,7 +1670,7 @@ static void migrate_hrtimer_list(struct hrtimer_clock_base *old_base, * sort out already expired timers and reprogram the * event device. */ - enqueue_hrtimer(timer, new_base); + enqueue_hrtimer(timer); /* Clear the migration state bit */ timer->state &= ~HRTIMER_STATE_MIGRATE;