From nobody Wed Dec 15 11:16:41 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 CE34B18E9B89; Wed, 15 Dec 2021 11:16:42 +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 4JDXkf2MxLz4r6x; Wed, 15 Dec 2021 11:16:42 +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 F0D321AF37; Wed, 15 Dec 2021 11:16:41 +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 1BFBGf4n081623; Wed, 15 Dec 2021 11:16:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BFBGfjK081622; Wed, 15 Dec 2021 11:16:41 GMT (envelope-from git) Date: Wed, 15 Dec 2021 11:16:41 GMT Message-Id: <202112151116.1BFBGfjK081622@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: ede576831b81 - main - 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/main X-Git-Reftype: branch X-Git-Commit: ede576831b818c78d23a9600932e13e47b8fd745 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639567002; 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=Z/ipZ/lO3WxTydQB9M3VAMzvAsmorzrfoJjrsSes16I=; b=nZvKSz/rUed5vvfVFfdIFH+LvsUU6VVpsukJ4yAQsJQka2KbluzCHg5UqAXyK+rQ4MCNI+ KxzguBJ/suPVdmsbsMmI88Q/bg+zykNQCWK5gEjiom5H/r5BYj8Zhv6DFAZXS9HV17v4qU mMSvSJrxCbD6BVLa8fg5TSRZCd7+zSXDwYJPsy4aO2SoFoT0FdAXIXHWStAWI3g3uHUCAY mL9qGkCWiif3EOhCadgD09XFK0yuLqIngnsSKGZ5zoi6nyu8zD4iiVfc1+gQq9YIsUSwzc yjJYKe/1C/i3hP5QqrfGgr9fLX0vKRESiKxmiPB5zlRYrzgzTXFelI9U3xsW+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639567002; a=rsa-sha256; cv=none; b=cdKEiSVkFWK/4mS96Eq957OrBTQqrNKuCX67hKL133GqJzXj4AdneUUeqlJRk5CDWrYbBr yPerOpjuN3w9hNKIl+A7vi3MJQFCOcN4cs12NZpaH8o2aHa/u2vHnmU35eF1mhNEIMIHDa IyH1rQ1hcGqWLJZPZFLVYmaPWBWANybGoifafFUjMBTVEv0RnQLM5mQzEpvgkqATpe+nY+ uGr5c14YoAX0LgpDtlYumaK2uuufVxfewbvXXtfX46mGxoFk3GeUatE5ez7Q4KoBGuGyIU IP0VYHE0NglcQ/K3+M8HMCXX5L/5PZFJjimjPLnPgfpKXJorxMoMd1S51MCIxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=ede576831b818c78d23a9600932e13e47b8fd745 commit ede576831b818c78d23a9600932e13e47b8fd745 Author: Andriy Gapon AuthorDate: 2021-12-15 08:42:23 +0000 Commit: Andriy Gapon CommitDate: 2021-12-15 11:15:45 +0000 rk_i2c_drain_rx: remove useless arithmetic manipulations When i % 4 == 0 the result of (i / 4) * 4 is always i. MFC after: 1 week --- 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 18b7b2255e17..5ee1b8e96744 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;