From patchwork Wed Feb 23 14:45:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 1596757 X-Patchwork-Delegate: monstr@monstr.eu Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.a=rsa-sha256 header.s=20210112 header.b=eR4Pj9OE; 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 4K3f481dLtz9sGj for ; Thu, 24 Feb 2022 01:46:16 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 9BE7483CA3; Wed, 23 Feb 2022 15:46:00 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=monstr-eu.20210112.gappssmtp.com header.i=@monstr-eu.20210112.gappssmtp.com header.b="eR4Pj9OE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6DB1E83C90; Wed, 23 Feb 2022 15:45:51 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id D4B0E8354B for ; Wed, 23 Feb 2022 15:45:47 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=none dis=none) header.from=xilinx.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=monstr@monstr.eu Received: by mail-ej1-x62f.google.com with SMTP id gb39so53043572ejc.1 for ; Wed, 23 Feb 2022 06:45:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20210112.gappssmtp.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=l108K6tZCdjqZq3QbUuUVnV8wcBj5sODLOSUgm2UVz8=; b=eR4Pj9OETSP0Ajb8ESpYKie5SAK2L3N5rD4pTlLPchM0bewVNix94mu1cApohpsTXk iGUf2bBX6FCOtp3znlcDoH6Iup8X9rTHEfOKUNuWdD/qrOBzFa0zDVSzjq7Lv8OchkNT 5KQYbgsk7oMhb5rSrcgiOW3SM745trcbqpTkyLAzM7PwLt+O6+vp2tUJZESffwHAlrhq lHNXxEXnVBsbbS0pRuLLVozbN4oXGKwUPF4KVgDcz/B1voqL+SMj+qe+Vl5KFWr3BM17 DYnAr8b92rzi2FrC8YAZexP6+BLQATezHK6dg56Dy4SO29eAT72c9Tbf/SCpBx81PG4p 7hsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=l108K6tZCdjqZq3QbUuUVnV8wcBj5sODLOSUgm2UVz8=; b=A0vKiyuTvsMvZtyso+U6jb1629GqmChnttUVwAcNMO1ZzH+Tb9q7ai0kpOaCOQeO/g NNxczT84lvULzZGKvp0w/W9/eSpPgaHZO3Xy51uiGY38d5+fozZpKqFVFJDWqvDLBADB nGCJWZI8jWlYHOPEG2CWC4lrhg7v1wEwj/PzGfHfVJT+qAq/3Rs6jTWJtlomxdG0iNYQ hLxznjX8J4nlAzToc6vm2hRcpakrQtbLXMlmYhO85AAYHkdQMuaVGTGv9DKXFG6LPR/h QiPWZQxwVUphZQhxdoVJ0OyrMz5hYTDdadcAxc2Fqm/cO5PZhVs9l9pyO+gHyLHxdOtU VWbQ== X-Gm-Message-State: AOAM5307QH8oa81/1kJhaD+/G9cRB/XKsgCUJgylrdQrzyVtPScEe1AH ahkjaZlut55UrMK1MeNQinB+0x4GJtxlyA== X-Google-Smtp-Source: ABdhPJzOciCopYI0dpgt2Xyhhr0bt7qQZICIN9mhW02iey3LyupHEsboVW7z49jzJnypCnslyjYj4Q== X-Received: by 2002:a17:906:e288:b0:6cf:bb19:bc23 with SMTP id gg8-20020a170906e28800b006cfbb19bc23mr51150ejb.73.1645627547190; Wed, 23 Feb 2022 06:45:47 -0800 (PST) Received: from localhost ([2a02:768:2307:40d6::f9e]) by smtp.gmail.com with ESMTPSA id bo11sm7488885ejb.24.2022.02.23.06.45.46 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 23 Feb 2022 06:45:46 -0800 (PST) From: Michal Simek To: u-boot@lists.denx.de, git@xilinx.com Cc: Bin Meng , Joe Hershberger , Priyanka Jain , "Radu Pirea (NXP OSS)" , Ramon Fried , T Karthik Reddy , Vladimir Oltean , Wolfgang Denk Subject: [PATCH 2/3] net: phy: Remove static return type for phy_device_create() Date: Wed, 23 Feb 2022 15:45:41 +0100 Message-Id: <1517f4053403fbd53e899d500e7485d068a4f0b6.1645627539.git.michal.simek@xilinx.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: References: 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 Remove static return type for phy_device_create() to avoid file scope for this function. Also add required prototype in phy.h. Signed-off-by: Michal Simek Signed-off-by: T Karthik Reddy --- drivers/net/phy/phy.c | 6 +++--- include/phy.h | 13 +++++++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c9fc20855ba1..f63705e1b9a1 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -659,9 +659,9 @@ static struct phy_driver *get_phy_driver(struct phy_device *phydev, return generic_for_interface(interface); } -static struct phy_device *phy_device_create(struct mii_dev *bus, int addr, - u32 phy_id, bool is_c45, - phy_interface_t interface) +struct phy_device *phy_device_create(struct mii_dev *bus, int addr, + u32 phy_id, bool is_c45, + phy_interface_t interface) { struct phy_device *dev; diff --git a/include/phy.h b/include/phy.h index c66fd43ea887..832d7a169578 100644 --- a/include/phy.h +++ b/include/phy.h @@ -454,6 +454,19 @@ void phy_connect_dev(struct phy_device *phydev, struct udevice *dev); struct phy_device *phy_connect(struct mii_dev *bus, int addr, struct udevice *dev, phy_interface_t interface); +/** + * phy_device_create() - Create a PHY device + * + * @bus: MII/MDIO bus that hosts the PHY + * @addr: PHY address on MDIO bus + * @phy_id: where to store the ID retrieved + * @is_c45: Device Identifiers if is_c45 + * @interface: interface between the MAC and PHY + * @return: pointer to phy_device if a PHY is found, or NULL otherwise + */ +struct phy_device *phy_device_create(struct mii_dev *bus, int addr, + u32 phy_id, bool is_c45, + phy_interface_t interface); static inline ofnode phy_get_ofnode(struct phy_device *phydev) {