From patchwork Mon Apr 21 09:55:05 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28686 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 A4AD02032B for ; Mon, 21 Apr 2014 10:00:56 +0000 (UTC) Received: by mail-pa0-f70.google.com with SMTP id lj1sf18574563pab.9 for ; Mon, 21 Apr 2014 03:00:55 -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=jh5qeU0QVsaIEwNE6cXZ1+gWXPOimiAM11p7v54Zyk4=; b=dha34lNfHZpC+BzpmmWNbRqJjqX+vc62kwcSVePlDuYYi3nD2abPCu7YMI4UaNDNHs IWviChd0ZRFEyithpfWTqUfRwVsPWyIhWO3OlsiPXJYKRcBknJU81q1qX4bt9GczBZs8 4Nc8qvsPBpqlXOlX3CKNNapNFjq8igwDFnhiPVeePscqpyO/+hfRjeJszdUL535+XBru HY/b1rg+wM5EJ5VBChg3gSj51hUM4NmEvpOWPyiw4R03ebJz4RnpMw9voZHSkM+P0gEO 1SEBywVv19HPrcEw1hHkVmJ1parPqACnl978X0v4Ni9/JcJ3JyUd7LoWyjK34pncCn2k p8eQ== X-Gm-Message-State: ALoCoQkJFtzuAzk0gdos3g9RXEWjz1Dh8duwhOVtWPcTxLrsg0xybd/ujWlLDwLzZ9dLKofqlcCQ X-Received: by 10.66.66.35 with SMTP id c3mr18242830pat.7.1398074455741; Mon, 21 Apr 2014 03:00:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.102.87 with SMTP id v81ls2300037qge.0.gmail; Mon, 21 Apr 2014 03:00:55 -0700 (PDT) X-Received: by 10.220.133.197 with SMTP id g5mr2565119vct.20.1398074455563; Mon, 21 Apr 2014 03:00:55 -0700 (PDT) Received: from mail-ve0-f177.google.com (mail-ve0-f177.google.com [209.85.128.177]) by mx.google.com with ESMTPS id dl6si6171220veb.181.2014.04.21.03.00.55 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Apr 2014 03:00:55 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.177 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.177; Received: by mail-ve0-f177.google.com with SMTP id sa20so7416168veb.22 for ; Mon, 21 Apr 2014 03:00:55 -0700 (PDT) X-Received: by 10.220.147.16 with SMTP id j16mr30362283vcv.14.1398074455501; Mon, 21 Apr 2014 03:00:55 -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.221.72 with SMTP id ib8csp280448vcb; Mon, 21 Apr 2014 03:00:53 -0700 (PDT) X-Received: by 10.69.26.103 with SMTP id ix7mr36921892pbd.41.1398074453306; Mon, 21 Apr 2014 03:00:53 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ai4si15996583pbd.297.2014.04.21.03.00.52; Mon, 21 Apr 2014 03:00:52 -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 S1752308AbaDUKAp (ORCPT + 26 others); Mon, 21 Apr 2014 06:00:45 -0400 Received: from mail-wg0-f46.google.com ([74.125.82.46]:64573 "EHLO mail-wg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750902AbaDUJ4R (ORCPT ); Mon, 21 Apr 2014 05:56:17 -0400 Received: by mail-wg0-f46.google.com with SMTP id b13so2519958wgh.29 for ; Mon, 21 Apr 2014 02:56:16 -0700 (PDT) X-Received: by 10.180.7.198 with SMTP id l6mr13429598wia.52.1398074176335; Mon, 21 Apr 2014 02:56:16 -0700 (PDT) Received: from localhost ([213.122.173.131]) by mx.google.com with ESMTPSA id gc2sm15231639wic.3.2014.04.21.02.56.12 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 21 Apr 2014 02:56:15 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linaro-networking@linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Viresh Kumar Subject: [PATCH V2 09/19] tick-oneshot: remove tick_resume_oneshot() Date: Mon, 21 Apr 2014 15:25:05 +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.177 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: , tick_resume_oneshot() and tick_setup_oneshot() have almost same implementation. So, we can remove tick_resume_oneshot() and use tick_setup_oneshot() in its place. Signed-off-by: Viresh Kumar --- kernel/time/tick-common.c | 8 +++++--- kernel/time/tick-internal.h | 5 ----- kernel/time/tick-oneshot.c | 11 ----------- 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 64897d3..965e9c3 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -359,15 +359,17 @@ void tick_suspend(void) void tick_resume(void) { struct tick_device *td = tick_get_cpu_device(); + struct clock_event_device *dev = td->evtdev; int broadcast = tick_resume_broadcast(); - clockevents_set_mode(td->evtdev, CLOCK_EVT_MODE_RESUME); + clockevents_set_mode(dev, CLOCK_EVT_MODE_RESUME); if (!broadcast) { if (td->mode == TICKDEV_MODE_PERIODIC) - tick_setup_periodic(td->evtdev, 0); + tick_setup_periodic(dev, 0); else - tick_resume_oneshot(); + tick_setup_oneshot(dev, dev->event_handler, + ktime_get()); } } diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h index 09f4307..65f080a 100644 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h @@ -43,7 +43,6 @@ extern int tick_program_event(ktime_t expires, int force); extern void tick_oneshot_notify(void); extern int tick_switch_to_oneshot(void (*handler)(struct clock_event_device *)); extern int tick_is_oneshot_available(void); -extern void tick_resume_oneshot(void); # ifdef CONFIG_GENERIC_CLOCKEVENTS_BROADCAST extern void tick_broadcast_setup_oneshot(struct clock_event_device *bc); extern int tick_broadcast_oneshot_control(unsigned long reason); @@ -74,10 +73,6 @@ void tick_setup_oneshot(struct clock_event_device *newdev, { BUG(); } -static inline void tick_resume_oneshot(void) -{ - BUG(); -} static inline int tick_program_event(ktime_t expires, int force) { return 0; diff --git a/kernel/time/tick-oneshot.c b/kernel/time/tick-oneshot.c index aaf60a9..a07fc3d 100644 --- a/kernel/time/tick-oneshot.c +++ b/kernel/time/tick-oneshot.c @@ -32,17 +32,6 @@ int tick_program_event(ktime_t expires, int force) } /** - * tick_resume_onshot - resume oneshot mode - */ -void tick_resume_oneshot(void) -{ - struct clock_event_device *dev = tick_get_cpu_device()->evtdev; - - clockevents_set_mode(dev, CLOCK_EVT_MODE_ONESHOT); - clockevents_program_event(dev, ktime_get(), true); -} - -/** * tick_setup_oneshot - setup the event device for oneshot mode (hres or nohz) */ void tick_setup_oneshot(struct clock_event_device *newdev,