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.8 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 CEB17C433E9 for ; Wed, 3 Feb 2021 08:02:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A0AD364F67 for ; Wed, 3 Feb 2021 08:02:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232513AbhBCICT (ORCPT ); Wed, 3 Feb 2021 03:02:19 -0500 Received: from mail-oi1-f171.google.com ([209.85.167.171]:35417 "EHLO mail-oi1-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232360AbhBCICQ (ORCPT ); Wed, 3 Feb 2021 03:02:16 -0500 Received: by mail-oi1-f171.google.com with SMTP id w8so25854589oie.2; Wed, 03 Feb 2021 00:02:00 -0800 (PST) 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=GUaHpRuxDtXxAFdZvqP757XADeBZ3LieB9iSp5HePYo=; b=BbssH+gRTwu4QRBF+yEiZKPdWssG77YDInBTxcDlXmiiwk8Zfbw5R0Mj/5fntV7Lzm 4BoOVlzppoctOlmsGgvvSHmqklV4G1R6rDknIn2W5kbLyqJlvP+0DzuQ1af23BuWvLUb a6jgav/rDxMqN4/sqT4DzoIGBqJ2NhMdl53pZbxHH9UlMXxzbBQXeFfdSMKEnYJaGktk vT6QglCWoz+PCPcPMiZRjccwMhE9Bnyc+wTzRGC232qrgJXcQROipJ/1NxIHYjJb5QMf czSvmT2Kza9JQ7tutfy/3n7Tseq0yHzaMEOWObmeHTbzqJGaQxE19eKweo/0w11kp0uH R+bQ== X-Gm-Message-State: AOAM533MYl3088h12QzQ3eI8xQHGT/JLr7WxzJNjKa6ASz/6PIvdgrOY KiAnnszh8bFdebOt/vABz73VFwBndIhHDHdytVw= X-Google-Smtp-Source: ABdhPJwqsuDHPLo5fOlX0wowinMiQhY3VwM6kpoW5w0c8+SrgPYoxRUVXo5rAHqaZ3aooghGfjdJuw8T8GflSuyMMQU= X-Received: by 2002:a54:4e88:: with SMTP id c8mr1200640oiy.148.1612339294830; Wed, 03 Feb 2021 00:01:34 -0800 (PST) MIME-Version: 1.0 References: <20210202205544.24812-1-robh@kernel.org> <20210202205544.24812-3-robh@kernel.org> In-Reply-To: <20210202205544.24812-3-robh@kernel.org> From: Geert Uytterhoeven Date: Wed, 3 Feb 2021 09:01:23 +0100 Message-ID: Subject: Re: [PATCH 3/3] dt-bindings: Fix errors in 'if' schemas To: Rob Herring Cc: "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux Kernel Mailing List , Stephen Boyd , Maxime Ripard , Chen-Yu Tsai , Linus Walleij , Herbert Xu , "David S. Miller" , Daniel Palmer , Bartosz Golaszewski , Avi Fishman , Tomer Maimon , Tali Perry , Joerg Roedel , Will Deacon , Andrew Jeffery , Joel Stanley , Wim Van Sebroeck , Guenter Roeck , Yoshihiro Shimoda , Vincent Cheng , linux-clk , Linux Crypto Mailing List , "open list:GPIO SUBSYSTEM" , Linux I2C , Linux IOMMU , Linux Watchdog Mailing List , Eric Anholt , Nicolas Saenz Julienne , Florian Fainelli , Ray Jui , Scott Branden , Pavel Machek , Ulf Hansson , Kishon Vijay Abraham I , Vinod Koul , Geert Uytterhoeven , Daniel Lezcano , DRI Development , linux-leds , Linux MMC List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Hi Rob, On Tue, Feb 2, 2021 at 9:55 PM Rob Herring wrote: > Properties in if/then schemas weren't getting checked by the meta-schemas. > Enabling meta-schema checks finds several errors. > > The use of an 'items' schema (as opposed to the list form) is wrong in > some cases as it applies to all entries. 'contains' is the correct schema > to use in the case of multiple entries. > Signed-off-by: Rob Herring Thanks for your patch! > --- a/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > +++ b/Documentation/devicetree/bindings/phy/renesas,usb2-phy.yaml > @@ -81,9 +81,8 @@ properties: > if: > properties: > compatible: > - items: > - enum: > - - renesas,usb2-phy-r7s9210 > + contains: > + const: renesas,usb2-phy-r7s9210 Single entry, so "contains" not needed? > --- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > +++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc.yaml > @@ -76,11 +76,10 @@ required: > if: > properties: > compatible: > - items: > - enum: > - - renesas,pfc-r8a73a4 > - - renesas,pfc-r8a7740 > - - renesas,pfc-sh73a0 > + enum: > + - renesas,pfc-r8a73a4 > + - renesas,pfc-r8a7740 > + - renesas,pfc-sh73a0 Missing "contains"? 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