From nobody Fri Dec 10 12:11:05 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 35DF918CBEFB; Fri, 10 Dec 2021 12:11:06 +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 4J9V9j5rvTz3pBb; Fri, 10 Dec 2021 12:11:05 +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 A82C01A495; Fri, 10 Dec 2021 12:11:05 +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 1BACB5kf041855; Fri, 10 Dec 2021 12:11:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BACB5KQ041854; Fri, 10 Dec 2021 12:11:05 GMT (envelope-from git) Date: Fri, 10 Dec 2021 12:11:05 GMT Message-Id: <202112101211.1BACB5KQ041854@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: 5b616dafacfa - main - Fix set but not used warnings in arm64 core code 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: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5b616dafacfa249cf5b88d19fa1746c15e5e9a84 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1639138265; 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=IvYp7/P/hc3f7jO2ZcEoHw5TF2XZ5rxHJpQ2uVuuNbk=; b=GlTTMHrtTIDAvbi9twddBWwYnM6tQXXFUuF7BpYb2O62Wu/S/TNrFezqi9Wu5p+rwHOhC6 VBepGRho1T+4WO3YuIdftwhJ2+7ihNSxLmPoaY/iTmhC/EicnTUO58X4z00ylojccGKzXK LYPULKNpldPfTscOMiYQq+IZv2mR/dPII7BIYra3ldFqyHPXzDnDPvwD2bqyNKGypxD2rl 3ZqG31Or/dIB0n/CYG+GHxkd+scdNR3cihmF5uS1zvM6o+FQilmDpCI4j+wCrMAXfyH7j1 vn2f3C8IexTfGGS5DSkckcpr70Eloie9CmV3CQtYds116PLEPYPtzN1w85TXAg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1639138265; a=rsa-sha256; cv=none; b=qyUYxFaFGbAotFQ1CgIEgXYuGRmdZ6kL2Al5j5YKZQ2o36B8urkIOvss4GjfMx8xydha2K YuixX9qShJrng5rNMtVWoYJSK2ig8ZhzmDCZsXiihZeqFBfhVZRrOHfa5UtNnCpHiT8uoP Jh6Sv8y5wV9iVUsU+skvbNkjcI8rbAo0ZU9bU/KWUTInJ8nqkBP+ZvnZyTSYI4iWvMtMSg DYdXcjC01RBM+/efIWgq/Jkrm6cSfrImUOY2e1e4GGVnoQdluxknVxIWcrh8RLO40gsGH9 4SmA/EBbghP3ZTU1PmddjqqfE3pIyhSifAIOtoND3KwNtk2Za9+lyCPZrmzFfA== 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=5b616dafacfa249cf5b88d19fa1746c15e5e9a84 commit 5b616dafacfa249cf5b88d19fa1746c15e5e9a84 Author: Andrew Turner AuthorDate: 2021-12-10 12:06:25 +0000 Commit: Andrew Turner CommitDate: 2021-12-10 12:10:30 +0000 Fix set but not used warnings in arm64 core code --- sys/arm64/arm64/busdma_bounce.c | 8 +++++++- sys/arm64/arm64/elf32_machdep.c | 2 ++ sys/arm64/arm64/exec_machdep.c | 2 -- sys/arm64/arm64/freebsd32_machdep.c | 4 ---- sys/arm64/arm64/gic_v3.c | 4 ---- sys/arm64/arm64/gicv3_its.c | 4 ---- sys/arm64/arm64/mp_machdep.c | 2 -- 7 files changed, 9 insertions(+), 17 deletions(-) diff --git a/sys/arm64/arm64/busdma_bounce.c b/sys/arm64/arm64/busdma_bounce.c index d2e63d7b72d8..b2d00b9c0abd 100644 --- a/sys/arm64/arm64/busdma_bounce.c +++ b/sys/arm64/arm64/busdma_bounce.c @@ -338,11 +338,17 @@ bounce_bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment, static int bounce_bus_dma_tag_destroy(bus_dma_tag_t dmat) { - bus_dma_tag_t dmat_copy, parent; +#ifdef KTR + bus_dma_tag_t dmat_copy; +#endif + bus_dma_tag_t parent; int error; error = 0; +#ifdef KTR dmat_copy = dmat; +#endif + if (dmat != NULL) { if (dmat->map_count != 0) { diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index ec1afd2d7b3e..c528de5c2e62 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -204,6 +204,8 @@ freebsd32_fetch_syscall_args(struct thread *td) panic("Too many system call arguiments"); error = copyin((void *)td->td_frame->tf_x[13], args, (narg - nap) * sizeof(int)); + if (error != 0) + return (error); for (i = 0; i < (narg - nap); i++) sa->args[i + nap] = args[i]; } diff --git a/sys/arm64/arm64/exec_machdep.c b/sys/arm64/arm64/exec_machdep.c index 25fd9401df8c..b4ac8887ab72 100644 --- a/sys/arm64/arm64/exec_machdep.c +++ b/sys/arm64/arm64/exec_machdep.c @@ -211,11 +211,9 @@ set_dbregs(struct thread *td, struct dbreg *regs) struct debug_monitor_state *monitor; uint64_t addr; uint32_t ctrl; - int count; int i; monitor = &td->td_pcb->pcb_dbg_regs; - count = 0; monitor->dbg_enable_count = 0; for (i = 0; i < DBG_BRP_MAX; i++) { diff --git a/sys/arm64/arm64/freebsd32_machdep.c b/sys/arm64/arm64/freebsd32_machdep.c index cab778747113..81b4ef9ebedb 100644 --- a/sys/arm64/arm64/freebsd32_machdep.c +++ b/sys/arm64/arm64/freebsd32_machdep.c @@ -165,11 +165,9 @@ set_fpcontext32(struct thread *td, mcontext32_vfp_t *mcp) static void get_mcontext32(struct thread *td, mcontext32_t *mcp, int flags) { - struct pcb *pcb; struct trapframe *tf; int i; - pcb = td->td_pcb; tf = td->td_frame; if ((flags & GET_MC_CLEAR_RET) != 0) { @@ -315,14 +313,12 @@ freebsd32_sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) struct sysentvec *sysent; int onstack; int sig; - int code; siginfo_to_siginfo32(&ksi->ksi_info, &siginfo); td = curthread; p = td->td_proc; PROC_LOCK_ASSERT(p, MA_OWNED); sig = ksi->ksi_signo; - code = ksi->ksi_code; psp = p->p_sigacts; mtx_assert(&psp->ps_mtx, MA_OWNED); tf = td->td_frame; diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c index 7d9160f8ae17..27f41c58fe92 100644 --- a/sys/arm64/arm64/gic_v3.c +++ b/sys/arm64/arm64/gic_v3.c @@ -489,10 +489,6 @@ gic_v3_read_ivar(device_t dev, device_t child, int which, uintptr_t *result) static int gic_v3_write_ivar(device_t dev, device_t child, int which, uintptr_t value) { - struct gic_v3_softc *sc; - - sc = device_get_softc(dev); - switch(which) { case GICV3_IVAR_NIRQS: case GICV3_IVAR_REDIST: diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c index 0f30ca746e9e..516cfbd9e358 100644 --- a/sys/arm64/arm64/gicv3_its.c +++ b/sys/arm64/arm64/gicv3_its.c @@ -1025,9 +1025,7 @@ static void gicv3_its_pre_ithread(device_t dev, struct intr_irqsrc *isrc) { struct gicv3_its_irqsrc *girq; - struct gicv3_its_softc *sc; - sc = device_get_softc(dev); girq = (struct gicv3_its_irqsrc *)isrc; gic_icc_write(EOIR1, girq->gi_lpi + GIC_FIRST_LPI); } @@ -1042,9 +1040,7 @@ static void gicv3_its_post_filter(device_t dev, struct intr_irqsrc *isrc) { struct gicv3_its_irqsrc *girq; - struct gicv3_its_softc *sc; - sc = device_get_softc(dev); girq = (struct gicv3_its_irqsrc *)isrc; gic_icc_write(EOIR1, girq->gi_lpi + GIC_FIRST_LPI); } diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c index 4eebfe219934..05e8c8efe5b4 100644 --- a/sys/arm64/arm64/mp_machdep.c +++ b/sys/arm64/arm64/mp_machdep.c @@ -710,12 +710,10 @@ cpu_mp_announce(void) static void cpu_count_acpi_handler(ACPI_SUBTABLE_HEADER *entry, void *arg) { - ACPI_MADT_GENERIC_INTERRUPT *intr; u_int *cores = arg; switch(entry->Type) { case ACPI_MADT_TYPE_GENERIC_INTERRUPT: - intr = (ACPI_MADT_GENERIC_INTERRUPT *)entry; (*cores)++; break; default: