From nobody Wed Dec 22 06:51:27 2021 X-Original-To: dev-commits-src-all@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 4846718F7989; Wed, 22 Dec 2021 06:51:29 +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 4JJkWN0lrgz3LRd; Wed, 22 Dec 2021 06:51:27 +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 8F02F18A65; Wed, 22 Dec 2021 06:51:27 +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 1BM6pRlf035962; Wed, 22 Dec 2021 06:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BM6pREY035961; Wed, 22 Dec 2021 06:51:27 GMT (envelope-from git) Date: Wed, 22 Dec 2021 06:51:27 GMT Message-Id: <202112220651.1BM6pREY035961@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: d655d4f1065e - stable/13 - rk_i2c_drain_rx: remove useless arithmetic manipulations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@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: d655d4f1065e649f2aa748089849cf41a61de3b2 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640155888; 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=U+YxvftfE4klyWYXlG4E7v6s09J2Nbhs8jzupq16m7U=; b=yNz6hXnwbAkpGMD8wLl+zlQu6vKtFa8sCVJkHMOisRpOLW7aBZO5YdAumOkKPrjdNt00aH RmKpxSHN8zPmB4x68gfH1sw7kYS/risf9sKCyJyRrN3wcJ2CxFE5UhUuLFHkRlwJFB6Aat m+/XaasQ8qi9s84jvCh9uRQupFl2wfgL5LfRW03VXcCkLu4JzBbVBQTMYRkAkp2crDBYWB ItyVTQ0BQSNPXXNiTLt5J80iizclf42ocrFo5ZqM1e1rWFFJ5hH9qlHNQ/5Gu8cyx1+hCR koQtTaS194H+lKWhKLcxATOtH5HxzWzw0dyV1q6i7kF5fouPpP7IbhQjsqi1ag== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640155888; a=rsa-sha256; cv=none; b=Qqp9CmW7XDTVcYT6SlYgWLKch5Xzaojo0ufhorFJ6LAuihgeNTu03F7Suwr/gzmLNK6UUk 3H3Gnsg+nnh+JpGH7KCC7oePxh+kv5vkhh5cTj7zfT+tU9bIUk7NB0Cau/d+bo6EqP/tbZ TQc8Gg1eVEGQesMSXaHiDtG1SD8hNgXRhV+0PoXTCdVwdIafSLc1zzOXaWlWdlVuF2PYSh sUMKp+t1IY6E5GhqPmgumbs4pHqt2Z+oiCGx2u14Gzn4khyEJd3Z8C6QhwIy7mkNareP+3 vnC/s4QKzu6FM61BD/ObyU2sZxOPqcNROo/QBxOhNeoADqDkS1AzC94a+mHzYw== 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=d655d4f1065e649f2aa748089849cf41a61de3b2 commit d655d4f1065e649f2aa748089849cf41a61de3b2 Author: Andriy Gapon AuthorDate: 2021-12-15 08:42:23 +0000 Commit: Andriy Gapon CommitDate: 2021-12-22 06:49:15 +0000 rk_i2c_drain_rx: remove useless arithmetic manipulations When i % 4 == 0 the result of (i / 4) * 4 is always i. (cherry picked from commit ede576831b818c78d23a9600932e13e47b8fd745) --- sys/arm64/rockchip/rk_i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/rockchip/rk_i2c.c b/sys/arm64/rockchip/rk_i2c.c index 50c968d687bd..026c731af4d4 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -265,7 +265,7 @@ rk_i2c_drain_rx(struct rk_i2c_softc *sc) for (i = 0; i < len; i++) { if (i % 4 == 0) - buf32 = RK_I2C_READ(sc, RK_I2C_RXDATA_BASE + (i / 4) * 4); + buf32 = RK_I2C_READ(sc, RK_I2C_RXDATA_BASE + i); buf8 = (buf32 >> ((i % 4) * 8)) & 0xFF; sc->msg->buf[sc->cnt++] = buf8;