From nobody Wed Dec 22 06:59:17 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 AAFA318FA5AF; Wed, 22 Dec 2021 06:59:18 +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 4JJkhQ1zPrz3PXX; Wed, 22 Dec 2021 06:59:18 +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 D1A0F18E8E; Wed, 22 Dec 2021 06:59:17 +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 1BM6xHVC036863; Wed, 22 Dec 2021 06:59:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BM6xHct036862; Wed, 22 Dec 2021 06:59:17 GMT (envelope-from git) Date: Wed, 22 Dec 2021 06:59:17 GMT Message-Id: <202112220659.1BM6xHct036862@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: 5a75c18ead97 - stable/12 - 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/12 X-Git-Reftype: branch X-Git-Commit: 5a75c18ead9726ef9a669d38073edf1346f632ba Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640156358; 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=9QAsBKeRxzrSK5iHeITH19ztDYeTHCcuegiKTxxDMdo=; b=K7plycfhdQpPzIUa3x1D3Piluwo6MzagltypSLSuj7kD5oIjKDiXj10P+fBLC+rqt7EzGP E4mYFHXgnv5hxpLsxZzcy6GtObJ9vxhKKL3hSc8lA/XXHwY9VXEgohFYUueqQcb6J2JdDi krZikS1sl10iwr7X+SI0z3IghonF/YaCkPVG8UNsgx195EjPZ3Q1Rn3Kgcm64D/G+9Yxh1 eTUk1WgJlvwgEN51EfIxeL7VK7k/WT2QtqaWkFtdMlFrLTG7tHXh3bQ0x+tLv6nORafu9d KEkEzpz0hfdQsOeCSrSZt7A5PAaTowTZNZ4Ldizb1Lq7pGDcl1zp51NfLVtl+Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640156358; a=rsa-sha256; cv=none; b=KJTph2+UfWZxjF0efjyJu+WyluCLuBDvbJaVa2LKxdlETHAWT42J6zyvmEjwQRp9yrl89o DyoJqjq2Xf/pmvgizCP/PveLW7OJvaQXvn/DPKmM0Q4GwBoG0uOYtRKf7qZUyOrWNeX35b 6OBoqpX5xJUHaDC4G2W9OX6nTbgbfaDHdmbvjOmjHlnwi/eXVyewhnKFA6lTID24825Wfb dm90Hhn8/UnWWqV8XwsSVHbMZF1WUYxqqhqowyFwX80devIoGreHzXH4zYN7yBI3vcvPD2 +lgy7wBjFxjQW3JzUMMk17KjDqkPErWCSWU8A648ubEcdedASA3+aOTA8CZv8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=5a75c18ead9726ef9a669d38073edf1346f632ba commit 5a75c18ead9726ef9a669d38073edf1346f632ba Author: Andriy Gapon AuthorDate: 2021-12-15 08:42:23 +0000 Commit: Andriy Gapon CommitDate: 2021-12-22 06:57:07 +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 0b6bd9b1f9cf..35f7cd8a66e5 100644 --- a/sys/arm64/rockchip/rk_i2c.c +++ b/sys/arm64/rockchip/rk_i2c.c @@ -267,7 +267,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;