Date: Tue, 29 Oct 2019 18:36:16 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354152 - head/sys/arm64/rockchip Message-ID: <201910291836.x9TIaGw4053903@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: manu Date: Tue Oct 29 18:36:16 2019 New Revision: 354152 URL: https://svnweb.freebsd.org/changeset/base/354152 Log: arm64: rockchip: typec_phy: Rename timeout to retry Declare retry in the function scope. Rename it to retry as there is a timeout function which was causing to code to compile. Reported by: jhibbits MFC after: 1 month X-MFC-WITH: r354089 Modified: head/sys/arm64/rockchip/rk_typec_phy.c Modified: head/sys/arm64/rockchip/rk_typec_phy.c ============================================================================== --- head/sys/arm64/rockchip/rk_typec_phy.c Tue Oct 29 18:24:36 2019 (r354151) +++ head/sys/arm64/rockchip/rk_typec_phy.c Tue Oct 29 18:36:16 2019 (r354152) @@ -191,7 +191,7 @@ rk_typec_phy_enable(struct phynode *phynode, bool enab device_t dev; intptr_t phy; uint32_t reg; - int err; + int err, retry; dev = phynode_get_device(phynode); phy = phynode_get_id(phynode); @@ -271,13 +271,13 @@ rk_typec_phy_enable(struct phynode *phynode, bool enab hwreset_deassert(sc->rst_uphy); - for (int timeout = 10000; timeout > 0; timeout--) { + for (retry = 10000; retry > 0; retry--) { reg = RK_TYPEC_PHY_READ(sc, PMA_CMN_CTRL1); if (reg & PMA_CMN_CTRL1_READY) break; DELAY(10); } - if (timeout == 0) { + if (retry == 0) { device_printf(sc->dev, "Timeout waiting for PMA\n"); return (ENXIO); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201910291836.x9TIaGw4053903>