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 62178C77B73 for ; Wed, 24 May 2023 13:01:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234906AbjEXNB2 (ORCPT ); Wed, 24 May 2023 09:01:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41518 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234149AbjEXNBU (ORCPT ); Wed, 24 May 2023 09:01:20 -0400 Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::223]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03E5D9B; Wed, 24 May 2023 06:01:18 -0700 (PDT) Received: (Authenticated sender: alexis.lothore@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 593FA60005; Wed, 24 May 2023 13:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1684933277; 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=DcILLvgxyjEn2ektgWeiBusqzZCd79fPMyPnGYS4Xow=; b=LY6Vzk7vedJ9MOH4asouFhcZ1lLiaeFwD9Z51o6qVcdxev6NXRNHaonfUiNCwbN4UEVzdU ofcQ3PK7Eyh79bNSNDCZUignY0ZNTOLR4TjPh3PI56mXt1G8T7OR0uoh1OZ6fyEeGVJSMY K+JdNR/fsVVtXUCuQDifHuREIF4f/Ah308gSpxdPY8uQ8G8qPWA+ANolDaWZWOkn4UXxKQ dXMX/ksHFAsuL2fUtVIdOdDEklpi52HZ5YV9pZrjYnvglHrTRfFJgwbJXO13+uzCkXPl0Z b82aWLaZzwr0A0q74eUr4DQ9Z4h0Ht2KVGFEFYoUtNBAtsEicW7G+kFkMXnNNw== 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 v3 3/7] net: dsa: mv88e6xxx: use mv88e6xxx_phy_is_internal in mv88e6xxx_port_ppu_updates Date: Wed, 24 May 2023 15:01:23 +0200 Message-Id: <20230524130127.268201-4-alexis.lothore@bootlin.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230524130127.268201-1-alexis.lothore@bootlin.com> References: <20230524130127.268201-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: linux-kernel@vger.kernel.org Make sure to use existing helper to get internal PHYs count instead of redoing it manually Reviewed-by: Russell King (Oracle) Reviewed-by: Florian Fainelli --- Changes since v2 - add reviewed-by tags 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