Re: [PATCH 1/2] dt-bindings: Clean-up schema indentation formatting
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Subject: Re: [PATCH 1/2] dt-bindings: Clean-up schema indentation formatting
- From: Sam Ravnborg <sam@xxxxxxxxxxxx>
- Date: Thu, 16 Apr 2020 14:43:59 +0200
- Cc: devicetree@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, Krzysztof Kozlowski <krzk@xxxxxxxxxx>, Maxime Ripard <mripard@xxxxxxxxxx>, Stephen Boyd <sboyd@xxxxxxxxxx>, Alexandre Torgue <alexandre.torgue@xxxxxx>, Thierry Reding <thierry.reding@xxxxxxxxx>, Vinod Koul <vkoul@xxxxxxxxxx>, Bartosz Golaszewski <bgolaszewski@xxxxxxxxxxxx>, Guenter Roeck <linux@xxxxxxxxxxxx>, Jonathan Cameron <jic23@xxxxxxxxxx>, Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>, Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx>, Pavel Machek <pavel@xxxxxx>, Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>, Lee Jones <lee.jones@xxxxxxxxxx>, Ulf Hansson <ulf.hansson@xxxxxxxxxx>, Heiko Stuebner <heiko@xxxxxxxxx>, Andrew Lunn <andrew@xxxxxxx>, Florian Fainelli <f.fainelli@xxxxxxxxx>, Linus Walleij <linus.walleij@xxxxxxxxxx>, Fabio Estevam <festevam@xxxxxxxxx>, Mark Brown <broonie@xxxxxxxxxx>, Bjorn Andersson <bjorn.andersson@xxxxxxxxxx>, Alexandre Belloni <alexandre.belloni@xxxxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Amit Kucheria <amit.kucheria@xxxxxxxxxx>, Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-clk@xxxxxxxxxxxxxxx, dri-devel@xxxxxxxxxxxxxxxxxxxxx, linux-i2c@xxxxxxxxxxxxxxx, linux-hwmon@xxxxxxxxxxxxxxx, linux-iio@xxxxxxxxxxxxxxx, linux-input@xxxxxxxxxxxxxxx, linux-leds@xxxxxxxxxxxxxxx, linux-media@xxxxxxxxxxxxxxx, linux-mmc@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, linux-can@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxxxxxx, linux-pci@xxxxxxxxxxxxxxx, linux-gpio@xxxxxxxxxxxxxxx, linux-pwm@xxxxxxxxxxxxxxx, linux-remoteproc@xxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-rtc@xxxxxxxxxxxxxxx, linux-serial@xxxxxxxxxxxxxxx, alsa-devel@xxxxxxxxxxxxxxxx, linux-spi@xxxxxxxxxxxxxxx
- In-reply-to: <20200416005549.9683-1-robh@kernel.org>
- References: <20200416005549.9683-1-robh@kernel.org>
- User-agent: Mutt/1.10.1 (2018-07-13)
Hi Rob.
On Wed, Apr 15, 2020 at 07:55:48PM -0500, Rob Herring wrote:
> Fix various inconsistencies in schema indentation. Most of these are
> list indentation which should be 2 spaces more than the start of the
> enclosing keyword. This doesn't matter functionally, but affects running
> scripts which do transforms on the schema files.
Are there any plans to improve the tooling so we get warnigns for this?
Otherwise I am afraid we will see a lot of patches that gets this wrong.
As a follow-up patch it would be good if example-schema.yaml
could gain some comments about the correct indentions.
Some comments in the following.
> diff --git a/Documentation/devicetree/bindings/arm/altera.yaml b/Documentation/devicetree/bindings/arm/altera.yaml
> index 49e0362ddc11..b388c5aa7984 100644
> --- a/Documentation/devicetree/bindings/arm/altera.yaml
> +++ b/Documentation/devicetree/bindings/arm/altera.yaml
> @@ -13,8 +13,8 @@ properties:
> compatible:
> items:
> - enum:
> - - altr,socfpga-cyclone5
> - - altr,socfpga-arria5
> - - altr,socfpga-arria10
> + - altr,socfpga-cyclone5
> + - altr,socfpga-arria5
> + - altr,socfpga-arria10
> - const: altr,socfpga
So here "- enum" do not need the extra indent.
Is it because this is not a list?
> ...
> diff --git a/Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml b/Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
> index 66213bd95e6e..6cc74523ebfd 100644
> --- a/Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
> +++ b/Documentation/devicetree/bindings/arm/amlogic/amlogic,meson-gx-ao-secure.yaml
> @@ -25,7 +25,7 @@ select:
>
> properties:
> compatible:
> - items:
> + items:
> - const: amlogic,meson-gx-ao-secure
> - const: syscon
This is something I had expected the tooling to notice.
I had expected the two "- const" to be indented with 4 spaces, not two.
So there is something I do not understand.
> diff --git a/Documentation/devicetree/bindings/arm/nxp/lpc32xx.yaml b/Documentation/devicetree/bindings/arm/nxp/lpc32xx.yaml
> index 07f39d3eee7e..f7f024910e71 100644
> --- a/Documentation/devicetree/bindings/arm/nxp/lpc32xx.yaml
> +++ b/Documentation/devicetree/bindings/arm/nxp/lpc32xx.yaml
> @@ -17,9 +17,8 @@ properties:
> - nxp,lpc3230
> - nxp,lpc3240
> - items:
> - - enum:
> - - ea,ea3250
> - - phytec,phy3250
> - - const: nxp,lpc3250
> -
> + - enum:
> + - ea,ea3250
> + - phytec,phy3250
> + - const: nxp,lpc3250
> ...
And here "- enum" receive extra indent.
I trust you know what you are doing - but I do not get it.
Some pointers or examples for the correct indention would be great.
I cannot review this patch as long as I do not know the rules.
My request to update example-schema.yaml was one way to teach me.
(Some people will say that is difficult/impossible to teach me,
but thats another story:-) ).
Sam
[Index of Archives]
[Linux Kernel]
[Linux ARM (vger)]
[Linux ARM MSM]
[Linux Omap]
[Linux Arm]
[Linux Tegra]
[Fedora ARM]
[Linux for Samsung SOC]
[eCos]
[Linux Fastboot]
[Gcc Help]
[Git]
[DCCP]
[IETF Announce]
[Security]
[Linux MIPS]
[Yosemite Campsites]
|