From patchwork Tue Mar 29 20:08:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Marek_Beh=C3=BAn?= X-Patchwork-Id: 1610811 X-Patchwork-Delegate: rfried.dev@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=iGN988Uk; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4KSgft01stz9sDX for ; Wed, 30 Mar 2022 07:10:45 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E370C8409E; Tue, 29 Mar 2022 22:09:53 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="iGN988Uk"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BCFF684069; Tue, 29 Mar 2022 22:09:16 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.2 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5FE0984062 for ; Tue, 29 Mar 2022 22:09:02 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 67042B8162E; Tue, 29 Mar 2022 20:09:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0DAECC340ED; Tue, 29 Mar 2022 20:08:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1648584541; bh=6GQsaWwN8qo1osB2OVtKye9IrCRdwObjxnAOBaM95x0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iGN988UkxQ2TXrD3IY+WYYU1mk2iylGRGD5yxPhjN5dwamaFfiXHpU32gSw1E6qPt IRM1gZwtVOfhvY7XBX97j5Cjekc8xtNCK9uo8qvEPfxHjbOC+5CDC7xCIUsQ848rKC AIWF3tsdwjskfJmn6kXloR36ZX7yZYGxLPXbqf59+mgwxPJT/1F5iFx0VcBGNlFMPm 48OCNEcJ4UmMiTdlv8k3iEjlex13fpq9L4kKI7aj1TX0vc5S6ErcdFAXHqV9t/jQAw K+5W0Q5Y5PQqHfd0sk8Mkdv4reAVwF0kyAxMqdPRTKvKPFZb+l+7+Dg2GDfoMLa/mZ ioEKI+Zhrz+yQ== From: =?utf-8?q?Marek_Beh=C3=BAn?= To: Joe Hershberger , Ramon Fried Cc: u-boot@lists.denx.de, =?utf-8?q?Marek_Beh=C3=BAn?= , Stefan Roese Subject: [PATCH u-boot-net v3 08/14] treewide: Rename PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX Date: Tue, 29 Mar 2022 22:08:39 +0200 Message-Id: <20220329200845.13435-9-kabel@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220329200845.13435-1-kabel@kernel.org> References: <20220329200845.13435-1-kabel@kernel.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean From: Marek BehĂșn Rename constant PHY_INTERFACE_MODE_COUNT to PHY_INTERFACE_MODE_MAX to make it compatible with Linux' naming. Signed-off-by: Marek BehĂșn Reviewed-by: Stefan Roese Reviewed-by: Vladimir Oltean --- drivers/core/ofnode.c | 2 +- drivers/net/phy/aquantia.c | 2 +- include/phy_interface.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index 191ab63a5d..b9c334c46d 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -1198,7 +1198,7 @@ phy_interface_t ofnode_read_phy_mode(ofnode node) if (!mode) return PHY_INTERFACE_MODE_NONE; - for (i = 0; i < PHY_INTERFACE_MODE_COUNT; i++) + for (i = 0; i < PHY_INTERFACE_MODE_MAX; i++) if (!strcmp(mode, phy_interface_strings[i])) return i; diff --git a/drivers/net/phy/aquantia.c b/drivers/net/phy/aquantia.c index 83075f78c9..7e950fe0c2 100644 --- a/drivers/net/phy/aquantia.c +++ b/drivers/net/phy/aquantia.c @@ -305,7 +305,7 @@ struct { u16 syscfg; int cnt; u16 start_rate; -} aquantia_syscfg[PHY_INTERFACE_MODE_COUNT] = { +} aquantia_syscfg[PHY_INTERFACE_MODE_MAX] = { [PHY_INTERFACE_MODE_SGMII] = {0x04b, AQUANTIA_VND1_GSYSCFG_1G, AQUANTIA_VND1_GSTART_RATE_1G}, [PHY_INTERFACE_MODE_2500BASEX] = {0x144, AQUANTIA_VND1_GSYSCFG_2_5G, diff --git a/include/phy_interface.h b/include/phy_interface.h index f075abe9c9..494bc87e67 100644 --- a/include/phy_interface.h +++ b/include/phy_interface.h @@ -41,7 +41,7 @@ typedef enum { PHY_INTERFACE_MODE_USXGMII, PHY_INTERFACE_MODE_NONE, /* Must be last */ - PHY_INTERFACE_MODE_COUNT, + PHY_INTERFACE_MODE_MAX, } phy_interface_t; static const char * const phy_interface_strings[] = {