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 380E1C433F5 for ; Wed, 11 May 2022 10:58:27 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D4CAB842FE; Wed, 11 May 2022 12:58:25 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=nic.cz 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; secure) header.d=nic.cz header.i=@nic.cz header.b="Yebf82NY"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 58E48842FD; Wed, 11 May 2022 12:58:24 +0200 (CEST) Received: from mail.nic.cz (mail.nic.cz [IPv6:2001:1488:800:400::400]) (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 580C1842FE for ; Wed, 11 May 2022 12:58:21 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from thinkpad (unknown [172.20.6.87]) by mail.nic.cz (Postfix) with ESMTPS id C58F6140880; Wed, 11 May 2022 12:58:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1652266700; bh=s8UWeIymicULR/ZBvSfsvgt/v3S7+5njkofh0UR/rCg=; h=Date:From:To:Cc:Subject:From; b=Yebf82NY7Ae4Uc9mNq1nAsAzj7FGHsFYaTiLdyx45XYKAC9An8dk0oggPagGc2k33 IwBcCm0FAuvt2S+7KvLz8vT1ioAe9RbVh/Jb4fA/xUAKS4Bt4Pmo1bp2Se4LAE7Lpg vTRPMi9L9mw3VtPd1gAkEpa16JRVwQAurdhvDJvY= Date: Wed, 11 May 2022 12:58:20 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: Tim Harvey Cc: Joe Hershberger , Ramon Fried , u-boot@lists.denx.de, Stefan Roese , Vladimir Oltean Subject: Re: [PATCH] net: fix phy_string_for_interface Message-ID: <20220511125820.58a0126a@thinkpad> In-Reply-To: <20220510224910.12553-1-tharvey@gateworks.com> References: <20220510224910.12553-1-tharvey@gateworks.com> X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Tue, 10 May 2022 15:49:10 -0700 Tim Harvey wrote: > commit ffb0f6f488b9 ("treewide: Rename PHY_INTERFACE_MODE_NONE to > PHY_INTERFACE_MODE_NA") broke the phy_string_for_interface function. > Fix it. >=20 > Fixes ffb0f6f488b9 ("treewide: Rename PHY_INTERFACE_MODE_NONE to PHY_INTE= RFACE_MODE_NA") > Signed-off-by: Tim Harvey > Cc: Marek Beh=C3=BAn > Cc: Stefan Roese > Cc: Ramon Fried > Cc: Vladimir Oltean > --- > include/phy_interface.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/include/phy_interface.h b/include/phy_interface.h > index ce3b5004ec22..fed3357b9a26 100644 > --- a/include/phy_interface.h > +++ b/include/phy_interface.h > @@ -85,7 +85,7 @@ static const char * const backplane_mode_strings[] =3D { > static inline const char *phy_string_for_interface(phy_interface_t i) > { > /* Default to unknown */ > - if (i > PHY_INTERFACE_MODE_NA) > + if (i >=3D PHY_INTERFACE_MODE_MAX) > i =3D PHY_INTERFACE_MODE_NA; > =20 > return phy_interface_strings[i]; Yikes. Reviewed-by: Marek Beh=C3=BAn