From nobody Fri Dec 10 13:32:12 2021 X-Original-To: dev-commits-src-main@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 1ABA218DDBEA; Fri, 10 Dec 2021 13:32:13 +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 4J9WzJ5v0Mz4YNs; Fri, 10 Dec 2021 13:32:12 +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 A9FF41B53B; Fri, 10 Dec 2021 13:32:12 +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 1BADWCqk049791; Fri, 10 Dec 2021 13:32:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BADWCRo049790; Fri, 10 Dec 2021 13:32:12 GMT (envelope-from git) Date: Fri, 10 Dec 2021 13:32:12 GMT Message-Id: <202112101332.1BADWCRo049790@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 2b556942cc29 - main - Fix set but not used warnings in arm64 rockchip List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b556942cc29dcbf1d85cc6342696e2f7168c067 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639143132; 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=2MP6HorfWM50WvVUjkNsTUJJUxEc4lwsCZTOnEuZdFQ=; b=ZSOJ6bI/gQNAFIsVJxTToS6KtMWR3KlNZRpa1JvEDMDiJJdSVlZJx9yz0B3/hC0sDx64eq Qrt+rPycpwUL1CxigH9EXRlJbZzAV+djYOQQZ7qxkggSunz6bmCyAIGUAxkLkTJoKmpV05 m+hwxbZXxEPR3SwtAf/F14ctZiqvf6SvXNQT3Xw0AeFnLid0vrkug3rpBpaGYfA0qsx/DW bkLnxIHMEQOqbhzV9+bejLc5TwWZEXlZ37mrGJ2N/vz6sKpWrgdQsOzp8L5/IbiPwvolwZ BtjvOktCyGTIO0iGAM5TZc3Qtwr8aYKDwEWAO1JkD//fVEf5uwO6lx8XMKtC5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639143132; a=rsa-sha256; cv=none; b=efbziWBISzy4qCUcRC4IS/uRLJ//KUvJmeZ+PU/YSYD/BwoMZFC41I7sGoI0YdKKkEqbXe eznbgDQAmW1R4o6hRn/0MwWA+PD8gXsBwKdWOukeA+hAI0F4G8wTVXdO6/EvkveCEmu/q/ QNvdCzE3tSv/qFIyuePwes4ieE6sv7t5TOumdGXxReN+7abH9Y/P3BGXHQcrQ/adGbMO5O Y1oP/oBGrHXiqE2lB1aeMQyShWVh/gIii+cwPw39nD1c8FDmcjelDzSy6DJ0uI3+UHY3aq fA5wsxUTfy6P297T8PkeThtq6kL0ctH8PnUxv9Z/l4zyMoo1vdn5nVDleXy1Tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2b556942cc29dcbf1d85cc6342696e2f7168c067 commit 2b556942cc29dcbf1d85cc6342696e2f7168c067 Author: Andrew Turner AuthorDate: 2021-12-10 12:23:21 +0000 Commit: Andrew Turner CommitDate: 2021-12-10 13:29:11 +0000 Fix set but not used warnings in arm64 rockchip Reviewed by: manu, mmel Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33372 --- sys/arm64/rockchip/clk/rk_clk_composite.c | 2 +- sys/arm64/rockchip/clk/rk_clk_pll.c | 7 ------- sys/arm64/rockchip/rk_i2s.c | 5 +++-- sys/arm64/rockchip/rk_pinctrl.c | 3 +-- 4 files changed, 5 insertions(+), 12 deletions(-) diff --git a/sys/arm64/rockchip/clk/rk_clk_composite.c b/sys/arm64/rockchip/clk/rk_clk_composite.c index 17d258e02985..b6d1621a0eac 100644 --- a/sys/arm64/rockchip/clk/rk_clk_composite.c +++ b/sys/arm64/rockchip/clk/rk_clk_composite.c @@ -247,7 +247,7 @@ rk_clk_composite_find_best(struct rk_clk_composite_sc *sc, uint64_t fparent, break; } } - *reg = div_reg; + *reg = best_div_reg; return (best_div); } diff --git a/sys/arm64/rockchip/clk/rk_clk_pll.c b/sys/arm64/rockchip/clk/rk_clk_pll.c index 99026c546727..4327735f401d 100644 --- a/sys/arm64/rockchip/clk/rk_clk_pll.c +++ b/sys/arm64/rockchip/clk/rk_clk_pll.c @@ -373,10 +373,6 @@ rk3066_clk_pll_register(struct clkdom *clkdom, struct rk_clk_pll_def *clkdef) static int rk3328_clk_pll_init(struct clknode *clk, device_t dev) { - struct rk_clk_pll_sc *sc; - - sc = clknode_get_softc(clk); - clknode_init_parent_idx(clk, 0); return (0); @@ -585,9 +581,6 @@ rk3328_clk_pll_register(struct clkdom *clkdom, struct rk_clk_pll_def *clkdef) static int rk3399_clk_pll_init(struct clknode *clk, device_t dev) { - struct rk_clk_pll_sc *sc; - - sc = clknode_get_softc(clk); clknode_init_parent_idx(clk, 0); return (0); diff --git a/sys/arm64/rockchip/rk_i2s.c b/sys/arm64/rockchip/rk_i2s.c index 52f80789a795..450c2c6e2b77 100644 --- a/sys/arm64/rockchip/rk_i2s.c +++ b/sys/arm64/rockchip/rk_i2s.c @@ -404,13 +404,14 @@ rk_i2s_dai_intr(device_t dev, struct snd_dbuf *play_buf, struct snd_dbuf *rec_bu uint8_t *samples; uint32_t count, size, readyptr, written; count = sndbuf_getready(play_buf); + if (count > FIFO_SIZE - 1) + count = FIFO_SIZE - 1; size = sndbuf_getsize(play_buf); readyptr = sndbuf_getreadyptr(play_buf); - /* FIXME: check actual count size */ samples = (uint8_t*)sndbuf_getbuf(play_buf); written = 0; - for (; level < FIFO_SIZE - 1; level++) { + for (; level < count; level++) { val = (samples[readyptr++ % size] << 0); val |= (samples[readyptr++ % size] << 8); val |= (samples[readyptr++ % size] << 16); diff --git a/sys/arm64/rockchip/rk_pinctrl.c b/sys/arm64/rockchip/rk_pinctrl.c index 24ad7798eef0..21ab984aca5a 100644 --- a/sys/arm64/rockchip/rk_pinctrl.c +++ b/sys/arm64/rockchip/rk_pinctrl.c @@ -1117,7 +1117,7 @@ rk_pinctrl_get_flags(device_t pinctrl, device_t gpio, uint32_t pin, { struct rk_pinctrl_softc *sc; struct syscon *syscon; - uint32_t reg, mask, bit; + uint32_t reg, bit; uint32_t bias; int bank; int rv = 0; @@ -1141,7 +1141,6 @@ rk_pinctrl_get_flags(device_t pinctrl, device_t gpio, uint32_t pin, reg = sc->conf->get_pd_offset(sc, bank); reg += bank * 0x10 + ((pin / 8) * 0x4); bit = (pin % 8) * 2; - mask = (0x3 << bit) << 16; reg = SYSCON_READ_4(syscon, reg); reg = (reg >> bit) & 0x3; bias = sc->conf->resolv_bias_value(bank, reg);