Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp6274555rwn; Tue, 13 Sep 2022 01:27:10 -0700 (PDT) X-Google-Smtp-Source: AA6agR5Blu0vY1+DxKtp6Oqaj5ZZ2te2jNRuSDP0x957rJca8OsT9ZH58jF0ucFkHev6XA47Tw4Y X-Received: by 2002:a17:90b:4a06:b0:202:c03b:eb5c with SMTP id kk6-20020a17090b4a0600b00202c03beb5cmr2859552pjb.6.1663057630050; Tue, 13 Sep 2022 01:27:10 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1663057630; cv=pass; d=google.com; s=arc-20160816; b=r8fvTX2b7WwHe00XkHzqH08PUcbq5TZ/CL0soJKNEmfSAiPuHGgiDGrcKb/DqZIm3N Dxmth/QFbk+TxJH/QlQhoIDK6qd6MMlAnn0qwEB0UaOTAR7xFEsKXA80afkEXIFbKxcp FqKE+fo9pPcScNSkBIFZjA6y3v+Id7N7u9yZe/+pV/Y6aXjIB/mX3wI+27KL5uIOk1Pr 3Q8DmMe9V7XOcMNYiXeSmDPvCNtPsiSxy1VKsJQtNrQEeGZ2FczyZpEHGfWfGv1wbY2h k3K/2Bx1Bpa86URBDfGs2qBElZnmxHzfIihGL5lHgxQU9pekr7pmDiC335JIzchIGYvA BuMQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=5ta8cGICr0VOJM3jC+pGpsMR/rkOeJqhzZDkRQ4xBHw=; b=zLfkDRApqm5f/Q4bQX+p/mAQnT6eqaS4RNCjwomO2jr48p6R6hIi5BcceCKNyRbjqT FtBV7RWkYg9BzXzlGcuxIslwTYqQEXUGWN7RciebHzhEhXk2xruhm4mV9FvOxKU3Xb6b gRn4HfIgfMAmglVqMdkdQHZW0gcCDvbaH30GgY37QzP3GpK/KDmfvAcY9XRUd7Ie1GFE d0dgnCQQYDZ6nHLWveTOETIgoHoB8ALr9uebkyfS8D1u/39KFNAJmemc1DZ9RAq4cAD5 n/MeXfrnGbdEEbe7dAwUicUWhWiGO4HHiAcCQRvK/1XW7LTUeNJ9sCF7tIDrqzFH9jpM E3Fw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=FIMUqSjX; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g10-20020a056a001a0a00b0053708adb535si11866550pfv.257.2022.09.13.01.26.58; Tue, 13 Sep 2022 01:27:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=FIMUqSjX; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231376AbiIMIUB (ORCPT + 99 others); Tue, 13 Sep 2022 04:20:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230498AbiIMIT7 (ORCPT ); Tue, 13 Sep 2022 04:19:59 -0400 Received: from sender4-op-o14.zoho.com (sender4-op-o14.zoho.com [136.143.188.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 677F3BF64; Tue, 13 Sep 2022 01:19:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663057151; cv=none; d=zohomail.com; s=zohoarc; b=cbD2oH6qV+7f5NwVYgIJya2nvrNAGDpLFrbMwDhNRhRq0ADLO5oIbXtGn0ZFWg3c0wH64WMNrrxOmfk1KtU6Mn+04VafA9n4Uwt2U6R/iUCRywgzxhPUfYJ1msr6DG7vevuM2kEOPpI1sgPmC6EKMmlkjFFOyyqzCHOSFR5+aag= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1663057151; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=5ta8cGICr0VOJM3jC+pGpsMR/rkOeJqhzZDkRQ4xBHw=; b=ZrR99btLqzgG+9bJWWYITysE2GBxYdI5P2IhlexV2cyxX7ySwd+GhWnz9Yh9v/SYZCzkOPDSZDLj3AYqqY+juPsOv1RZu7Ogeojk8mb05opMb6v+7gIRXeCrJxb/1XxoRwASJcuErKWTcsR2CQi110VygrpKD0A9Ac8JDssjlWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1663057151; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=5ta8cGICr0VOJM3jC+pGpsMR/rkOeJqhzZDkRQ4xBHw=; b=FIMUqSjX4QdqKRIUAo/ZmX4QYgTQV628cIf8ACY3Gc4sGipLUi5K8tD4+ZB2KbUZ NMXt/GQc/Kiuj1GsXiEmqc1MhTkN7XiQOJC2tlZDwHVCFnmEa/oMThCUcOto7R+DpTy O0cUbIdWZv4RXIaEFJXVXtE+0hTrXhlLyR6uBipY= Received: from [10.10.10.3] (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1663057148935836.8616576818519; Tue, 13 Sep 2022 01:19:08 -0700 (PDT) Message-ID: Date: Tue, 13 Sep 2022 11:19:01 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH net-next 1/3] dt-bindings: net: dsa: mt7530: replace label = "cpu" with proper checks Content-Language: en-US To: Vladimir Oltean , netdev@vger.kernel.org Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , George McCollister , Kurt Kanzenbach , Matthias Brugger , Woojung Huh , UNGLinuxDriver@microchip.com, Linus Walleij , =?UTF-8?Q?Alvin_=c5=a0ipraga?= , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , Landen Chao , DENG Qingfang , Sean Wang , Marek Vasut , John Crispin , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-renesas-soc@vger.kernel.org References: <20220912175058.280386-1-vladimir.oltean@nxp.com> <20220912175058.280386-2-vladimir.oltean@nxp.com> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20220912175058.280386-2-vladimir.oltean@nxp.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 12.09.2022 20:50, Vladimir Oltean wrote: > The fact that some DSA device trees use 'label = "cpu"' for the CPU port > is nothing but blind cargo cult copying. The 'label' property was never > part of the DSA DT bindings for anything except the user ports, where it > provided a hint as to what name the created netdevs should use. > > DSA does use the "cpu" port label to identify a CPU port in dsa_port_parse(), > but this is only for non-OF code paths (platform data). > > The proper way to identify a CPU port is to look at whether the > 'ethernet' phandle is present. > > Signed-off-by: Vladimir Oltean Reviewed-by: Arınç ÜNAL Arınç > --- > .../devicetree/bindings/net/dsa/mediatek,mt7530.yaml | 12 +++--------- > 1 file changed, 3 insertions(+), 9 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > index f9e7b6e20b35..fa271ee16b5e 100644 > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > @@ -163,9 +163,7 @@ patternProperties: > allOf: > - $ref: dsa-port.yaml# > - if: > - properties: > - label: > - const: cpu > + required: [ ethernet ] > then: > required: > - phy-mode > @@ -187,9 +185,7 @@ $defs: > patternProperties: > "^(ethernet-)?port@[0-9]+$": > if: > - properties: > - label: > - const: cpu > + required: [ ethernet ] > then: > if: > properties: > @@ -215,9 +211,7 @@ $defs: > patternProperties: > "^(ethernet-)?port@[0-9]+$": > if: > - properties: > - label: > - const: cpu > + required: [ ethernet ] > then: > if: > properties: