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 DAABDC7EE29 for ; Mon, 29 May 2023 08:02:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231620AbjE2ICs (ORCPT ); Mon, 29 May 2023 04:02:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231602AbjE2ICm (ORCPT ); Mon, 29 May 2023 04:02:42 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 69603A7; Mon, 29 May 2023 01:02:40 -0700 (PDT) X-GND-Sasl: alexis.lothore@bootlin.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1685347359; 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=HVeTiNdqxBdbXWGa6GToTachoJ0k0DdGzZZ8bcQ2MzA=; b=VMFe0Jo/uS2eToIjmTcgSBlIMAfo33R4veiitZUdru/goF92amiByfJxpOLV5EYaHYU9ec szJyWPKEVF1Vb/bthQVlTGEZWVnNyt2MHhCKXvDjAnb4fEUWhbnD74xKUyds00wWqTzd8T tbrstasGpfIpnmuVwEmzymAA4aTcy7ShZRqIqW+UlcBX4YXQWt6S5uEwLtYoMt80G/SLCX yT21OOBrYcDNQXoUHnLWmgSISZhVvbIu1jwDU0GPCcQ9Y7Ed9yHwWHRQH0/aqbkkcxDjNs piOpe7V3KpQaGbpdr2Uzheq1QTHRiAhRmRWp2VWLP0pT/5sD2qqIuE9R5s7IcQ== X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com X-GND-Sasl: alexis.lothore@bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id 95A8C6000B; Mon, 29 May 2023 08:02:37 +0000 (UTC) From: =?UTF-8?q?Alexis=20Lothor=C3=A9?= 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: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, Thomas Petazzoni , paul.arola@telus.com, scott.roberts@telus.com, =?UTF-8?q?Marek=20Beh=C3=BAn?= , =?UTF-8?q?Alexis=20Lothor=C3=A9?= , Russell King Subject: [PATCH net-next v4 3/7] net: dsa: mv88e6xxx: use mv88e6xxx_phy_is_internal in mv88e6xxx_port_ppu_updates Date: Mon, 29 May 2023 10:02:42 +0200 Message-Id: <20230529080246.82953-4-alexis.lothore@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230529080246.82953-1-alexis.lothore@bootlin.com> References: <20230529080246.82953-1-alexis.lothore@bootlin.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Make sure to use existing helper to get internal PHYs count instead of redoing it manually Signed-off-by: Alexis LothorĂ© Reviewed-by: Russell King (Oracle) Reviewed-by: Florian Fainelli --- Changes since v3: - fix SoB Changes since v2: - add reviewed-by tags --- 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 e6f6c062cf77..1b5a05f118b4 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