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 31D83C00140 for ; Fri, 12 Aug 2022 06:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237040AbiHLG5Y (ORCPT ); Fri, 12 Aug 2022 02:57:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236346AbiHLG5X (ORCPT ); Fri, 12 Aug 2022 02:57:23 -0400 Received: from mail-lf1-x12b.google.com (mail-lf1-x12b.google.com [IPv6:2a00:1450:4864:20::12b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E04A3A59B9 for ; Thu, 11 Aug 2022 23:57:21 -0700 (PDT) Received: by mail-lf1-x12b.google.com with SMTP id x19so144450lfq.7 for ; Thu, 11 Aug 2022 23:57:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc; bh=FrfRi2+lHDlBxwVVMHzDrJHx7Q3p2G+5d8uDewrRAEw=; b=sv21mxYeoodQClvyUh7rxGuN1p6MH+kcL/yXUdot4DG3rVyYkWJmX2BjDNru9Y7F8C uGX7LfFwRVLlzPO9kL6GayHvRTvYULX2sNmDJvSKpKQ6mW2Cl0xC8qvBoWP3sAIfMTEH RDWbpGlytbQaMqhsE/QjhqKAK/lf5SJCWcy+m+qjEa/lr1j9HnyXS7mEseGk0Nn5YMLK /F6kfzhoAsF6mdjN1x5Zzxs6Q8YlQs0QQyC38mwJXEAg7O2liFQJWO/tLPLMM4NSHONP OfsTvhfZhqAIGu0vJUm/wj3ZNinVfv3y166ukJl5qN+A0acnLYI9soA+02cR8Yu8NFBS WxeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=FrfRi2+lHDlBxwVVMHzDrJHx7Q3p2G+5d8uDewrRAEw=; b=p1WgNR+ozWqo1EHsLrTDckbK6WI4kABdymm5rmtVYth4CDr7BPS7VDDPLlO3SBEn20 q15KHqnIZsUkmEwNo7qrnmP33Soqpm/199Bz+j3vUcuYjsUrAgK/RIMyZ8hTWRuOnD7A Ki9zUO/QsS3jmICar02FadI8GvUF10dMLU/pz6irib3EvgOud4o5IGbu97gQ32pfBRAO Zt4WiAaHk9rRTbA6IoQd5cKCC+MDooxaRdDevf8GMYJyC57PYlYBmh0s3di1NBAUPcpd xRsSFPXZVW0eIaKEGiihMfjUu0myAMrWAgLL3mfM1fmkT+TAQS3wI2vO2AYd9UCfd7O7 DpMQ== X-Gm-Message-State: ACgBeo1ePlbIH86pTG9Iwcbfu0ex1tgV4alfj9mgnIunRBkafZ43LtWp 4znG53IbJDX6gBK8TlyvJuS9UA== X-Google-Smtp-Source: AA6agR7M20SFyNF/dOFK27C0pl8a1ofriwmlGVRzgSCjE4kMy8Af4Pq+4LTBh+RSlfRCn9zUfdDZfg== X-Received: by 2002:a19:740c:0:b0:48b:374:987a with SMTP id v12-20020a19740c000000b0048b0374987amr874185lfe.690.1660287440281; Thu, 11 Aug 2022 23:57:20 -0700 (PDT) Received: from [192.168.1.39] ([83.146.140.105]) by smtp.gmail.com with ESMTPSA id o17-20020ac25e31000000b0048ceb3836d4sm114182lfg.6.2022.08.11.23.57.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 11 Aug 2022 23:57:19 -0700 (PDT) Message-ID: <8a665b7a-bbd0-99ce-658e-bc78568bdca2@linaro.org> Date: Fri, 12 Aug 2022 09:57:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.12.0 Subject: Re: [PATCH 4/4] dt-bindings: net: dsa: mediatek,mt7530: update json-schema Content-Language: en-US To: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sean Wang , Landen Chao , DENG Qingfang , Frank Wunderlich , Luiz Angelo Daros de Luca , Sander Vanheule , =?UTF-8?Q?Ren=c3=a9_van_Dorst?= , Daniel Golle , erkin.bozoglu@xeront.com, Sergio Paracuellos Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org References: <20220730142627.29028-1-arinc.unal@arinc9.com> <20220730142627.29028-5-arinc.unal@arinc9.com> From: Krzysztof Kozlowski In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 12/08/2022 01:09, Arınç ÜNAL wrote: >>> -patternProperties: >>> - "^(ethernet-)?ports$": >>> - type: object >> >> Actually four patches... >> >> I don't find this change explained in commit msg. What is more, it looks >> incorrect. All properties and patternProperties should be explained in >> top-level part. >> >> Defining such properties (with big piece of YAML) in each if:then: is no >> readable. > > I can't figure out another way. I need to require certain properties for > a compatible string AND certain enum/const for certain properties which > are inside patternProperties for "^(ethernet-)?port@[0-9]+$" by reading > the compatible string. requiring properties is not equal to defining them and nothing stops you from defining all properties top-level and requiring them in allOf:if:then:patternProperties. > If I put allOf:if:then under patternProperties, I can't do the latter. You can. > > Other than readability to human eyes, binding check works as intended, > in case there's no other way to do it. I don't see the problem in doing it and readability is one of main factors of code admission to Linux kernel. Best regards, Krzysztof