From nobody Sat Apr 09 01:31:47 2022 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 599E71A8BA01; Sat, 9 Apr 2022 01:31:48 +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 4KZyJh0S40z4k89; Sat, 9 Apr 2022 01:31:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649467908; 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=CbC3DwW6GHTsgPvtp5IltbGh7dtM7WaafhdnPjl7Lwc=; b=S9V5ZHU/j3eQHhp6gbvt7ML05P4ZMZLgL1/ztQH0wMyl1Vkr+HdDd2Sor2XhLGefvRWjlo uyxlqurG4ARQA+e4B9wb2MZtINb6iBkp8VxKOLnumeNWMdc1eTkR2QXqsHk8T2FUS4vEhu QOFyzixR/epl0nfrzckdcTMrnROSbZG6G7z+w4jLlKPbyIms7N9qBinHx4TLUA5+m3kAXg Ni8qPFy+FKLLeu8ddsEuc4bC2haB17VwPpqhjlHt+Cj8DXqOifCT7Eihvz4wAp8jPRRxQA 8azNanPAHbJj4E8yQKGclp2EuuADL7u0QzmtlKD10L1EpeqjB4ITGnEedUBd9A== 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 C04FF10991; Sat, 9 Apr 2022 01:31:47 +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 2391Vl6O049392; Sat, 9 Apr 2022 01:31:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2391VltZ049391; Sat, 9 Apr 2022 01:31:47 GMT (envelope-from git) Date: Sat, 9 Apr 2022 01:31:47 GMT Message-Id: <202204090131.2391VltZ049391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4b9b6a501a76 - main - arm/arm64 nvidia: Remove unused variables. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4b9b6a501a76d93c085223a8bc86073d202cc1bb Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649467908; 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=CbC3DwW6GHTsgPvtp5IltbGh7dtM7WaafhdnPjl7Lwc=; b=vGX8gCS7upZMM4LyKL63caYJnawFD8wY5wh+Usdy7a94PMRChesL888Ix/VggOPkh/09YE P4pPuznMK+D9s3LAIlxkV2M59bToq8bOjj5PbGUfNMcB1QRQRivMNWshyXPUzrZ0hHMpcR p9gskAf3qzgWRnAuDse+jmMOAeCs9gNh0hxiVW3k01syt1SO9eOXtWllVumPaeI8rXNmWX N1nNegWlmYGPPj6cIib03M0yJtAVckwsMmGOZvr7cEQxACMukdsF79MZXmdFn25QB9vRBZ NVZGZ+LZ5lzSpaZ3U/WyM3vIkWSsz3ntUw+U9ki3NF6pIwxVV6uxomnj4kcIxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649467908; a=rsa-sha256; cv=none; b=OuPpLq5qaw2zq5ISgabMtbMYutsRNYzJUBSFA49NMvkOjTWcSKWas0eGGa/tpZtoRuYpSC LaDDI64/NIYcFlqxaXBPwztSMZsbAp4es7VkToE962Uc/0BpZaGEFNZpdZWG7Qsatl9HZ6 KJsg9ibaBjZ2Gqli64/pm8YJSVs+iWrbEQjoew/8g4xS1YnE1IizFT5f+DuuHGxAd0pXfL +0f1OgpBkLC6CroUWwCKpNx7grKwp106pIWgAybpbOHxtnUeSuEn82gMzsU9i0bVxnbgck YpAQeULpyUWr5STK7ylyBJIZjVT19DWoV3pMkNA/8qJKDYLCmxmQDhqXCOh7jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4b9b6a501a76d93c085223a8bc86073d202cc1bb commit 4b9b6a501a76d93c085223a8bc86073d202cc1bb Author: John Baldwin AuthorDate: 2022-04-09 01:31:29 +0000 Commit: John Baldwin CommitDate: 2022-04-09 01:31:29 +0000 arm/arm64 nvidia: Remove unused variables. --- sys/arm/nvidia/as3722.c | 8 +------- sys/arm/nvidia/as3722_gpio.c | 2 -- sys/arm/nvidia/tegra124/tegra124_clk_pll.c | 7 +------ sys/arm/nvidia/tegra124/tegra124_coretemp.c | 3 --- sys/arm/nvidia/tegra124/tegra124_cpufreq.c | 3 +-- sys/arm/nvidia/tegra_efuse.c | 7 ------- sys/arm/nvidia/tegra_ehci.c | 2 -- sys/arm/nvidia/tegra_i2c.c | 3 +-- sys/arm/nvidia/tegra_pcie.c | 6 ------ sys/arm/nvidia/tegra_pinmux.c | 3 +-- sys/arm64/nvidia/tegra210/max77620.c | 5 +---- sys/arm64/nvidia/tegra210/tegra210_clk_pll.c | 3 --- sys/arm64/nvidia/tegra210/tegra210_coretemp.c | 3 --- sys/arm64/nvidia/tegra210/tegra210_cpufreq.c | 3 +-- sys/arm64/nvidia/tegra210/tegra210_pinmux.c | 3 +-- sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c | 2 -- 16 files changed, 8 insertions(+), 55 deletions(-) diff --git a/sys/arm/nvidia/as3722.c b/sys/arm/nvidia/as3722.c index 60301c78a2fb..b7de41f815d9 100644 --- a/sys/arm/nvidia/as3722.c +++ b/sys/arm/nvidia/as3722.c @@ -261,9 +261,6 @@ as3722_parse_fdt(struct as3722_softc *sc, phandle_t node) static void as3722_intr(void *arg) { - struct as3722_softc *sc; - - sc = (struct as3722_softc *)arg; /* XXX Finish temperature alarms. */ } @@ -285,16 +282,13 @@ static int as3722_attach(device_t dev) { struct as3722_softc *sc; - const char *dname; - int dunit, rv, rid; + int rv, rid; phandle_t node; sc = device_get_softc(dev); sc->dev = dev; sc->bus_addr = iicbus_get_addr(dev); node = ofw_bus_get_node(sc->dev); - dname = device_get_name(dev); - dunit = device_get_unit(dev); rv = 0; LOCK_INIT(sc); diff --git a/sys/arm/nvidia/as3722_gpio.c b/sys/arm/nvidia/as3722_gpio.c index 1afdb8a94f8b..b46aef2af795 100644 --- a/sys/arm/nvidia/as3722_gpio.c +++ b/sys/arm/nvidia/as3722_gpio.c @@ -381,10 +381,8 @@ as3722_gpio_pin_getflags(device_t dev, uint32_t pin, uint32_t *out_flags) static int as3722_gpio_get_mode(struct as3722_softc *sc, uint32_t pin, uint32_t gpio_flags) { - uint8_t ctrl; int flags; - ctrl = sc->gpio_pins[pin]->pin_ctrl_reg; flags = sc->gpio_pins[pin]->pin_cfg_flags; /* Tristate mode. */ diff --git a/sys/arm/nvidia/tegra124/tegra124_clk_pll.c b/sys/arm/nvidia/tegra124/tegra124_clk_pll.c index d6aa55f8efe0..a19c739a02fb 100644 --- a/sys/arm/nvidia/tegra124/tegra124_clk_pll.c +++ b/sys/arm/nvidia/tegra124/tegra124_clk_pll.c @@ -560,14 +560,11 @@ plle_enable(struct pll_sc *sc) { uint32_t reg; int rv; - struct mnp_bits *mnp_bits; uint32_t pll_m = 1; uint32_t pll_n = 200; uint32_t pll_p = 13; uint32_t pll_cml = 13; - mnp_bits = &sc->mnp_bits; - /* Disable lock override. */ RD4(sc, sc->base_reg, ®); reg &= ~PLLE_BASE_LOCK_OVERRIDE; @@ -1030,7 +1027,6 @@ tegra124_pll_recalc(struct clknode *clk, uint64_t *freq) struct pll_sc *sc; uint32_t m, n, p, pr; uint32_t reg, misc_reg; - int locked; sc = clknode_get_softc(clk); @@ -1042,13 +1038,12 @@ tegra124_pll_recalc(struct clknode *clk, uint64_t *freq) p = reg_to_pdiv(sc, pr); else p = 2 * (pr - 1); - locked = is_locked(sc); dprintf("%s: %s (0x%08x, 0x%08x) - m: %d, n: %d, p: %d (%d): " "e: %d, r: %d, o: %d - %s\n", __func__, clknode_get_name(clk), reg, misc_reg, m, n, p, pr, (reg >> 30) & 1, (reg >> 29) & 1, (reg >> 28) & 1, - locked ? "locked" : "unlocked"); + is_locked(sc) ? "locked" : "unlocked"); if ((m == 0) || (n == 0) || (p == 0)) { *freq = 0; diff --git a/sys/arm/nvidia/tegra124/tegra124_coretemp.c b/sys/arm/nvidia/tegra124/tegra124_coretemp.c index 1ed592cc04ba..a6d9607146c0 100644 --- a/sys/arm/nvidia/tegra124/tegra124_coretemp.c +++ b/sys/arm/nvidia/tegra124/tegra124_coretemp.c @@ -245,9 +245,6 @@ tegra124_coretemp_attach(device_t dev) static int tegra124_coretemp_detach(device_t dev) { - struct tegra124_coretemp_softc *sc; - - sc = device_get_softc(dev); return (0); } diff --git a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c index 629d8a7b8cfb..fe14f62c3c40 100644 --- a/sys/arm/nvidia/tegra124/tegra124_cpufreq.c +++ b/sys/arm/nvidia/tegra124/tegra124_cpufreq.c @@ -293,7 +293,7 @@ static int tegra124_cpufreq_settings(device_t dev, struct cf_setting *sets, int *count) { struct tegra124_cpufreq_softc *sc; - int i, j, max_cnt; + int i, j; if (sets == NULL || count == NULL) return (EINVAL); @@ -301,7 +301,6 @@ tegra124_cpufreq_settings(device_t dev, struct cf_setting *sets, int *count) sc = device_get_softc(dev); memset(sets, CPUFREQ_VAL_UNKNOWN, sizeof(*sets) * (*count)); - max_cnt = min(sc->nspeed_points, *count); for (i = 0, j = sc->nspeed_points - 1; j >= 0; j--) { if (sc->cpu_max_freq < sc->speed_points[j].freq) continue; diff --git a/sys/arm/nvidia/tegra_efuse.c b/sys/arm/nvidia/tegra_efuse.c index e18fd9c3a274..226f694fe8b2 100644 --- a/sys/arm/nvidia/tegra_efuse.c +++ b/sys/arm/nvidia/tegra_efuse.c @@ -334,7 +334,6 @@ tegra210_init(struct tegra_efuse_softc *sc, struct tegra_sku_info *sku) { int i, threshold, speedo_rev; uint32_t cpu_speedo[3], soc_speedo[3]; - uint32_t cpu_iddq, soc_iddq, gpu_iddq; cpu_speedo[0] = RD4(sc, TEGRA210_FUSE_CPU_SPEEDO_0); cpu_speedo[1] = RD4(sc, TEGRA210_FUSE_CPU_SPEEDO_1); @@ -348,10 +347,6 @@ tegra210_init(struct tegra_efuse_softc *sc, struct tegra_sku_info *sku) sku->soc_iddq_value = RD4(sc, TEGRA210_FUSE_SOC_IDDQ); sku->gpu_iddq_value = RD4(sc, TEGRA210_FUSE_GPU_IDDQ); - cpu_iddq = RD4(sc, TEGRA210_FUSE_CPU_IDDQ) * 4; - soc_iddq = RD4(sc, TEGRA210_FUSE_SOC_IDDQ) * 4; - gpu_iddq = RD4(sc, TEGRA210_FUSE_GPU_IDDQ) * 5; - speedo_rev = tegra210_get_speedo_revision(sc); device_printf(sc->dev, " Speedo revision: %u\n", speedo_rev); @@ -444,12 +439,10 @@ static int tegra_efuse_attach(device_t dev) { int rv, rid; - phandle_t node; struct tegra_efuse_softc *sc; sc = device_get_softc(dev); sc->dev = dev; - node = ofw_bus_get_node(dev); sc->soc = (struct efuse_soc *)ofw_bus_search_compatible(dev, compat_data)->ocd_data; diff --git a/sys/arm/nvidia/tegra_ehci.c b/sys/arm/nvidia/tegra_ehci.c index 058cbe7c5fb9..d3c97c117842 100644 --- a/sys/arm/nvidia/tegra_ehci.c +++ b/sys/arm/nvidia/tegra_ehci.c @@ -150,11 +150,9 @@ tegra_ehci_attach(device_t dev) ehci_softc_t *esc; int rv, rid; uint64_t freq; - phandle_t node; sc = device_get_softc(dev); sc->dev = dev; - node = ofw_bus_get_node(dev); esc = &sc->ehci_softc; /* Allocate resources. */ diff --git a/sys/arm/nvidia/tegra_i2c.c b/sys/arm/nvidia/tegra_i2c.c index 02db5218b883..359b51e2609b 100644 --- a/sys/arm/nvidia/tegra_i2c.c +++ b/sys/arm/nvidia/tegra_i2c.c @@ -742,7 +742,6 @@ static int tegra_i2c_detach(device_t dev) { struct tegra_i2c_softc *sc; - int rv; sc = device_get_softc(dev); tegra_i2c_hw_init(sc); @@ -755,7 +754,7 @@ tegra_i2c_detach(device_t dev) LOCK_DESTROY(sc); if (sc->iicbus) - rv = device_delete_child(dev, sc->iicbus); + device_delete_child(dev, sc->iicbus); return (bus_generic_detach(dev)); } diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index ec8f361cff7f..707579b9e44f 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -710,12 +710,6 @@ static int tegra_pcib_msi_setup_intr(device_t dev, struct intr_irqsrc *isrc, struct resource *res, struct intr_map_data *data) { - struct tegra_pcib_softc *sc; - struct tegra_pcib_irqsrc *tgi; - - sc = device_get_softc(dev); - tgi = (struct tegra_pcib_irqsrc *)isrc; - if (data == NULL || data->type != INTR_MAP_DATA_MSI) return (ENOTSUP); diff --git a/sys/arm/nvidia/tegra_pinmux.c b/sys/arm/nvidia/tegra_pinmux.c index 17356233306f..633485ee7b6a 100644 --- a/sys/arm/nvidia/tegra_pinmux.c +++ b/sys/arm/nvidia/tegra_pinmux.c @@ -702,7 +702,6 @@ static int pinmux_configure(device_t dev, phandle_t cfgxref) { struct pinmux_softc *sc; phandle_t node, cfgnode; - int rv; sc = device_get_softc(dev); cfgnode = OF_node_from_xref(cfgxref); @@ -710,7 +709,7 @@ static int pinmux_configure(device_t dev, phandle_t cfgxref) for (node = OF_child(cfgnode); node != 0; node = OF_peer(node)) { if (!ofw_bus_node_status_okay(node)) continue; - rv = pinmux_process_node(sc, node); + pinmux_process_node(sc, node); } return (0); } diff --git a/sys/arm64/nvidia/tegra210/max77620.c b/sys/arm64/nvidia/tegra210/max77620.c index d35948fbfb60..329e8b94322a 100644 --- a/sys/arm64/nvidia/tegra210/max77620.c +++ b/sys/arm64/nvidia/tegra210/max77620.c @@ -383,16 +383,13 @@ static int max77620_attach(device_t dev) { struct max77620_softc *sc; - const char *dname; - int dunit, rv, rid; + int rv, rid; phandle_t node; sc = device_get_softc(dev); sc->dev = dev; sc->bus_addr = iicbus_get_addr(dev); node = ofw_bus_get_node(sc->dev); - dname = device_get_name(dev); - dunit = device_get_unit(dev); rv = 0; LOCK_INIT(sc); diff --git a/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c b/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c index 64e3f6623d29..1f984fe4fcdd 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c +++ b/sys/arm64/nvidia/tegra210/tegra210_clk_pll.c @@ -753,13 +753,10 @@ plle_enable(struct pll_sc *sc) { uint32_t reg; int rv; - struct mnp_bits *mnp_bits; uint32_t pll_m = 2; uint32_t pll_n = 125; uint32_t pll_cml = 14; - mnp_bits = &sc->mnp_bits; - /* Disable lock override. */ RD4(sc, sc->base_reg, ®); reg &= ~PLLE_BASE_LOCK_OVERRIDE; diff --git a/sys/arm64/nvidia/tegra210/tegra210_coretemp.c b/sys/arm64/nvidia/tegra210/tegra210_coretemp.c index 0b637954eceb..6f7323f6d6ce 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_coretemp.c +++ b/sys/arm64/nvidia/tegra210/tegra210_coretemp.c @@ -249,9 +249,6 @@ tegra210_coretemp_attach(device_t dev) static int tegra210_coretemp_detach(device_t dev) { - struct tegra210_coretemp_softc *sc; - - sc = device_get_softc(dev); return (0); } diff --git a/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c b/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c index 4519dc3ca9d6..f92fb4edcf96 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c +++ b/sys/arm64/nvidia/tegra210/tegra210_cpufreq.c @@ -251,7 +251,7 @@ static int tegra210_cpufreq_settings(device_t dev, struct cf_setting *sets, int *count) { struct tegra210_cpufreq_softc *sc; - int i, j, max_cnt; + int i, j; if (sets == NULL || count == NULL) return (EINVAL); @@ -259,7 +259,6 @@ tegra210_cpufreq_settings(device_t dev, struct cf_setting *sets, int *count) sc = device_get_softc(dev); memset(sets, CPUFREQ_VAL_UNKNOWN, sizeof(*sets) * (*count)); - max_cnt = min(sc->nspeed_points, *count); for (i = 0, j = sc->nspeed_points - 1; j >= 0; j--) { if (sc->cpu_max_freq < sc->speed_points[j].freq) continue; diff --git a/sys/arm64/nvidia/tegra210/tegra210_pinmux.c b/sys/arm64/nvidia/tegra210/tegra210_pinmux.c index 9f4f05368026..d990ce729d39 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_pinmux.c +++ b/sys/arm64/nvidia/tegra210/tegra210_pinmux.c @@ -669,7 +669,6 @@ static int pinmux_configure(device_t dev, phandle_t cfgxref) { struct pinmux_softc *sc; phandle_t node, cfgnode; - int rv; sc = device_get_softc(dev); cfgnode = OF_node_from_xref(cfgxref); @@ -678,7 +677,7 @@ static int pinmux_configure(device_t dev, phandle_t cfgxref) for (node = OF_child(cfgnode); node != 0; node = OF_peer(node)) { if (!ofw_bus_node_status_okay(node)) continue; - rv = pinmux_process_node(sc, node); + pinmux_process_node(sc, node); } return (0); } diff --git a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c index 4ecbceb98049..92e554b61bb4 100644 --- a/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c +++ b/sys/arm64/nvidia/tegra210/tegra210_xusbpadctl.c @@ -1745,7 +1745,6 @@ process_port(struct padctl_softc *sc, phandle_t node) { struct padctl_port *port; - struct padctl_pad *pad; char *name; int rv; @@ -1792,7 +1791,6 @@ process_port(struct padctl_softc *sc, phandle_t node) goto end; } - pad = port->lane->pad; if (port->type == PADCTL_PORT_USB3) { rv = OF_getencprop(node, "nvidia,usb2-companion", &(port->companion), sizeof(port->companion));