Received: by 2002:a25:c205:0:0:0:0:0 with SMTP id s5csp859042ybf; Thu, 27 Feb 2020 00:49:00 -0800 (PST) X-Google-Smtp-Source: APXvYqxksnsDLymxxPPxxm9Uri5umtLsByQDKMS79+4jMbrjPXm/S6FFUpKe83lRG/I53w3FsFjZ X-Received: by 2002:a9d:3b84:: with SMTP id k4mr2470327otc.18.1582793340028; Thu, 27 Feb 2020 00:49:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582793340; cv=none; d=google.com; s=arc-20160816; b=SDz4L0jlj24chRScOlrZToGtraBB++g8MU9gedI0HvUZmvMtuWjrQFRXXg7bRCId6G 0aUPyU4eLM+oGtMqtKlX3+J4DWUV+kaws9Fd6EGsf5/ioI3vNoFXQkU+qhpvitgGJXTc APvo2Rlz5e45F+Qs8mnO4aH5EB95FWc3yoc6S7omIyJGjh28trx/AWNoMKaYHpTL1hr1 fFrvCxyV6HFLbmIb9qg3cf7JRSTWUTywCfBo64hHqCjeIFm1qPbP03T4LMz2ZDBI1lea wwMdwPM1RmXJPHASXjiERWP30hS6qwESqqyD31keq0uDeeUQAfISJNTHz+YLNT5QVzBb B6Kg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=kH1F5Uz6H2g7ZLzspVVavbRl4uGR+TNLcW2uazpB8Xs=; b=CYVfcHPQMY2pW0FABaB33djuSzMtIbHh5gn0i+CkKZKxtFBKifxYTG8S/P+IHpCqz+ CB7HQjQ0ze/9BuPRLEUAtjYO3xodj6mDPx61UCcuSt+Z8wBNwNTkwsSeDp2saPgd6Giz QwmDh3i7EcBs3vkMtz7HqoLotH6OX5st/PJGsXqlne1RZn/r3FxCOcGn3AEC/LX2Q0JQ vbIt91zCLhHxjnQS2+yPg52KL0WILyTbORas9uOQmSUdVMxYMzUnt6dDOZgaMg/Dg3UX PpTi1EnHuqg3jiKAjwvTSZEgZFHvxlRwqYO0PjjEnCB14SFOqMQd/9t54MZZX8N9rpLQ RPcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w13si1078806oti.291.2020.02.27.00.48.48; Thu, 27 Feb 2020 00:49:00 -0800 (PST) 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; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728860AbgB0Ir3 (ORCPT + 99 others); Thu, 27 Feb 2020 03:47:29 -0500 Received: from hostingweb31-40.netsons.net ([89.40.174.40]:48967 "EHLO hostingweb31-40.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728856AbgB0Ir3 (ORCPT ); Thu, 27 Feb 2020 03:47:29 -0500 Received: from [109.168.11.45] (port=43056 helo=[192.168.101.73]) by hostingweb31.netsons.net with esmtpsa (TLSv1.2:ECDHE-RSA-AES128-GCM-SHA256:128) (Exim 4.92) (envelope-from ) id 1j7EGN-009anX-4W; Thu, 27 Feb 2020 09:11:20 +0100 Subject: Re: [PATCH v2] of: overlay: log the error cause on resolver failure To: Frank Rowand , devicetree@vger.kernel.org, Geert Uytterhoeven Cc: Pantelis Antoniou , Rob Herring , linux-kernel@vger.kernel.org, Geert Uytterhoeven References: <20200225164540.4520-1-luca@lucaceresoli.net> From: Luca Ceresoli Message-ID: <40fdf0f2-85a4-9f84-6994-a59b7b56cec4@lucaceresoli.net> Date: Thu, 27 Feb 2020 09:11:13 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - hostingweb31.netsons.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - lucaceresoli.net X-Get-Message-Sender-Via: hostingweb31.netsons.net: authenticated_id: luca+lucaceresoli.net/only user confirmed/virtual account not confirmed X-Authenticated-Sender: hostingweb31.netsons.net: luca@lucaceresoli.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Frank, On 26/02/20 04:53, Frank Rowand wrote: > On 2/25/20 10:45 AM, Luca Ceresoli wrote: >> For some of its error paths, of_resolve_phandles() only logs a very generic >> error which does not help much in finding the origin of the problem: >> >> OF: resolver: overlay phandle fixup failed: -22 >> >> Add error messages for all the error paths that don't have one. Now a >> specific message is always emitted, thus also remove the generic catch-all >> message emitted before returning. >> >> For example, in case a DT overlay has a fixup node that is not present in >> the base DT __symbols__, this error is now logged: >> >> OF: resolver: node gpio9 not found in base DT, fixup failed >> >> Signed-off-by: Luca Ceresoli >> Cc: Geert Uytterhoeven >> --- >> >> I don't know in detail the meaning of the adjust_local_phandle_references() >> and update_usages_of_a_phandle_reference() error paths, thus I have put >> pretty generic messages. Any suggestion on better wording would be welcome. > > If you have not read the code to understand what the meaning of > the errors are, you should not be suggesting changes to the error > messages. > > Only one of the issues detected as errors can possibly be something > other than an error either in the resolver.c code or the dtc > compiler -- a missing symbol in the live devicetree. This may > be because of failing to compile the base devicetree without > symbols, depending on a symbol from another overlay where the > other overlay has not been applied, or depending on a symbol > from another overlay where the other overlay is applied but > the overlay was not compiled with symbols. (Not meant to be > an exhaustive list, but it might be.) Thus the missing > symbol problem might be fixable without a fix to kernel > code. The error message philosophy for overlay related > errors is to minimize error messages that help diagnose > the precise cause of a kernel code bug, with the intent > of keeping the code more compact and readable. When a > bug occurs, debugging messages can be added for the > debug session. Got it, sorry about that. > Following this philosophy, only the message in the second > patch chunk is ok. Then I think you can apply the v1 patch which only contains the message about the problem I experienced, and which was caused by an incorrect DTO: https://patchwork.ozlabs.org/patch/1243987/ Just ignore the note saying the patch is not for mainline, it's wrong. -- Luca