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 E317DC433FE for ; Thu, 20 Oct 2022 16:08:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230239AbiJTQIc (ORCPT ); Thu, 20 Oct 2022 12:08:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230045AbiJTQIb (ORCPT ); Thu, 20 Oct 2022 12:08:31 -0400 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E54C1213EE; Thu, 20 Oct 2022 09:08:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Tu4U+lQnvDeK4WfdirToag/wlMxNrMbWVorqMwlhqtM=; b=u+iIlvdsFZyNWyaK+vQJhzNpjX FautNPth7Z3euRWWBWFNtE+M0OyfS5TUvl893+xNaNLdVX09ZVuItxXOG8EreDsTJBHOJnKEsNUqP JJRGR+1QQGjAr5H1vu9plxC1pXF/B7wQ+nTIHZbtNSNy0Atz+OWW2Ch7Rf51OXKFa8x/gCVOuEnjR WoRLGaW+Im5ltPflzVOrrrmQi3Xwk5YUxhZSjm/MeCXdXxPWH499MUyIUq1UrgP381wIHM6eE1tyC sd0MsAEuD93vdvcbHnAD/shcK3KU6+cst0VZsEZLik8HVK5kanhVklGh2IqbHVezDkNu/RSBALAHK QHZIfqvw==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:34826) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1olY5n-0007T4-05; Thu, 20 Oct 2022 17:08:23 +0100 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1olY5l-0003HR-7b; Thu, 20 Oct 2022 17:08:21 +0100 Date: Thu, 20 Oct 2022 17:08:21 +0100 From: "Russell King (Oracle)" To: Rob Herring Cc: Krzysztof Kozlowski , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, devicetree@vger.kernel.org, Eric Dumazet , "David S. Miller" Subject: Re: [PATCH net-next 1/7] dt-bindings: net: sff,sfp: update binding Message-ID: References: <166622204824.13053.10147527260423850821.robh@kernel.org> <20221020141923.GA1252205-robh@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Oct 20, 2022 at 09:27:44AM -0500, Rob Herring wrote: > On Thu, Oct 20, 2022 at 9:19 AM Rob Herring wrote: > > > > On Thu, Oct 20, 2022 at 09:28:25AM +0100, Russell King (Oracle) wrote: > > > On Wed, Oct 19, 2022 at 06:31:53PM -0500, Rob Herring wrote: > > > > On Wed, 19 Oct 2022 14:28:46 +0100, Russell King (Oracle) wrote: > > > > > Add a minimum and default for the maximum-power-milliwatt option; > > > > > module power levels were originally up to 1W, so this is the default > > > > > and the minimum power level we can have for a functional SFP cage. > > > > > > > > > > Signed-off-by: Russell King (Oracle) > > > > > --- > > > > > Documentation/devicetree/bindings/net/sff,sfp.yaml | 2 ++ > > > > > 1 file changed, 2 insertions(+) > > > > > > > > > > > > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' > > > > on your patch (DT_CHECKER_FLAGS is new in v5.13): > > > > > > > > yamllint warnings/errors: > > > > > > > > dtschema/dtc warnings/errors: > > > > /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/net/sff,sfp.yaml: properties:maximum-power-milliwatt: 'minimum' should not be valid under {'enum': ['const', 'enum', 'exclusiveMaximum', 'exclusiveMinimum', 'minimum', 'maximum', 'multipleOf', 'pattern']} > > > > hint: Scalar and array keywords cannot be mixed > > > > from schema $id: http://devicetree.org/meta-schemas/keywords.yaml# > > > > > > I'm reading that error message and it means absolutely nothing to me. > > > Please can you explain it (and also re-word it to be clearer)? > > > > 'maxItems' is a constraint for arrays. 'maximum' is a constraint for > > scalar values. Mixing them does not make sense. > > TBC, dropping 'maxItems' is what is needed here. So how does this work? maxItems: 1 tells it that there should be an array of one property, which is at the DT level fundamentally the same as a scalar property. minimum: default: maximum: tells it that this is a scalar property, so there should be exactly one item or the property should not be mentioned? -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!