From patchwork Mon Apr 14 16:23:37 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 28363 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 F26532036A for ; Mon, 14 Apr 2014 16:54:39 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id hn18sf12884626igb.4 for ; Mon, 14 Apr 2014 09:54:39 -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=P7flSFyOhbzF/LOQrU4kQUu7pQjArC+s+3sQmolTvKg=; b=SDWDGw6F9gRQQFv55/EQ/t6fgKM+koSAMF8S5yaqrfA5g/b3QkQ9s+AIYzBv02CPD2 Krsc/Olw13OJRpM9965YgDEhrS1iCfV9tPuNyZm6FieMn9v09dNDnsTdDrVvLFd1/hap WScKahB6MnGVSG7CoRls5l/0P/gRppCs3xsoBR1FmBOFRMRcIh/6cnjwAxyZ4tNdGe1s dINdmyYT2r8oPWHRaibx5eveRf5Q8FgRkvxp4StoTFiLrQ2EDPbr7zUz5JJqPkgAt3Lu 3rqD0S7AsdJnV85KzCTZhk0HjTnzjFb7J4tfdYEcaDakkpWZ4C6I8kclCsmvJrVBFkof oTSQ== X-Gm-Message-State: ALoCoQk/RWWcZroRPcTlP16/tl5MgjTJ3rhTYclfSvnbL59fIdFQX1Kmi2/VtAOF4Tht/21L5A8h X-Received: by 10.42.39.210 with SMTP id i18mr10287570ice.19.1397494479399; Mon, 14 Apr 2014 09:54:39 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.137 with SMTP id u9ls2642395qga.81.gmail; Mon, 14 Apr 2014 09:54:39 -0700 (PDT) X-Received: by 10.58.1.5 with SMTP id 5mr38736255vei.8.1397494479310; Mon, 14 Apr 2014 09:54:39 -0700 (PDT) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx.google.com with ESMTPS id o2si2851387vew.115.2014.04.14.09.54.39 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:54:39 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.180 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.180; Received: by mail-ve0-f180.google.com with SMTP id jz11so7950816veb.11 for ; Mon, 14 Apr 2014 09:54:39 -0700 (PDT) X-Received: by 10.220.103.141 with SMTP id k13mr2759282vco.25.1397494479224; Mon, 14 Apr 2014 09:54:39 -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 ib8csp164906vcb; Mon, 14 Apr 2014 09:54:38 -0700 (PDT) X-Received: by 10.68.103.165 with SMTP id fx5mr4705098pbb.118.1397494478037; Mon, 14 Apr 2014 09:54:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ua2si9186458pab.36.2014.04.14.09.54.33; Mon, 14 Apr 2014 09:54: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 S1756150AbaDNQyT (ORCPT + 26 others); Mon, 14 Apr 2014 12:54:19 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:41359 "EHLO mail-pa0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754189AbaDNQZo (ORCPT ); Mon, 14 Apr 2014 12:25:44 -0400 Received: by mail-pa0-f54.google.com with SMTP id lf10so8385132pab.41 for ; Mon, 14 Apr 2014 09:25:44 -0700 (PDT) X-Received: by 10.66.252.135 with SMTP id zs7mr45058107pac.13.1397492743866; Mon, 14 Apr 2014 09:25:43 -0700 (PDT) Received: from localhost ([122.167.126.16]) by mx.google.com with ESMTPSA id vg1sm34717303pbc.44.2014.04.14.09.25.40 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 14 Apr 2014 09:25:43 -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 15/38] tick-common: remove tick_check_replacement() Date: Mon, 14 Apr 2014 21:53:37 +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.180 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_check_replacement() is now nothing more than a wrapper over tick_check_preferred() and hence can be removed. Use tick_check_preferred() everywhere. Signed-off-by: Viresh Kumar --- kernel/time/clockevents.c | 2 +- kernel/time/tick-common.c | 16 +++++----------- kernel/time/tick-internal.h | 2 +- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/kernel/time/clockevents.c b/kernel/time/clockevents.c index 6680a0d..d80e891 100644 --- a/kernel/time/clockevents.c +++ b/kernel/time/clockevents.c @@ -298,7 +298,7 @@ static int clockevents_replace(struct clock_event_device *ced) if (dev == ced || dev->mode != CLOCK_EVT_MODE_UNUSED) continue; - if (!tick_check_replacement(newdev, dev)) + if (!tick_check_preferred(newdev, dev)) continue; if (!try_module_get(dev->owner)) diff --git a/kernel/time/tick-common.c b/kernel/time/tick-common.c index 3bd9f9c..c1b3619 100644 --- a/kernel/time/tick-common.c +++ b/kernel/time/tick-common.c @@ -230,7 +230,11 @@ static bool tick_check_percpu(struct clock_event_device *curdev, return true; } -static bool tick_check_preferred(struct clock_event_device *curdev, +/* + * Check whether the new device is a better fit than curdev. curdev + * can be NULL ! + */ +bool tick_check_preferred(struct clock_event_device *curdev, struct clock_event_device *newdev) { if (!tick_check_percpu(curdev, newdev, smp_processor_id())) @@ -263,16 +267,6 @@ static bool tick_check_preferred(struct clock_event_device *curdev, } /* - * Check whether the new device is a better fit than curdev. curdev - * can be NULL ! - */ -bool tick_check_replacement(struct clock_event_device *curdev, - struct clock_event_device *newdev) -{ - return tick_check_preferred(curdev, newdev); -} - -/* * Check, if the new registered device should be used. Called with * clockevents_lock held and interrupts disabled. */ diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h index 65f080a..8c6e85d 100644 --- a/kernel/time/tick-internal.h +++ b/kernel/time/tick-internal.h @@ -24,7 +24,7 @@ extern void tick_handover_do_timer(int *cpup); extern void tick_shutdown(unsigned int *cpup); extern void tick_suspend(void); extern void tick_resume(void); -extern bool tick_check_replacement(struct clock_event_device *curdev, +extern bool tick_check_preferred(struct clock_event_device *curdev, struct clock_event_device *newdev); extern void tick_install_replacement(struct clock_event_device *dev);