From: Marek Vasut Date: Thu, 9 Aug 2018 09:24:50 +0200 Subject: [U-Boot] [PATCH] phy: Fix off-by-one error when parsing DT PHY bindings In-Reply-To: <6ac1a97e-7e3c-9beb-0bf9-9fcd646872a2@st.com> References: <20180808123443.18348-1-marek.vasut+renesas@gmail.com> <6ac1a97e-7e3c-9beb-0bf9-9fcd646872a2@st.com> Message-ID: <4150c303-3324-87c1-87ae-9247ea09e271@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 08/09/2018 09:04 AM, Patrice CHOTARD wrote: > Hi Marek > > On 08/08/2018 02:34 PM, Marek Vasut wrote: >> The code fails to copy the last PHY phandle argument, so it is >> missing from the adjusted phandle args and the consumer cannot >> use it to determine what the PHY should do. >> >> Signed-off-by: Marek Vasut >> Cc: Patrice Chotard >> --- >> drivers/phy/phy-uclass.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/phy/phy-uclass.c b/drivers/phy/phy-uclass.c >> index 6162395e75..a0ac30aa71 100644 >> --- a/drivers/phy/phy-uclass.c >> +++ b/drivers/phy/phy-uclass.c >> @@ -64,7 +64,7 @@ int generic_phy_get_by_index(struct udevice *dev, int index, >> return ret; >> >> /* insert phy idx at first position into args array */ >> - for (i = args.args_count; i > 1 ; i--) >> + for (i = args.args_count; i >= 1 ; i--) >> args.args[i] = args.args[i - 1]; >> >> args.args_count++; >> > > Reviewed-by: Patrice Chotard Who's picking this up ? -- Best regards, Marek Vasut