From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932308AbbHCRWz (ORCPT ); Mon, 3 Aug 2015 13:22:55 -0400 Received: from mail-wi0-f171.google.com ([209.85.212.171]:35947 "EHLO mail-wi0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932174AbbHCRWw (ORCPT ); Mon, 3 Aug 2015 13:22:52 -0400 Message-ID: <55BFA368.30609@linaro.org> Date: Mon, 03 Aug 2015 19:22:48 +0200 From: Daniel Lezcano User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Sudeep Holla , "linux-kernel@vger.kernel.org" CC: Rob Herring , Thomas Gleixner Subject: Re: [PATCH] clocksource/OF: remove invalid DT warnings when booting using ACPI References: <1437672666-4121-1-git-send-email-sudeep.holla@arm.com> <55BF9AC4.40208@linaro.org> <55BF9D46.1040605@arm.com> In-Reply-To: <55BF9D46.1040605@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/03/2015 06:56 PM, Sudeep Holla wrote: > > > On 03/08/15 17:45, Daniel Lezcano wrote: >> On 07/23/2015 07:31 PM, Sudeep Holla wrote: >>> Since both CONFIG_ACPI and CONFIG_CLKSRC_OF can be enabled on ARM64, >>> we get this device tree warnings even when booting using ACPI which is >>> not valid. We can use of_have_populated_dt to check if the device tree >>> is populated or not and avoid spurious warning. >>> >>> This patch uses of_have_populated_dt to remove this non legitimate >>> device >>> tree warning when booting using ACPI tables. >>> >>> Signed-off-by: Sudeep Holla >>> Cc: Rob Herring >>> Cc: Daniel Lezcano >>> Cc: Thomas Gleixner >>> --- >>> drivers/clocksource/clksrc-of.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/clocksource/clksrc-of.c >>> b/drivers/clocksource/clksrc-of.c >>> index 0093a8e49e14..47823a2d7220 100644 >>> --- a/drivers/clocksource/clksrc-of.c >>> +++ b/drivers/clocksource/clksrc-of.c >>> @@ -38,6 +38,6 @@ void __init clocksource_of_init(void) >>> init_func(np); >>> clocksources++; >>> } >>> - if (!clocksources) >>> + if (of_have_populated_dt() && !clocksources) >>> pr_crit("%s: no matching clocksources found\n", __func__); >>> } >> >> Hmm, even if the fix looks correct, it doesn't make sense to put it >> there. >> > > I thought of exactly the same at first. IMO, we are not fixing it at the > source but at the call site instead which is fine and I don't have > strong opinion on that. However I also came to know recently that > CONFIG_OF can be now enabled on x86, so I preferred that. I prefer to not call clocksource_of_init if the DT is not populated. -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog