From patchwork Mon Mar 30 20:17:03 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 46542 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BE3A7218BE for ; Mon, 30 Mar 2015 20:17:42 +0000 (UTC) Received: by lbcgc5 with SMTP id gc5sf2710641lbc.1 for ; Mon, 30 Mar 2015 13:17:41 -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:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=qwWr6NAgmo0RFVcUiYq+2KOgo/Cld/Xc9fGVeBJmMXk=; b=QDYnpdbTzKq44L7rlfJmmsztcTNjUM36xIs9tNE5JV3aC+ZHfBMxWgHd4oPtO4ddMK gbLQ/FesswZOhcXz4vZWK6WnmA1uUBEw7L+1BjakBPop2WdFw4HVgwEguHSbwpIhzNnS AVuf0a6Wn/ycQCfbybuagHNEpXlYzIk8NKktDpKgff1lcK19agIsrj2FUItKhMN1VMcA XDpe6BfAj7Qf/1hpCkHnLwPHt5FKC56Owl85xZFtlEW2FLvibZ4HNf9H8q8a/bQzb4WD 3v9gGvywdw88mgX2Y41bZs7Z1fLu9caRJnR5HiUhH0BXl4pdtuSohY+k8ApZkS9sMJ30 wicw== X-Gm-Message-State: ALoCoQma7dXpL9Hbf5/MTIh251TYP2G5Yzn0ofQBHjk4IWGiMvVLG3+LZ2T8WTxr/U2xWZ5am6fk X-Received: by 10.112.167.131 with SMTP id zo3mr7721749lbb.7.1427746661527; Mon, 30 Mar 2015 13:17:41 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.42.178 with SMTP id p18ls514018lal.68.gmail; Mon, 30 Mar 2015 13:17:41 -0700 (PDT) X-Received: by 10.112.67.107 with SMTP id m11mr27871887lbt.43.1427746661174; Mon, 30 Mar 2015 13:17:41 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id k4si2071170lbz.55.2015.03.30.13.17.40 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Mar 2015 13:17:40 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbbug6 with SMTP id ug6so103363571lbb.3 for ; Mon, 30 Mar 2015 13:17:40 -0700 (PDT) X-Received: by 10.152.26.34 with SMTP id i2mr6800894lag.117.1427746660639; Mon, 30 Mar 2015 13:17:40 -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.112.57.201 with SMTP id k9csp1367978lbq; Mon, 30 Mar 2015 13:17:39 -0700 (PDT) X-Received: by 10.68.176.3 with SMTP id ce3mr61354398pbc.122.1427746658695; Mon, 30 Mar 2015 13:17:38 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cz8si16204940pdb.85.2015.03.30.13.17.37; Mon, 30 Mar 2015 13:17:38 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754515AbbC3URX (ORCPT + 27 others); Mon, 30 Mar 2015 16:17:23 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:38201 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754491AbbC3URS (ORCPT ); Mon, 30 Mar 2015 16:17:18 -0400 Received: by wibgn9 with SMTP id gn9so860498wib.1 for ; Mon, 30 Mar 2015 13:17:17 -0700 (PDT) X-Received: by 10.194.108.137 with SMTP id hk9mr64834616wjb.112.1427746637300; Mon, 30 Mar 2015 13:17:17 -0700 (PDT) Received: from mai.lan (135-224-190-109.dsl.ovh.fr. [109.190.224.135]) by mx.google.com with ESMTPSA id ha10sm17205957wjc.37.2015.03.30.13.17.15 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 30 Mar 2015 13:17:16 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, maxime.ripard@free-electrons.com, viresh.kumar@linaro.org, ben.dooks@codethink.co.uk, digetx@gmail.com, hdegoede@redhat.com, laurent.pinchart+renesas@ideasonboard.com Subject: [PATCH 01/11] clocksource: arm_arch_timer: Rename arch_timer_probed to reflect behaviour Date: Mon, 30 Mar 2015 22:17:03 +0200 Message-Id: <1427746633-9137-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <5519AEB2.8050306@linaro.org> References: <5519AEB2.8050306@linaro.org> 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: daniel.lezcano@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) 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: , From: Laurent Pinchart The arch_timer_probed function returns whether the given time doesn't need to be probed. This can be the case when the timer has been probed already, but also when it has no corresponding enabled node in DT. Rename the function to arch_timer_need_probe and invert its return value to better reflect the function's purpose and behaviour. Acked-by: Sudeep Holla Signed-off-by: Laurent Pinchart Signed-off-by: Daniel Lezcano --- drivers/clocksource/arm_arch_timer.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c index a3025e7..50bb7f2 100644 --- a/drivers/clocksource/arm_arch_timer.c +++ b/drivers/clocksource/arm_arch_timer.c @@ -661,17 +661,17 @@ static const struct of_device_id arch_timer_mem_of_match[] __initconst = { }; static bool __init -arch_timer_probed(int type, const struct of_device_id *matches) +arch_timer_need_probe(int type, const struct of_device_id *matches) { struct device_node *dn; - bool probed = true; + bool need_probe = false; dn = of_find_matching_node(NULL, matches); if (dn && of_device_is_available(dn) && !(arch_timers_present & type)) - probed = false; + need_probe = true; of_node_put(dn); - return probed; + return need_probe; } static void __init arch_timer_common_init(void) @@ -680,9 +680,10 @@ static void __init arch_timer_common_init(void) /* Wait until both nodes are probed if we have two timers */ if ((arch_timers_present & mask) != mask) { - if (!arch_timer_probed(ARCH_MEM_TIMER, arch_timer_mem_of_match)) + if (arch_timer_need_probe(ARCH_MEM_TIMER, + arch_timer_mem_of_match)) return; - if (!arch_timer_probed(ARCH_CP15_TIMER, arch_timer_of_match)) + if (arch_timer_need_probe(ARCH_CP15_TIMER, arch_timer_of_match)) return; }