From patchwork Fri May 19 14:12:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alexis_Lothor=C3=A9?= X-Patchwork-Id: 96448 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1269652vqo; Fri, 19 May 2023 07:15:33 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6wOk8rRgdxBimAI7gBr2TS3CnIP75cv3XnZLeMePWNQbPlmSsEFASbjYGkcb1QO88Br/89 X-Received: by 2002:a05:6a20:72a0:b0:100:a201:83dc with SMTP id o32-20020a056a2072a000b00100a20183dcmr2446361pzk.35.1684505733596; Fri, 19 May 2023 07:15:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684505733; cv=none; d=google.com; s=arc-20160816; b=QFWytWBTa73Tt56xABK66ZJSG0ugMVIiDZl84g2QvJJMokLJF/hj749DTRe5XjABZK eijU0jJCIRwUL2uVImAsu5txo2s00zro2BOxxwPsQ1VuwSLV/TT1iZGX4VQ7Rs98C4aB gqjmMHtE4if64IohC8zE/suCKsEVJkEYv/V1WkSHwBdPxzPgxmmsYGHMxzinF/WqS95S y944NhAewXBU71waZjQTTQMzgYTYN9/2ZmyRY+YBpBa3EJg1otxeOXZyeiLiCX7dowAr 8bDOXC/scl4WtmfdV0TH9U9pRfQ7Dvk/syxXtwSpkDlhTEvocg94MPSJdEiYPnQ9FjBY 6E/A== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h190-20020a6383c7000000b00535f192827bsi57642pge.542.2023.05.19.07.15.18; Fri, 19 May 2023 07:15:33 -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 S232094AbjESONQ (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_Beh=C3=BAn?= , =?utf-8?q?Alexis_Lothor?= =?utf-8?q?=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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766332284119277558?= X-GMAIL-MSGID: =?utf-8?q?1766332284119277558?= From: Alexis LothorĂ© 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 --- 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) {