From patchwork Tue Mar 31 10:12:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Lezcano X-Patchwork-Id: 46579 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 19123215A7 for ; Tue, 31 Mar 2015 10:13:10 +0000 (UTC) Received: by wixm2 with SMTP id m2sf3245665wix.0 for ; Tue, 31 Mar 2015 03:13:09 -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=DESN946qD9tBgD8f7vmgGODSXtud3DnKYqAg/h92RAo=; b=QpKaD/oFp8yAWDtC5k+ayyH9MiHCDGSIhqF0VX5WrcqTDjS6Pb30frDTychjc6aRaY fskradAwfx243aRCLNxb4fK+3bOhyHJqVcFJlHn3dOkf5AorLffNvNia0UBvu7XKivDo ZYmNzwon6TbF/SKFy/HLORWRQ3jMW+oUIpiUruFy/mCJQh2tbYo1zOTIKJaakS/C2szr wL1IG4nhC/fIpJzyxMuJTYArE7+CUdhLL8/tjOial+v1kieMCHrb2izrPyK22qjJ4L5+ lw+aa4VMZYMp6Mc8LaCvsVSL0aDYPYugUOIeRfyAvJ+iUWQkjtP1uY4tRczWLWAa7r1Y 8SIA== X-Gm-Message-State: ALoCoQkT7l2ENCv2QziJGKOULIz2v4Op5fpwlMgLnanZSMh6SQVrBID4TBMRjiBCGTMfpOq4+qPE X-Received: by 10.180.80.132 with SMTP id r4mr515475wix.4.1427796789314; Tue, 31 Mar 2015 03:13:09 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.168 with SMTP id a8ls611510lab.14.gmail; Tue, 31 Mar 2015 03:13:09 -0700 (PDT) X-Received: by 10.152.171.5 with SMTP id aq5mr7598022lac.91.1427796789086; Tue, 31 Mar 2015 03:13:09 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id f7si8937977lbs.25.2015.03.31.03.13.09 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 Mar 2015 03:13:09 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lahf3 with SMTP id f3so8435677lah.2 for ; Tue, 31 Mar 2015 03:13:09 -0700 (PDT) X-Received: by 10.152.178.197 with SMTP id da5mr31112119lac.56.1427796788798; Tue, 31 Mar 2015 03:13:08 -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 k9csp1709851lbq; Tue, 31 Mar 2015 03:13:07 -0700 (PDT) X-Received: by 10.67.7.135 with SMTP id dc7mr67831106pad.140.1427796786763; Tue, 31 Mar 2015 03:13:06 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q3si18804030pdr.138.2015.03.31.03.13.05; Tue, 31 Mar 2015 03:13:06 -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 S1753599AbbCaKNB (ORCPT + 27 others); Tue, 31 Mar 2015 06:13:01 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:36186 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751315AbbCaKM7 (ORCPT ); Tue, 31 Mar 2015 06:12:59 -0400 Received: by wgra20 with SMTP id a20so13415262wgr.3 for ; Tue, 31 Mar 2015 03:12:58 -0700 (PDT) X-Received: by 10.194.223.5 with SMTP id qq5mr74185172wjc.152.1427796778492; Tue, 31 Mar 2015 03:12:58 -0700 (PDT) Received: from mai.lan (135-224-190-109.dsl.ovh.fr. [109.190.224.135]) by mx.google.com with ESMTPSA id ea11sm8304337wic.24.2015.03.31.03.12.56 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 31 Mar 2015 03:12:57 -0700 (PDT) From: Daniel Lezcano To: tglx@linutronix.de, mingo@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Laurent Pinchart , Sudeep Holla Subject: [PATCH 1/5] clocksource/drivers/arm_arch_timer: Rename arch_timer_probed to reflect behaviour Date: Tue, 31 Mar 2015 12:12:22 +0200 Message-Id: <1427796746-373-1-git-send-email-daniel.lezcano@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <551A72B6.7030106@linaro.org> References: <551A72B6.7030106@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.215.45 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_needs_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..26acfb5 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_needs_probe(int type, const struct of_device_id *matches) { struct device_node *dn; - bool probed = true; + bool needs_probe = false; dn = of_find_matching_node(NULL, matches); if (dn && of_device_is_available(dn) && !(arch_timers_present & type)) - probed = false; + needs_probe = true; of_node_put(dn); - return probed; + return needs_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_needs_probe(ARCH_MEM_TIMER, + arch_timer_mem_of_match)) return; - if (!arch_timer_probed(ARCH_CP15_TIMER, arch_timer_of_match)) + if (arch_timer_needs_probe(ARCH_CP15_TIMER, arch_timer_of_match)) return; }