From patchwork Mon Apr 14 16:23:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28336 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 1F7F220534 for ; Mon, 14 Apr 2014 16:25:36 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rp16sf32159545pbb.5 for ; Mon, 14 Apr 2014 09:25:35 -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=YeSGcA3vaqPpncV1xQd+qXJ+vIKZHlQT61+s46pwNjo=; b=mUqhgDcmGMiPiB4Mh+MXukbpBlxHS/r+HrQrBUsz75P+2Tlmkzg6jSojh6iz2Ahvk6 3ufHJC7AQ4DXeI3FQuLGq5uhuEorQ9Gy2IC8fL1KyQhNU3Da45oIcJuCWlVJgT+8l8pX ZTbNP++Lm7i/w1HfktNRA1+ZToZSIUMaOm+rMr+LItpfLoVuG5Ze29+CRaAb+h0Nu2QY gOkH8Cvq/dImhZmHtDGE4cIlrfL/NoYwHsYQIUfgPWuUVR07x5u9jUT1yjDX1G+DDNWd Lh7h7ZUV1eyHauIqzzq1W6XDatQnnDh5eCLFGpCgex4xWgOySu400c8IGzcQBVMD3IvK y9nw== X-Gm-Message-State: ALoCoQkwusILTd0OZCJHLERpZ09yzTfST/9dVKXFq9Zu+L/lY+QXWoMvdx8VlxMGFJEbskiBRriW X-Received: by 10.66.188.238 with SMTP id gd14mr5010328pac.18.1397492735395; Mon, 14 Apr 2014 09:25:35 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.132 with SMTP id k4ls2754065qge.42.gmail; Mon, 14 Apr 2014 09:25:35 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr31429630vdc.21.1397492735227; Mon, 14 Apr 2014 09:25:35 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id wd2si2830421veb.113.2014.04.14.09.25.35 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:35 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 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.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so7602634vcb.7 for ; Mon, 14 Apr 2014 09:25:35 -0700 (PDT) X-Received: by 10.52.65.132 with SMTP id x4mr1018243vds.36.1397492735153; Mon, 14 Apr 2014 09:25:35 -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 ib8csp162757vcb; Mon, 14 Apr 2014 09:25:34 -0700 (PDT) X-Received: by 10.66.148.134 with SMTP id ts6mr4597995pab.113.1397492734342; Mon, 14 Apr 2014 09:25:34 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id rb6si9150400pab.149.2014.04.14.09.25.33; Mon, 14 Apr 2014 09:25:33 -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 S1755421AbaDNQZO (ORCPT + 26 others); Mon, 14 Apr 2014 12:25:14 -0400 Received: from mail-pa0-f46.google.com ([209.85.220.46]:40657 "EHLO mail-pa0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755404AbaDNQZI (ORCPT ); Mon, 14 Apr 2014 12:25:08 -0400 Received: by mail-pa0-f46.google.com with SMTP id kx10so8404719pab.19 for ; Mon, 14 Apr 2014 09:25:07 -0700 (PDT) X-Received: by 10.66.189.106 with SMTP id gh10mr22740238pac.31.1397492707546; Mon, 14 Apr 2014 09:25:07 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id tf10sm34686063pbc.70.2014.04.14.09.25.03 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:05 -0700 (PDT) From: Viresh Kumar To: tglx@linutronix.de Cc: linaro-kernel@lists.linaro.org, linux-kernel@vger.kernel.org, fweisbec@gmail.com, Arvind.Chauhan@arm.com, linaro-networking@linaro.org, Viresh Kumar Subject: [PATCH 09/38] tick-oneshot: remove tick_resume_oneshot() Date: Mon, 14 Apr 2014 21:53:31 +0530 Message-Id: <8c1eaf95a4c8bead45bbf7154edc40062db9c14c.1397492345.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.176 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 the same implementation and tick_setup_oneshot() can be used easily instead of tick_resume_oneshot(). So, 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 298467e..949f3d3 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -363,15 +363,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 cb158f7..82fc3f5 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,