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 X-Spam-Level: X-Spam-Status: No, score=-7.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2C7B2C433E4 for ; Wed, 12 Aug 2020 23:05:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08B2F20675 for ; Wed, 12 Aug 2020 23:05:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597273531; bh=6kwxpshrOlbOHxWnmXC6+dWtt2L5X/Drj58h8rpdMCA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:List-ID:From; b=AMILF4e2tINs+IRhBYKhmgOW4LEgb0rh5iITbByG1PC+gyihnCkqYgGKV59SSgp0/ 4XoTiwn/r/4YceM9MTUC2Du1DAtY8v6jivph5Xa0LHqTMkWCANATSioWrUzu4FdAsO eVstA1gQbUAI761ZdxbF9V/msW3BL3I4XwuPmQ64= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726600AbgHLXFX (ORCPT ); Wed, 12 Aug 2020 19:05:23 -0400 Received: from mail.kernel.org ([198.145.29.99]:56976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726533AbgHLXFV (ORCPT ); Wed, 12 Aug 2020 19:05:21 -0400 Received: from mail-oi1-f170.google.com (mail-oi1-f170.google.com [209.85.167.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 9B05822BF3; Wed, 12 Aug 2020 23:05:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597273520; bh=6kwxpshrOlbOHxWnmXC6+dWtt2L5X/Drj58h8rpdMCA=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pXDZRt76CPWxVlpilBeAf66pO/Ch1+UOaSOgdUpIGMcw2xAS2mFHBEgkKJVucyrd/ hFrdQmO7EEU0DOv8a5XHHMAntvFEpH8ijK+mCysryubzOS2R2XGypW54K9swm6SsIs b7zU39V5JMU64Uhe2oipgDLWWHGgSe5VXnIpigps= Received: by mail-oi1-f170.google.com with SMTP id u63so3384377oie.5; Wed, 12 Aug 2020 16:05:20 -0700 (PDT) X-Gm-Message-State: AOAM531IZBzkm9SW7u4Ll0dz2BzE1TEIB7GJrdP7SZFkd9Fl6578K6/D TZuN3gv5Y+jYhGEA04MJz9gQHCjYIc3va2d6mQ== X-Google-Smtp-Source: ABdhPJx2qQebZiNBPQzgE1fpdypeYG9ycnPVX3JxYluiX5nbkNkxeZlpxpCsMAonDMWnL7JIOVI286FePABwvHucHl8= X-Received: by 2002:aca:bb82:: with SMTP id l124mr1235268oif.106.1597273520003; Wed, 12 Aug 2020 16:05:20 -0700 (PDT) MIME-Version: 1.0 References: <20200812203618.2656699-1-robh@kernel.org> In-Reply-To: From: Rob Herring Date: Wed, 12 Aug 2020 17:05:08 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] dt-bindings: Whitespace clean-ups in schema files To: Joe Perches Cc: devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , linux-clk , dri-devel , linux-spi , "open list:GPIO SUBSYSTEM" , "open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM" , Linux HWMON List , Linux I2C , Linux Fbdev development list , "open list:IIO SUBSYSTEM AND DRIVERS" , Linux Input , "open list:THERMAL" , Linux Media Mailing List , Linux-ALSA , linux-mmc , MTD Maling List , netdev , "open list:REAL TIME CLOCK (RTC) SUBSYSTEM" , "open list:SERIAL DRIVERS" , Linux USB List Content-Type: text/plain; charset="UTF-8" Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On Wed, Aug 12, 2020 at 4:32 PM Joe Perches wrote: > > On Wed, 2020-08-12 at 14:36 -0600, Rob Herring wrote: > > Clean-up incorrect indentation, extra spaces, long lines, and missing > > EOF newline in schema files. Most of the clean-ups are for list > > indentation which should always be 2 spaces more than the preceding > ^ > > keyword. keyword is the key part... > [] > > diff --git a/Documentation/devicetree/bindings/arm/arm,integrator.yaml b/Documentation/devicetree/bindings/arm/arm,integrator.yaml > > index 192ded470e32..f0daf990e077 100644 > > --- a/Documentation/devicetree/bindings/arm/arm,integrator.yaml > > +++ b/Documentation/devicetree/bindings/arm/arm,integrator.yaml > > @@ -67,9 +67,9 @@ patternProperties: > > compatible: > > items: > > - enum: > > - - arm,integrator-ap-syscon > > - - arm,integrator-cp-syscon > > - - arm,integrator-sp-syscon > > + - arm,integrator-ap-syscon > > + - arm,integrator-cp-syscon > > + - arm,integrator-sp-syscon > > Confused a bit here. > - enum: > 10 spaces to dash > old line: > - arm,integrator-ap-syscon > 12 spaces to dash > new line: > - arm,integrator-ap-syscon > 14 spaces to dash > > Is it supposed to be 2 spaces more than the preceding line > or 4 more? If the preceding line is a list entry (i.e. starts with '-'), then it's 4 more spaces. It's always 2 more spaces than the preceding keyword start (aka json-schema vocabulary). Arguably, this style is a bit inconsistent in that the '-' counts toward as indentation of the current line, but not the preceding line. However, I think this style is a bit less error prone and easier to review. With the other style (always N more spaces) it's harder to distinguish lists vs. dicts. For example, you can have something like this: - key: - foo - bar - key: foo bar - key: - foo bar All 3 of these could be valid. Which one was intended? (Can't really tell here, but you can with actual DT schema.) Rob