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 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 26DD6C77B6E for ; Fri, 14 Apr 2023 11:22:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 7A09985B21; Fri, 14 Apr 2023 13:22:37 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.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; secure) header.d=mailbox.org header.i=@mailbox.org header.b="hP9CQx6X"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="bLU23PzW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BD06485B21; Fri, 14 Apr 2023 13:22:35 +0200 (CEST) Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [IPv6:2001:67c:2050:0:465::103]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 62D6F85D50 for ; Fri, 14 Apr 2023 13:22:31 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut@mailbox.org Received: from smtp102.mailbox.org (unknown [10.196.197.102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-103.mailbox.org (Postfix) with ESMTPS id 4PyYvW1fbZz9sTV; Fri, 14 Apr 2023 13:22:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681471351; 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=X8VYGcdelj5TLCsSsw03zEpyBO6SB3Tb6b1buRdfkss=; b=hP9CQx6XIOvcJ+VXZu9PFQkUndES3r1qAr1pZzbslT3y9xsYetZ+X2gv5P+sU1rgC6uKe9 PydcvS5wrCU7Y69i8r0IXLmqqWdPB7rB8eJVAQzM61i0mmjxf1LnB1YBG6vnyi2ZkNIlVM 6hfIdRelFFbbNtC3oVMafc8FJv3GzDDyq/W49H9K2GW53xK2def/St0YstkW/sQmNjcHP2 /P1c3YR9Pa1Ey9zuq85EfK8uXuHFOQyubtOwnO+yvmmgKwCjFUhclMzRDNzDIj8KIAhFPG 0M+2viRki6l5uf4PvEw998EPI3VUVmGcfKcvfgRXDvMTU1yKFmbeuym7z6ZWog== Message-ID: <3975bbc6-3e42-340e-ed24-7add1eb0fbde@mailbox.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1681471349; 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=X8VYGcdelj5TLCsSsw03zEpyBO6SB3Tb6b1buRdfkss=; b=bLU23PzWggDIgufJGBBf2H3q71zHVr6hbDU5x2klVXv/ZQ4ZYqfm5u5EldxwlLsQ9O6i4V 5E2gzaYp3Bob5LBkY/lZXN5ryZBiLJVahrQIVLXni2irBmWE+Xb4e9WEqoEudj4c/Odsu2 VlTMzLj5Eeu/T47iinmuz6dyhhrCXKm2itU00ygWjkGBSJO5vfMowrZ39Vtv5ekCATnHCx gcTdCa9sL4oNldo3waBGp6sjIZfFZIPHaz4nsaUOolfRnDNKgXOPB6ZvU+onEtH4Mhd8If t/VdhMM31umz+b8uYjJzGl1aITO8gS8WTHur0HLMkdKwj5D8/mbFJrJ1phvUYw== Date: Fri, 14 Apr 2023 13:21:24 +0200 MIME-Version: 1.0 Subject: Re: [PATCH V2 2/2] net: phy: Make phy_interface_is_rgmii a switch statement Content-Language: en-US To: Nishanth Menon , Marek Vasut , Tom Rini Cc: Siddharth Vadapalli , Vignesh Raghavendra , Michal Simek , Ramon Fried , u-boot@lists.denx.de, =?UTF-8?Q?Marek_Beh=c3=ban?= References: <20230414042433.3436425-1-nm@ti.com> <20230414042433.3436425-3-nm@ti.com> From: Marek Vasut In-Reply-To: <20230414042433.3436425-3-nm@ti.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-MBO-RS-META: cm6h9fujyunsjrycmndabh87ecdbiwxg X-MBO-RS-ID: b0125f26fe5eeeffc81 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 On 4/14/23 06:24, Nishanth Menon wrote: > Recent commit 75d28899e3e9 ("net: phy: Synchronize PHY interface modes > with Linux") reordered the enum definitions. This exposed a problem in > range checking functions to identify the interface type. Though this > specific api was'nt impacted (all the RGMII definitions remained within Nit: "wasn't" , apostrophe in the wrong place . > range), this experience should be used to never to have to face this > kind of challenge again. > > While it is possible for the phy drivers to practically use the enum's > directly, drivers such as dp83867, dp83869, marvell, micrel_ksz90x1 etc > use the same. > > Reported-by: Tom Rini > Signed-off-by: Nishanth Menon Reviewed-by: Marek Vasut