Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp887047pxb; Wed, 27 Oct 2021 14:29:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwL3mOTkM5r1FWpZvD5pGSLy+ld5j6kxl7gQX0gBBC6uSsTYY3wsuxzIduBHlBN3/fqklNQ X-Received: by 2002:a17:906:a1c1:: with SMTP id bx1mr55112ejb.447.1635370178881; Wed, 27 Oct 2021 14:29:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635370178; cv=none; d=google.com; s=arc-20160816; b=CHEdKsVwhEiuRoHwjhg2XPTJiRElKXXZ8rLs6qfRRwFCIfXuk1ttaIKW8sr8ojEqWj zJPud7sfd061T8JD2RDHC62VAUjFuZzA2En1dLsBnged4MTavx7hCVy1gRoQih+xx5Zd ZkxXBbTnrxxcAGtjezQ+2yRXglDKjNshkRu4Gk21dmF31AeteJ2UlZjYx2ptgdczqmu8 4vKgrazVS49cUC6Z8bYyp/4lHAUuANjcPO2Ri2j3QszcCZ87xIhqlSdNfHGm3heNDPTO 7ovSGw1HugSoIkVN9Xjpw6USRMhCFoO9slD/QklX/mlhQsoVmD71tDhRPRaqT7m0ku2D HupQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=wsSl871GnzTRM5pGu8gY+ZdIYpWf6GmzlPBPyqz6SKA=; b=AJU9Cw9KitRyGrEB9Tw+/dvmoywLI0dBIIs+PE8nFCar30jWZtPfZh0i5lQGVNb1uo 4V0ZI1B4x1d1XC4t9DIbZo7Dqkp2DjaruJFohOBbSFx9X60zPGsnx1JIlLwf1e9d2jGo GTbkfUgPFNugEzBrwa84x5RCvI+dY1kfLXZdfVRdsS1KNZs/gjVwCKfcCc6O5zNVo54K 13epm/dkNVp89h/15uZZHRFx4337fmd0cFgsEuQ5yK4TyrkgItM10A90L+5NZWy3+fAN fn5MZASAzwDXV23dorvDIjX+HGy2+VrTmofGWyZTRrtIxqD8TyOGbg/wCSfdKQ46lN7y /RYw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id hd20si1428270ejc.747.2021.10.27.14.29.15; Wed, 27 Oct 2021 14:29:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238282AbhJ0OWo (ORCPT + 97 others); Wed, 27 Oct 2021 10:22:44 -0400 Received: from hostingweb31-40.netsons.net ([89.40.174.40]:57522 "EHLO hostingweb31-40.netsons.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237845AbhJ0OWm (ORCPT ); Wed, 27 Oct 2021 10:22:42 -0400 Received: from [79.2.93.196] (port=40362 helo=[192.168.101.73]) by hostingweb31.netsons.net with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1mfjmo-000I0q-R9; Wed, 27 Oct 2021 16:20:14 +0200 Subject: Re: [PATCH] dt-bindings: Add a help message when dtschema tools are missing To: Rob Herring Cc: devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Masahiro Yamada References: <20211026171804.2867369-1-robh@kernel.org> <8c6d5a97-14f7-9155-6f90-17e6e33d77c2@lucaceresoli.net> From: Luca Ceresoli Message-ID: <32f9ef1d-912a-e77f-de98-ee071077e166@lucaceresoli.net> Date: Wed, 27 Oct 2021 16:20:14 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 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: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 27/10/21 15:53, Rob Herring wrote: > On Wed, Oct 27, 2021 at 2:30 AM Luca Ceresoli wrote: >> >> Hi Rob, >> >> thanks for this patch! >> >> On 26/10/21 19:18, Rob Herring wrote: >>> The dtschema version check works, but is not that clear when dtschema is >>> neither installed nor in the PATH. Add a separate check and message if >> >> Nit: I think it should say "either not installed or not in the PATH". > > Right. > >> >>> dt-doc-validate is not found. >>> >>> Cc: Luca Ceresoli >>> Cc: Masahiro Yamada >>> Signed-off-by: Rob Herring >>> --- >>> Documentation/devicetree/bindings/Makefile | 4 ++++ >>> 1 file changed, 4 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/Makefile b/Documentation/devicetree/bindings/Makefile >>> index 8d6d912c6a6a..001b4f62b741 100644 >>> --- a/Documentation/devicetree/bindings/Makefile >>> +++ b/Documentation/devicetree/bindings/Makefile >>> @@ -9,6 +9,10 @@ DT_SCHEMA_MIN_VERSION = 2021.2.1 >>> >>> PHONY += check_dtschema_version >>> check_dtschema_version: >>> + @which $(DT_DOC_CHECKER) >/dev/null || \ >>> + { echo "Error: '$(DT_DOC_CHECKER)' not found!" \ >>> + "\nEnsure dtschema python package is installed and in your PATH." \ >>> + "\nCurrent PATH is:\n$$PATH\n" >&2; false; } >> >> You need 'echo -e' for the '\n'. > > Except dash will just print '-e' and interpret the newlines... Oh dear, I always forget about dash... > I changed it like this: > > @which $(DT_DOC_CHECKER) >/dev/null || \ > { echo "Error: '$(DT_DOC_CHECKER)' not found!" >&2; \ > echo "Ensure dtschema python package is installed and in your PATH." >&2; \ > echo "Current PATH is:" >&2; \ > echo "$$PATH" >&2; false; } Either that or 'printf', which IIRC is more portable, including with \n. But in this simple case I find multiple 'echo's more readable than one printf with '\n's. -- Luca