Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2563455rwd; Fri, 19 May 2023 07:22:27 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6tYCGLT96tTTBq8Skt+Ztkb6N4BlNhyHRxIDQmXjMXOFe30liBmRGZ8y2S3iIxcYrEHsm5 X-Received: by 2002:a17:902:f689:b0:1a0:7156:f8d1 with SMTP id l9-20020a170902f68900b001a07156f8d1mr3447544plg.19.1684506147646; Fri, 19 May 2023 07:22:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684506147; cv=none; d=google.com; s=arc-20160816; b=xGToQcRwCb0s31a1m0WijF025zSI5yQy80Oo82vbmzOGtqyQJ9PNHCNCd/IZcs4YLD 45OkunvRLgr6ID/Calu/YCEAnEXmjMyJ88wZII4EOxVOndfwb43cSvwBKrtZNv/DlnPo oL3Jru5fli0JgHEQtfRAgUg1E46gjSmaUtDItelCf/d8ULKMEGWe56aDryQwJeV+03kA Nm2C6tozH7ifxk4HkPLHii77BAi1JhCYkfm621+mANw7sWJhFQs9xBLGjtXhv0Ccdi2P ABbVtSNMbhDrBZEw88LrKmpoAMIm3+skOTs4bXLrU/6UTDBe5ITm3mskdsTMfTLgE6hL U2Qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/PdR+46jyf8bKiK0AiqIRHB98lWg+txwfuVwXSZEZOI=; b=qIR44XUSkIXEC7hdWJ9fdapvLHu2UX4wMiAyBWYphZI5iJrYGWYtDHnaK8+Oii/lRy +7SzRPidbIXLejVv0kW2f44mefNMXoTQvtyZ/12uzSZWPWUio1FG1ZB8ltuBjEtTPVo/ AWD0svIki5FbUklL2ZxgA/pxyZ95dWQyCK39NM69burc+8oikMbuycNxD68+ujsLQZg4 jPm0G8QTtIEXuiL2xNl7uWVSWxXGINoYJ5IBXNfpbA2x5bJ3Bfd/qA+VQG5Qd884u6Hx 1Po/eK0Zf6Xw9WpUWSlOGH0FkEuvSoDnEX4CCZFw2SgC4soMhDZgCQ5n7EYzWS0Kx+NP qvRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=OrZjSUTt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l1-20020a170902f68100b001a961bfe4b7si3838155plg.362.2023.05.19.07.22.10; Fri, 19 May 2023 07:22:27 -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=@bootlin.com header.s=gm1 header.b=OrZjSUTt; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231911AbjESONQ (ORCPT + 99 others); Fri, 19 May 2023 10:13:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232066AbjESONH (ORCPT ); Fri, 19 May 2023 10:13:07 -0400 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 675DF1A8; Fri, 19 May 2023 07:13:06 -0700 (PDT) Received: (Authenticated sender: alexis.lothore@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id A885FE0010; Fri, 19 May 2023 14:13:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684505585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/PdR+46jyf8bKiK0AiqIRHB98lWg+txwfuVwXSZEZOI=; b=OrZjSUTtbd3MYNoQhzPqmL+Bt6G6R77yrFw7tD2/YyxBo+hNhCGJzyHYsfdMHw+3iwgPcz n8QTKAER1dQOZIY2BF2fxptOIOoZFj1ASvgGO8UAVuRZMxBReYxt1NUAYYHI2Funj7vlB5 9zVHXA+GF2knPytanEyeqc4hZgAviLHaDlPPMflvtS/k8n9pU87RdHh/mlTUwZrDPN+Vfw PXBNAZSE0d08wEfI/6p21zTlycAGyFJBcKyUKkseEHpKvVzTZw7WEyJp6swgkOLuPE1OrM GMykI+EFwl7JGGy2nLvTO28rgFwizsQw6cXKfTrvNy83YEw1eos74CVondSWtA== From: alexis.lothore@bootlin.com To: Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Richard Cochran , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, paul.arola@telus.com, scott.roberts@telus.com, =?UTF-8?q?Marek=20Beh=C3=BAn?= , =?UTF-8?q?Alexis=20Lothor=C3=A9?= Subject: [PATCH net-next v2 3/7] net: dsa: mv88e6xxx: use mv88e6xxx_phy_is_internal in mv88e6xxx_port_ppu_updates Date: Fri, 19 May 2023 16:12:59 +0200 Message-Id: <20230519141303.245235-4-alexis.lothore@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230519141303.245235-1-alexis.lothore@bootlin.com> References: <20230519141303.245235-1-alexis.lothore@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 From: Alexis LothorĂ© Make sure to use existing helper to get internal PHYs count instead of redoing it manually Signed-off-by: Alexis LothorĂ© --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 93bcfa5c80e1..c812e52bb5b7 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -477,7 +477,7 @@ static int mv88e6xxx_port_ppu_updates(struct mv88e6xxx_chip *chip, int port) * report whether the port is internal. */ if (chip->info->family == MV88E6XXX_FAMILY_6250) - return port < chip->info->num_internal_phys; + return mv88e6xxx_phy_is_internal(chip, port); err = mv88e6xxx_port_read(chip, port, MV88E6XXX_PORT_STS, ®); if (err) { -- 2.40.1