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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 19A04C77B72 for ; Fri, 14 Apr 2023 22:07:30 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id DFF6A85E01; Sat, 15 Apr 2023 00:07:07 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=ti.com header.i=@ti.com header.b="qLinprGC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 63A6485D9D; Sat, 15 Apr 2023 00:07:01 +0200 (CEST) Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) (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 EC44285D9D for ; Sat, 15 Apr 2023 00:06:55 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=ti.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=nm@ti.com Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 33EM6lrf036964; Fri, 14 Apr 2023 17:06:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1681510007; bh=cpKLf4sSyDqznkvhzXBcoVGCF8OtfgXsCtKAXC+1/vA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qLinprGC+9NbAyXFeBwyzpJeYDvKi3iEmav0CDPnGG5rHATTpUII7iRx2HWpk2TwE Vh/qFD6r1Fc7L/CpvgpL8mqjd+yQw3S6w+yA3mhJBFP9Mh+27oQ/FZdWfvLNHswCI1 157XgV3ftvtHhn05+4SLRoeGRCDhTEGPCLW9fJvY= Received: from DLEE108.ent.ti.com (dlee108.ent.ti.com [157.170.170.38]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 33EM6lpo062964 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 14 Apr 2023 17:06:47 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Fri, 14 Apr 2023 17:06:46 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE108.ent.ti.com (157.170.170.38) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Fri, 14 Apr 2023 17:06:46 -0500 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 33EM6kCe130869; Fri, 14 Apr 2023 17:06:46 -0500 From: Nishanth Menon To: Marek Vasut , Tom Rini CC: Siddharth Vadapalli , =?UTF-8?q?Marek=20Beh=C3=BAn?= , Vignesh Raghavendra , Michal Simek , Ramon Fried , , Nishanth Menon , =?UTF-8?q?Marek=20Beh=C3=BAn?= Subject: [PATCH V3 2/3] net: phy: Drop phy_interface_is_sgmii Date: Fri, 14 Apr 2023 17:06:44 -0500 Message-ID: <20230414220645.37092-3-nm@ti.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230414220645.37092-1-nm@ti.com> References: <20230414220645.37092-1-nm@ti.com> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 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.8 at phobos.denx.de X-Virus-Status: Clean Recent commit 75d28899e3e9 ("net: phy: Synchronize PHY interface modes with Linux") reordered the enum definitions. This caused the range of enums that this api was checking to go bad. There aren't anymore users of phy_interface_is_sgmii, so, just drop it. Also the protocols are so very different that it makes no sense to provide a helper wrapper in the hope of reuse for phy drivers. Reported-by: Tom Rini Suggested-by: Marek Vasut Suggested-by: Marek BehĂșn Link: https://lore.kernel.org/all/20230414103852.38705065@dellmb/ Signed-off-by: Nishanth Menon --- Changes Since v2: * Redone the patch, but original versions below (did'nt make sense to carry reviewed-by) * Just drop the phy_interface_is_sgmii V2: https://lore.kernel.org/r/20230414042433.3436425-2-nm@ti.com V1: https://lore.kernel.org/r/20230413180713.2922524-2-nm@ti.com include/phy.h | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/include/phy.h b/include/phy.h index a837fed72352..cb87d1d4fc95 100644 --- a/include/phy.h +++ b/include/phy.h @@ -365,18 +365,6 @@ static inline bool phy_interface_is_rgmii(struct phy_device *phydev) phydev->interface <= PHY_INTERFACE_MODE_RGMII_TXID; } -/** - * phy_interface_is_sgmii - Convenience function for testing if a PHY interface - * is SGMII (all variants) - * @phydev: the phy_device struct - * @return: true if MII bus is SGMII or false if it is not - */ -static inline bool phy_interface_is_sgmii(struct phy_device *phydev) -{ - return phydev->interface >= PHY_INTERFACE_MODE_SGMII && - phydev->interface <= PHY_INTERFACE_MODE_QSGMII; -} - bool phy_interface_is_ncsi(void); /* PHY UIDs for various PHYs that are referenced in external code */ -- 2.40.0