From patchwork Wed Nov 20 08:58:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 21647 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f198.google.com (mail-ob0-f198.google.com [209.85.214.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5FF62202E6 for ; Wed, 20 Nov 2013 08:59:05 +0000 (UTC) Received: by mail-ob0-f198.google.com with SMTP id vb8sf13390004obc.5 for ; Wed, 20 Nov 2013 00:59:04 -0800 (PST) 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:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=w2C2+O14+fl1xtsqymkMlGhB8+M3uPXytVDTSygHCrc=; b=c5Ic6WbtMKmia3JZZaAolnaUZG0vfj/+OkIbb25MLm7X5AS6iHlxdsv/1N7Mjr0n8c 8Kg1pXyzY3p9CwTpAwoAMlBsDaFI7lRs7P0L9mxR3mXYioWXm3I9ZjexBa1bCDPISb4n jII2iMlXieUEdwLVOFhe4NXPvGiDsRKVJAs0mhC3mg21FUAT9NKV5ihWzHfUJAHmVwxO j1saR+z+oJ0eG7Xr3JrbLbcKDpqdfpf+5IsbabvFwT0fiBt+KJgKqqekf/tF4BpkWFXw Y/ICHq0xN1hRzaUfqmsk7nqcbuEwzFiNQNXlEmHuDGvv6ySdbbXnaPT2PO/bp4Jp4I5a zaRg== X-Gm-Message-State: ALoCoQmhW+DAimF2tr5Cc8/30SV7CqzqIcKZkFg0EpJFnE//7aonmv+51P2hovKu7nQnaXQ5HeYz X-Received: by 10.182.230.168 with SMTP id sz8mr11268741obc.9.1384937944259; Wed, 20 Nov 2013 00:59:04 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.116.42 with SMTP id jt10ls2529865qeb.66.gmail; Wed, 20 Nov 2013 00:59:04 -0800 (PST) X-Received: by 10.58.23.33 with SMTP id j1mr240686vef.27.1384937944144; Wed, 20 Nov 2013 00:59:04 -0800 (PST) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx.google.com with ESMTPS id il5si9198274vdb.10.2013.11.20.00.59.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Nov 2013 00:59:04 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.182 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.182; Received: by mail-vc0-f182.google.com with SMTP id lc6so59692vcb.27 for ; Wed, 20 Nov 2013 00:59:04 -0800 (PST) X-Received: by 10.52.37.69 with SMTP id w5mr198469vdj.32.1384937943970; Wed, 20 Nov 2013 00:59:03 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp338907vcz; Wed, 20 Nov 2013 00:59:03 -0800 (PST) X-Received: by 10.180.219.75 with SMTP id pm11mr24485639wic.21.1384937942804; Wed, 20 Nov 2013 00:59:02 -0800 (PST) Received: from mail-wg0-f41.google.com (mail-wg0-f41.google.com [74.125.82.41]) by mx.google.com with ESMTPS id jf15si4472025wic.60.2013.11.20.00.59.02 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 20 Nov 2013 00:59:02 -0800 (PST) Received-SPF: neutral (google.com: 74.125.82.41 is neither permitted nor denied by best guess record for domain of linus.walleij@linaro.org) client-ip=74.125.82.41; Received: by mail-wg0-f41.google.com with SMTP id n12so6844110wgh.0 for ; Wed, 20 Nov 2013 00:59:02 -0800 (PST) X-Received: by 10.194.20.202 with SMTP id p10mr5680475wje.39.1384937942178; Wed, 20 Nov 2013 00:59:02 -0800 (PST) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id bs15sm14064573wib.10.2013.11.20.00.59.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2013 00:59:01 -0800 (PST) From: Linus Walleij To: linux-kernel@vger.kernel.org, Daniel Lezcano , Thomas Gleixner Cc: Linus Walleij Subject: [PATCH] clksrc-of: warn if no clock sources are found Date: Wed, 20 Nov 2013 09:58:56 +0100 Message-Id: <1384937936-14267-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.8.3.1 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.182 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 Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Many platforms rely on clocksource_of_init() being implicitly called for registering clock sources and will get zero warnings if no working clock source is available. Let's print a critical error message if no clock source is found. Acked-by: Lee Jones Signed-off-by: Linus Walleij --- drivers/clocksource/clksrc-of.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/clocksource/clksrc-of.c b/drivers/clocksource/clksrc-of.c index 35639cf4e5a2..a30b42c3ac3b 100644 --- a/drivers/clocksource/clksrc-of.c +++ b/drivers/clocksource/clksrc-of.c @@ -28,6 +28,7 @@ void __init clocksource_of_init(void) struct device_node *np; const struct of_device_id *match; clocksource_of_init_fn init_func; + unsigned clocksources = 0; for_each_matching_node_and_match(np, __clksrc_of_table, &match) { if (!of_device_is_available(np)) @@ -36,5 +37,8 @@ void __init clocksource_of_init(void) init_func = match->data; init_func(np); of_node_put(np); + clocksources++; } + if (!clocksources) + pr_crit("%s: no matching clocksources found\n", __func__); }