From nobody Wed Dec 22 06:51:26 2021 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 05EF018F7820; Wed, 22 Dec 2021 06:51:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JJkWL6hMTz3L7R; Wed, 22 Dec 2021 06:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7718018A63; Wed, 22 Dec 2021 06:51:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1BM6pQtO035235; Wed, 22 Dec 2021 06:51:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BM6pQLD035227; Wed, 22 Dec 2021 06:51:26 GMT (envelope-from git) Date: Wed, 22 Dec 2021 06:51:26 GMT Message-Id: <202112220651.1BM6pQLD035227@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andriy Gapon Subject: git: 5bfa1a647667 - stable/13 - rk_i2c: consistently treat booleans as such List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 5bfa1a64766797572c3f07dee7ee339e3215eb7a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640155887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zYYOywPOaCHXT6M7aG9k3RCUmQKY+pbxH727UJjrqx8=; b=F51tiJfJAVG3New9JPJakEu7feESCmIPCE3WmFthyABOnQZSdgC731vntiWZTRh/dc4Jzp U6IY9+aFDZWlf6iDIWj0SEGnANEvY89Wi8bXr4zCGj1XKoBiJ0Tihte07lXEwFNt2QMUoE IA/3Vp7ExLtZm6pe14pcmIj0LEzC4q6RMZ9S6Lvs7opHnBGD3LLTHqYveipIwFpB+b5GHo EQg8J6hQqPHcWB1YtuZnRmJfg6ClDbHAqnJhjiw3DoNWAfns87GM1qgDEqyc6L1h5EUCSD PwJkunQ0h6KKNu9u/5O3xSJkj/IiP76IPR7mGqfDT0qngLWJqLVdWYTizdjY9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640155887; a=rsa-sha256; cv=none; b=h6nzk/+n5tT4hM8AGuOM0GopSWg+SoGMEv79cVVIWdr+3VcDwbzsEAag9Jv2/23K+Xbkp3 TdA+4/p2ZWa5yBmmO6DMcpXiFmUGf3OiH4PnqMSwMIda9bDbmtUSsGvAX3enNSCYIljMhc 32AqwtvPLLFp6V95m5rSdGVP4NsPugpibFWjJBBXUAZb71FRm4o3aVCVTLHwlyYqMH4iPZ TIlHj2BbDg9ZagZPHMI+ufqJo7BDOAadcKkvgvU/d4ckQKz/R+QCQ/phS8nSkXxEZJDIRx RsgtRY8ir4WQqB/8e2bCDCK2fb4/iik5RFKyjxbFNdh2q365eRaReD8BSFfLEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=5bfa1a64766797572c3f07dee7ee339e3215eb7a commit 5bfa1a64766797572c3f07dee7ee339e3215eb7a Author: Andriy Gapon AuthorDate: 2021-12-15 08:40:22 +0000 Commit: Andriy Gapon CommitDate: 2021-12-22 06:49:15 +0000 rk_i2c: consistently treat booleans as such (cherry picked from commit 1da04ae8fb5b7a1f1d9e52b87af1aaf756d28d4b) --- sys/arm64/rockchip/rk_i2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/arm64/rockchip/rk_i2c.c index 7b3ebb090fae..50c968d687bd 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -303,9 +303,9 @@ rk_i2c_intr_locked(struct rk_i2c_softc *sc) if (sc->ipd & RK_I2C_IPD_NAKRCVIPD) { /* NACK received */ sc->ipd &= ~RK_I2C_IPD_NAKRCVIPD; - sc->nak_recv = 1; + sc->nak_recv = true; /* XXXX last byte !!!, signal error !!! */ - sc->transfer_done = 1; + sc->transfer_done = true; sc->state = STATE_IDLE; goto err; } @@ -523,14 +523,14 @@ rk_i2c_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs) if (cold) { for(timeout = 10000; timeout > 0; timeout--) { rk_i2c_intr_locked(sc); - if (sc->transfer_done != 0) + if (sc->transfer_done) break; DELAY(1000); } if (timeout <= 0) err = IIC_ETIMEOUT; } else { - while (err == 0 && sc->transfer_done != 1) { + while (err == 0 && !sc->transfer_done) { err = msleep(sc, &sc->mtx, PZERO, "rk_i2c", 10 * hz); }