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=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 29DFCC2B9F4 for ; Tue, 22 Jun 2021 08:17:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 162556128C for ; Tue, 22 Jun 2021 08:17:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230188AbhFVIUA (ORCPT ); Tue, 22 Jun 2021 04:20:00 -0400 Received: from mail-vs1-f54.google.com ([209.85.217.54]:46782 "EHLO mail-vs1-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229844AbhFVIT7 (ORCPT ); Tue, 22 Jun 2021 04:19:59 -0400 Received: by mail-vs1-f54.google.com with SMTP id z15so10758892vsn.13; Tue, 22 Jun 2021 01:17:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=s0hVMlLFV5eIwzuXXBEJWEV7FxMfuDBGtQwv1PuAfDc=; b=Yc8JShUBMH1dnjUYyQ4i3CS2+y2GF6q1YtRwv/bRUTq4JGwOzFH8jz0/QYnr8ZuDpr HcEesiBUGFsp/umSzAQ1ucxKn54tANWqVfYyhNDVX62VWxoC03W6vKFzSWDS1INIUujo EfpD0ZvANCW00iJ41ZnsyYqUYQ7WKnBJFLN0taGCgErNoNfbEbrJRexR6AwIwIKT2Knb /0emor8cfQJbNOnIXhfpVS1iQMsX9FEwTZTkt2w2NsDGz2POO5RqhJxIgP7TG7ACSbj/ GkkcJgg3HdSB+eNLe7DKVV3GNyEiHob+PVe9RVIKAdqt1PMr45YhOFebl4O9XRmtiOlY SQDQ== X-Gm-Message-State: AOAM530BLNzCLpsQ3ZsdxG/iSlElsnvEgk5f19JQOeLC0TziQs7pI7vp kFMx7YZsKONrP5YDTSXRni3TndxcwI12ri99DDk= X-Google-Smtp-Source: ABdhPJz3clw2O8tsVFk5F4OGcaBfo9Z8eHqvoF8LwYXAPGollSTCOREHx1S0f08A9nsiznMjaM5G5srL4UVXlJSotsU= X-Received: by 2002:a05:6102:2011:: with SMTP id p17mr21421376vsr.40.1624349860512; Tue, 22 Jun 2021 01:17:40 -0700 (PDT) MIME-Version: 1.0 References: <20210615191543.1043414-1-robh@kernel.org> In-Reply-To: <20210615191543.1043414-1-robh@kernel.org> From: Geert Uytterhoeven Date: Tue, 22 Jun 2021 10:17:28 +0200 Message-ID: Subject: Re: [PATCH] dt-bindings: Drop redundant minItems/maxItems To: Rob Herring Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , linux-ide@vger.kernel.org, linux-clk , Linux ARM , Linux Crypto Mailing List , DRI Development , dmaengine , Linux I2C , linux-iio@vger.kernel.org, ALSA Development Mailing List , Linux IOMMU , Linux Media Mailing List , Linux MMC List , netdev , linux-can@vger.kernel.org, linux-pci , linux-phy@lists.infradead.org, "open list:GPIO SUBSYSTEM" , Linux PWM List , "open list:REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM" , linux-riscv , linux-rtc@vger.kernel.org, "open list:SERIAL DRIVERS" , linux-spi , Linux PM list , USB list , Linux Watchdog Mailing List , Jens Axboe , Stephen Boyd , Herbert Xu , "David S. Miller" , David Airlie , Daniel Vetter , Vinod Koul , Bartosz Golaszewski , Kamal Dasu , Jonathan Cameron , Lars-Peter Clausen , Thomas Gleixner , Marc Zyngier , Joerg Roedel , Jassi Brar , Mauro Carvalho Chehab , Krzysztof Kozlowski , Ulf Hansson , Jakub Kicinski , Wolfgang Grandegger , Marc Kleine-Budde , Andrew Lunn , Vivien Didelot , Vladimir Oltean , Bjorn Helgaas , Kishon Vijay Abraham I , Linus Walleij , =?UTF-8?Q?Uwe_Kleine=2DK=C3=B6nig?= , Lee Jones , Ohad Ben-Cohen , Mathieu Poirier , Philipp Zabel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alessandro Zummo , Alexandre Belloni , Greg Kroah-Hartman , Mark Brown , Zhang Rui , Daniel Lezcano , Wim Van Sebroeck , Guenter Roeck Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org Hi Rob, On Tue, Jun 15, 2021 at 9:16 PM Rob Herring wrote: > If a property has an 'items' list, then a 'minItems' or 'maxItems' with the > same size as the list is redundant and can be dropped. Note that is DT > schema specific behavior and not standard json-schema behavior. The tooling > will fixup the final schema adding any unspecified minItems/maxItems. > > This condition is partially checked with the meta-schema already, but > only if both 'minItems' and 'maxItems' are equal to the 'items' length. > An improved meta-schema is pending. > Signed-off-by: Rob Herring > --- a/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > +++ b/Documentation/devicetree/bindings/net/stm32-dwmac.yaml > @@ -46,7 +46,6 @@ properties: > > clocks: > minItems: 3 > - maxItems: 5 > items: > - description: GMAC main clock > - description: MAC TX clock While resolving the conflict with commit fea99822914039c6 ("dt-bindings: net: document ptp_ref clk in dwmac") in soc/for-next, I noticed the following construct for clock-names: clock-names: minItems: 3 maxItems: 6 contains: enum: - stmmaceth - mac-clk-tx - mac-clk-rx - ethstp - eth-ck - ptp_ref Should this use items instead of enum, and drop maxItems, or is this a valid construct to support specifying the clocks in random order? If the latter, it does mean that the order of clock-names may not match the order of the clock descriptions. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds