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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8318EB64D7 for ; Wed, 21 Jun 2023 20:53:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229624AbjFUUxX (ORCPT ); Wed, 21 Jun 2023 16:53:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229564AbjFUUxW (ORCPT ); Wed, 21 Jun 2023 16:53:22 -0400 Received: from mail-il1-f178.google.com (mail-il1-f178.google.com [209.85.166.178]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 949FF10F2; Wed, 21 Jun 2023 13:53:21 -0700 (PDT) Received: by mail-il1-f178.google.com with SMTP id e9e14a558f8ab-341c14e495fso30952925ab.0; Wed, 21 Jun 2023 13:53:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687380801; x=1689972801; 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=2T1b/Oa5DrhnOGEKjXXQHTZCgVCz59Fkwvf59NrZRwU=; b=NVNJWxHykTk060VodNnUiFnoKyo0p7x+8tGG7NCP003MPAPf+1amZyi1p6wD8OS6sf aSbQB7/jlCiLUsbeNuzUjAt4NTyV4ivcSUygJ533JAHaaprI2DIb7uRa7Yk/IDRM9jGX EiugaUBHc5LEPvsS4A5ElHF97tMQ9HP4YZha93wjk/X5i4uIHH9tanrfKBRn6R/EICEH KLXtHGwenHyH9YEtucHXoODyE/CfZwgm67QwnDgTM7Mh+LvGVdOtjSUWjqaATTztDAo9 UV3cCPPJQyVAiF/hLsodiaEqW9RLK113VPgzQB0w9GP4mrmCBTxQqsy2ERoZqBOTgtZg mFlw== X-Gm-Message-State: AC+VfDxU/AUz81obURwZZhsKKGHQdfJD2xKjqnC/YPvLbtBB5f5+/B/1 aohTgqYKKTZRTOrj48XPIw== X-Google-Smtp-Source: ACHHUZ5H150mSa88b4xttNu7JSRWw4BPqTiRV+I+rs10PLxMr8Er0uReqJbPmLW+bHZBCSLxxHMGdQ== X-Received: by 2002:a92:4b02:0:b0:33a:adaa:d6d1 with SMTP id m2-20020a924b02000000b0033aadaad6d1mr15210307ilg.15.1687380800779; Wed, 21 Jun 2023 13:53:20 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id r1-20020a92d981000000b0033ce0ef231bsm1578002iln.23.2023.06.21.13.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 13:53:19 -0700 (PDT) Received: (nullmailer pid 3515661 invoked by uid 1000); Wed, 21 Jun 2023 20:53:17 -0000 Date: Wed, 21 Jun 2023 14:53:17 -0600 From: Rob Herring To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Krzysztof Kozlowski , Claudiu Beznea , Thierry Reding , Krzysztof Kozlowski , Conor Dooley , Nicolas Ferre , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Anson Huang , linux-arm-kernel@lists.infradead.org, linux-pwm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] dt-bindings: pwm: drop unneeded quotes Message-ID: <20230621205317.GA3493078-robh@kernel.org> References: <20230609140709.64655-1-krzysztof.kozlowski@linaro.org> <20230612093315.gbabepl5qg44xf5d@pengutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230612093315.gbabepl5qg44xf5d@pengutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-pwm@vger.kernel.org On Mon, Jun 12, 2023 at 11:33:15AM +0200, Uwe Kleine-König 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/build.yml: > > 3:1 warning truthy value should be one of [false, true] (truthy) > > 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. > So at least in my bubble the general > hint is to *always* quote strings. Note that required: true is also the > default for yamllint's quoted-strings setting, proably for pitfalls like > these. We're so far gone the other direction from quoting everything, that's not going to happen. Plus, if I liked everything quoted, I would have used JSON. My preference here is I don't want to care about this in reviews. I want yamllint to check it and not have to think about it again. Rob 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 03283EB64D7 for ; Wed, 21 Jun 2023 20:53:51 +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=GVr6ODyn3Hr0j/4zLwcTsAKd3P9YQkJRvQXEYpr3FjI=; b=cCFxMwacnGGdny gSWJZt0pMUmlD7zHp6EjXMY0UubUZD45RRk2NZE8JN+FlPpBE5eSQn3Sp6s69Z/SZLEBxtM70Lu9F ZU7FhjuduJK/MsDIfw+t8wQ4WYtEJApt2gu0kRegZMx22olU65i6u+hT8l0lJ1SGZ5k3SA53OuSO9 y1KpYbXMSafoSfpKAi7AelerJDs4BxxE7vXUwKog4USLACfG9YGqTExs6vXGMtXXCas523NBw0Nqm /Wa8nZLJsTGxfYQp0SUUpqV168mfXMh7zhaNfrKK039COSg/2INc05dhOpDpuevZNJP1PVIbsK/kK 5EUXiTzlJfZDOKCXrd0Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qC4pT-00Ficc-2R; Wed, 21 Jun 2023 20:53:27 +0000 Received: from mail-il1-f173.google.com ([209.85.166.173]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qC4pQ-00Fiam-1P for linux-arm-kernel@lists.infradead.org; Wed, 21 Jun 2023 20:53:26 +0000 Received: by mail-il1-f173.google.com with SMTP id e9e14a558f8ab-3421fb63796so26734945ab.2 for ; Wed, 21 Jun 2023 13:53:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687380801; x=1689972801; 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=2T1b/Oa5DrhnOGEKjXXQHTZCgVCz59Fkwvf59NrZRwU=; b=Mcyd6eQV1UtiT7zRCaERETizJ8cWfm7NseLv9I40xLwbPPhXlo4GOK4HqcRTqo3UwF OgFpLp18fqvXn8eKcQnPvKRVSCcpZ0tXDwGcc3euRSAmEbUmMDoSNmzgMBOecshD+NdU Hl9NLUqR32XG6dPMlmUZ+mLlnckS9Lrr5VdTMciwBDMPmDnYrFI30goJ9GtTE5jxvyAb 3X9KA3ralhyZzw6igRV206InhYtE9rc7pHPDgpBXCoSIQhh3T4fC1iQco98AG6l1cQbv hS6+N7EzdFkiT44WOldxE+TQb3gGwLcGlyo0LusoIQDWV341UNDdDO5v8HK7x6dKqCaJ seRQ== X-Gm-Message-State: AC+VfDx2ddC0qI2Rv2CoSBEAv1l90Ikz1uKZzkBjg0FYXjRaUQ5mHMpP +jEaGJMJL/GqfIZtCN7RaA== X-Google-Smtp-Source: ACHHUZ5H150mSa88b4xttNu7JSRWw4BPqTiRV+I+rs10PLxMr8Er0uReqJbPmLW+bHZBCSLxxHMGdQ== X-Received: by 2002:a92:4b02:0:b0:33a:adaa:d6d1 with SMTP id m2-20020a924b02000000b0033aadaad6d1mr15210307ilg.15.1687380800779; Wed, 21 Jun 2023 13:53:20 -0700 (PDT) Received: from robh_at_kernel.org ([64.188.179.250]) by smtp.gmail.com with ESMTPSA id r1-20020a92d981000000b0033ce0ef231bsm1578002iln.23.2023.06.21.13.53.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 21 Jun 2023 13:53:19 -0700 (PDT) Received: (nullmailer pid 3515661 invoked by uid 1000); Wed, 21 Jun 2023 20:53:17 -0000 Date: Wed, 21 Jun 2023 14:53:17 -0600 From: Rob Herring To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Subject: Re: [PATCH] dt-bindings: pwm: drop unneeded quotes Message-ID: <20230621205317.GA3493078-robh@kernel.org> References: <20230609140709.64655-1-krzysztof.kozlowski@linaro.org> <20230612093315.gbabepl5qg44xf5d@pengutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230612093315.gbabepl5qg44xf5d@pengutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230621_135324_478522_75F6F0A0 X-CRM114-Status: GOOD ( 25.06 ) 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 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/build= .yml: > = > 3:1 warning truthy value should be one of [false, true] (truth= y) > = > 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. > So at least in my bubble the general > hint is to *always* quote strings. Note that required: true is also the > default for yamllint's quoted-strings setting, proably for pitfalls like > these. We're so far gone the other direction from quoting everything, that's = not going to happen. Plus, if I liked everything quoted, I would have = used JSON. My preference here is I don't want to care about this in reviews. I want = yamllint to check it and not have to think about it again. Rob _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel