From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 86007EB64DC for ; Wed, 21 Jun 2023 21:59:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8dbz4kDaJbBeqZvR/QbWiknVy698YYQGV8lPmw2p0jE=; b=VXDPsHDRPatXE8 sKJSQuLavQbtYz/Po0dwnSepqOhfycu9Kd+VedUb5FZBdkfEwmpyEIXGSlyQJoyUJlcJaJh1URU9N rVKF6dXFlYAhDUdzB7uIMr7aa8rE5ozH3nmn1idKa8Omz+UFnbekrPoAyO6+MCP+I1eJmAX8ZyjFI 8aJWzlYep/+0qOvNiKrRK3a2Ry4+em0YXW8clI2RgR7FC6N9cIDljVr66DEftsV0L6eb1rKQL3rnd eU7Rt7uEJgafOyDDsppqdiUALm0gPEyNTdUGWqQObyj2G/10d25/BM1nSsXBdwnvOWhyfG51/FPyp NWAQ4LDM1z9iXDQhv1fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qC5qU-00Fqkz-37; Wed, 21 Jun 2023 21:58:34 +0000 Received: from mail-io1-f51.google.com ([209.85.166.51]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qC5qR-00FqkF-2R for linux-arm-kernel@lists.infradead.org; Wed, 21 Jun 2023 21:58:33 +0000 Received: by mail-io1-f51.google.com with SMTP id ca18e2360f4ac-77a62a84855so246541039f.1 for ; Wed, 21 Jun 2023 14:58:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687384709; x=1689976709; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=4h3svhbv7w/46gguZ6sS+epoOSJySQs0s/cQe2gdmzk=; b=ULBrnOmO5d+GrcemxrDThjvaqgidODLKiLdVOalU1CWAIM8SBCY3Brdo8KVT6MrYF0 N+yoGsGDOwax/qOOJ74fv/ugJVQ5ZnpMfmfVx9gtifx8OiaXziR23SoD00z56FYMaraR UyMDsMVZku1tlUQETqMzVouFqt+43M+ssuCCCfialp1IvTPykMbZ+iwqHnLrCvBObNw+ T65SjpkljKFP4ZP+IlCB3UNi4bMzsNRPRo5tYbEM7djU7qN7EkL+WA4wXWoWuR1Vrx5N FLOSVJOEYvD08puIopeCmr/t0Ld/Rt14VlpwA+pUK9WcyOps7t3joaPezGRGhCsUIlyp jHmQ== X-Gm-Message-State: AC+VfDyr3/MjeE0Cuo5QOacakTusWEcEqSeTF7PLjKTfUuDVgiHYAMmp fAfZPIBje+BPwQmv7UTzcw== X-Google-Smtp-Source: ACHHUZ5+48Fo0SEsH+h5+n6acLLXkTwrIXm++OtwqQjj7KfADfIN5Novp3bamaoEEaBTIxcwcbUeWA== X-Received: by 2002:a05:6e02:806:b0:343:9a7e:9f1a with SMTP id u6-20020a056e02080600b003439a7e9f1amr6811814ilm.1.1687384709256; Wed, 21 Jun 2023 14:58:29 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id f16-20020a92cb50000000b00341e5cde68dsm1597781ilq.78.2023.06.21.14.58.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 14:58:28 -0700 (PDT) Received: (nullmailer pid 3614634 invoked by uid 1000); Wed, 21 Jun 2023 21:58:26 -0000 Date: Wed, 21 Jun 2023 15:58:26 -0600 From: Rob Herring To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH] dt-bindings: pwm: drop unneeded quotes Message-ID: <20230621215826.GA3555109-robh@kernel.org> References: <20230609140709.64655-1-krzysztof.kozlowski@linaro.org> <20230612093315.gbabepl5qg44xf5d@pengutronix.de> <20230621205317.GA3493078-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230621205317.GA3493078-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230621_145831_820351_A04CE569 X-CRM114-Status: GOOD ( 27.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pwm@vger.kernel.org, Conor Dooley , Pengutronix Kernel Team , Alexandre Belloni , Anson Huang , devicetree@vger.kernel.org, Fabio Estevam , Sascha Hauer , linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Thierry Reding , NXP Linux Team , Krzysztof Kozlowski , Shawn Guo , Claudiu Beznea , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, Jun 21, 2023 at 02:53:17PM -0600, Rob Herring wrote: > On Mon, Jun 12, 2023 at 11:33:15AM +0200, Uwe Kleine-K=F6nig wrote: > > Hello, > > = > > On Fri, Jun 09, 2023 at 04:07:09PM +0200, Krzysztof Kozlowski wrote: > > > Cleanup bindings dropping unneeded quotes. Once all these are fixed, > > > checking for this can be enabled in yamllint. > > = > > in my book quoting everything instead of dropping quotes is the better > > option. While that policy adds more quotes, it prevents surprises like: > > = > > $ yaml2json << EOF > > > countrycodes: > > > - de > > > - fr > > > - no > > > - pl > > > EOF > > { > > "countrycodes": [ > > "de", > > "fr", > > false, > > "pl" > > ] > > } > > = > > And if you use the "only-when-needed" rule of yamllint you have to write > > the above list as: > > = > > countrycodes: > > - de > > - fr > > - "no" > > - pl > > = > > which is IMHO really ugly. > = > Agreed, but "no" and "yes" are unlikely values in DT. > = > > = > > Another culprit is "on" (which is used e.g. in github action workflows), > > so yamllint tells for example for > > https://github.com/pengutronix/microcom/blob/main/.github/workflows/bui= ld.yml: > > = > > 3:1 warning truthy value should be one of [false, true] (tru= thy) > > = > > and there are still more surprises (e.g. version numbers might be > > subject to conversion to float). > = > I'll add a meta-schema check for this. 'const' is already limited to = > string or integer. That's missing from 'enum'. I think we can also check = > that all items are the same type as well. And of course, like every meta-schema addition, we find new errors in = schemas: /home/rob/proj/linux-dt/Documentation/devicetree/bindings/phy/brcm,brcmstb-= usb-phy.yaml: allOf:0:if:properties:compatible:contains:enum: 'oneOf' condi= tional failed, one must be fixed: {'const': 'brcm,bcm4908-usb-phy'} is not of type 'integer' {'const': 'brcm,bcm4908-usb-phy'} is not of type 'string' {'const': 'brcm,brcmstb-usb-phy'} is not of type 'integer' {'const': 'brcm,brcmstb-usb-phy'} is not of type 'string' hint: "enum" must be an array with the same type for all items from schema $id: http://devicetree.org/meta-schemas/core.yaml# /home/rob/proj/linux-dt/Documentation/devicetree/bindings/sound/microchip,s= ama7g5-pdmc.yaml: properties:microchip,mic-pos:items: 'oneOf' conditional f= ailed, one must be fixed: {'items': [{'description': 'value for DS line'}, {'description': 'v= alue for sampling edge'}], 'anyOf': [{'enum': [[0, 0], [0, 1], [1, 0], [1, = 1]]}]} is not of type 'array' /home/rob/proj/linux-dt/Documentation/devicetree/bindings/sound/mic= rochip,sama7g5-pdmc.yaml: properties:microchip,mic-pos:items:anyOf:0:enum: = 'oneOf' conditional failed, one must be fixed: [0, 0] is not of type 'integer' [0, 0] is not of type 'string' [0, 1] is not of type 'integer' [0, 1] is not of type 'string' [1, 0] is not of type 'integer' [1, 0] is not of type 'string' [1, 1] is not of type 'integer' [1, 1] is not of type 'string' hint: "enum" must be an array with the same type for all it= ems from schema $id: http://devicetree.org/meta-schemas/core.ya= ml# from schema $id: http://devicetree.org/meta-schemas/core.yaml# /home/rob/proj/linux-dt/Documentation/devicetree/bindings/net/altr,tse.yaml= : allOf:1:if:properties:compatible:contains:enum: 'oneOf' conditional faile= d, one must be fixed: {'const': 'altr,tse-1.0'} is not of type 'integer' {'const': 'altr,tse-1.0'} is not of type 'string' {'const': 'ALTR,tse-1.0'} is not of type 'integer' {'const': 'ALTR,tse-1.0'} is not of type 'string' hint: "enum" must be an array with the same type for all items from schema $id: http://devicetree.org/meta-schemas/core.yaml# _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel