From nobody Fri Dec 03 22:40:52 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 D2FD218CCDCB; Fri, 3 Dec 2021 22:40:53 +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 4J5STc6YtHz3rw3; Fri, 3 Dec 2021 22:40:52 +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 C100A19321; Fri, 3 Dec 2021 22:40:52 +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 1B3Meqsk007864; Fri, 3 Dec 2021 22:40:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1B3MeqEv007863; Fri, 3 Dec 2021 22:40:52 GMT (envelope-from git) Date: Fri, 3 Dec 2021 22:40:52 GMT Message-Id: <202112032240.1B3MeqEv007863@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Scott Long Subject: git: a21f086a3316 - main - Fix "set but not used" in the tws driver 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: scottl X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a21f086a3316346ba04f9381bf10e463a8328394 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638571253; 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=m/aoPDeGosUSWHmVaXcC235LxTdZodzOE4dKITWYNyY=; b=SozZXbMXnQ3iqQKqjmxYtejGlXquw2+STt+yS2Yf4Ok1KMFZ4nKoSq+37JexifA5lN0uYt xw47WUGeieKtzQKnH+v83HuW0VnG4vNyCsZWTX/RuPpAyDaWeeZdQbT6/7a9Py48jwyV+9 1jLh8SH+4BVpULpxEG+i4dUiFdvZt489UOLTDU1d+p+U9ac1aRdP2KnEePYcKiAnh4Mnmd vv9lzV4TzRd4hONnWWhp33T22MJS/xJEg4GTBza/TrH3YJk9IOvzGDUpcQofPnEZI2bT1I lgHopAh0wM115gKCKrrD1ozttFmfZLjHuVkORBT6KLkF13Wmvru6HNWYkeBVQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638571253; a=rsa-sha256; cv=none; b=bFouvM7Vm6XkIHIXIjOnC5BNU1p1PYNG4FZedFeQVdAHTIDo7CgyFT+xz6uA6XOZs9YPUA QVA4EDrbFIV7MPa4ZzaCuA5tml6HpYzAg7060vZFC+Mq0tgqRdY7kjlR11tCwfAByKB8m8 DvROLkFoRiPJkNHvoo07R+fW6lqdr7nCwI+0py3ykenLnf2Ju55y/HxbOFxLvfm5uWifz1 rhssip/nHevv7U6u9vDZ9vBhH0pFQemZ1dktDIyKiGJAKHluoYX4wzs+yw4xms3f5rL8qb Nc76eX8T9AzsUCHzchSB/sGuMINVZgBRBB/GZUk0FMdGxQDu28lkdpJpv5WkfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by scottl: URL: https://cgit.FreeBSD.org/src/commit/?id=a21f086a3316346ba04f9381bf10e463a8328394 commit a21f086a3316346ba04f9381bf10e463a8328394 Author: Scott Long AuthorDate: 2021-12-03 22:40:29 +0000 Commit: Scott Long CommitDate: 2021-12-03 22:40:29 +0000 Fix "set but not used" in the tws driver Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/dev/tws/tws.c | 9 ++++----- sys/dev/tws/tws_cam.c | 6 ++---- sys/dev/tws/tws_hdm.c | 2 +- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/sys/dev/tws/tws.c b/sys/dev/tws/tws.c index a065f7753dee..00446252b2af 100644 --- a/sys/dev/tws/tws.c +++ b/sys/dev/tws/tws.c @@ -349,7 +349,7 @@ tws_detach(device_t dev) { struct tws_softc *sc = device_get_softc(dev); int i; - u_int32_t reg; + u_int32_t reg __diagused; TWS_TRACE_DEBUG(sc, "entry", 0, 0); @@ -452,11 +452,11 @@ tws_setup_intr(struct tws_softc *sc, int irqs) int tws_teardown_intr(struct tws_softc *sc) { - int i, error; + int i; for(i=0;iirqs;i++) { if (sc->intr_handle[i]) { - error = bus_teardown_intr(sc->tws_dev, + bus_teardown_intr(sc->tws_dev, sc->irq_res[i], sc->intr_handle[i]); sc->intr_handle[i] = NULL; } @@ -509,7 +509,6 @@ tws_init(struct tws_softc *sc) u_int32_t max_sg_elements; u_int32_t dma_mem_size; - int error; u_int32_t reg; sc->seq_id = 0; @@ -569,7 +568,7 @@ tws_init(struct tws_softc *sc) /* if bus_dmamem_alloc succeeds then bus_dmamap_load will succeed */ sc->dma_mem_phys=0; - error = bus_dmamap_load(sc->cmd_tag, sc->cmd_map, sc->dma_mem, + bus_dmamap_load(sc->cmd_tag, sc->cmd_map, sc->dma_mem, dma_mem_size, tws_dmamap_cmds_load_cbfn, &sc->dma_mem_phys, 0); diff --git a/sys/dev/tws/tws_cam.c b/sys/dev/tws/tws_cam.c index 4e274df45804..7303cce99d50 100644 --- a/sys/dev/tws/tws_cam.c +++ b/sys/dev/tws/tws_cam.c @@ -1067,24 +1067,22 @@ tws_intr(void *arg) static void tws_intr_attn_aen(struct tws_softc *sc) { - u_int32_t db=0; /* maskoff db intrs until all the aens are fetched */ /* tws_disable_db_intr(sc); */ tws_fetch_aen((void *)sc); tws_write_reg(sc, TWS_I2O0_HOBDBC, TWS_BIT18, 4); - db = tws_read_reg(sc, TWS_I2O0_IOBDB, 4); + (void)tws_read_reg(sc, TWS_I2O0_IOBDB, 4); } static void tws_intr_attn_error(struct tws_softc *sc) { - u_int32_t db=0; TWS_TRACE(sc, "attn error", 0, 0); tws_write_reg(sc, TWS_I2O0_HOBDBC, ~0, 4); - db = tws_read_reg(sc, TWS_I2O0_IOBDB, 4); + (void)tws_read_reg(sc, TWS_I2O0_IOBDB, 4); device_printf(sc->tws_dev, "Micro controller error.\n"); tws_reset(sc); } diff --git a/sys/dev/tws/tws_hdm.c b/sys/dev/tws/tws_hdm.c index efad88a918a5..11d9320948a0 100644 --- a/sys/dev/tws/tws_hdm.c +++ b/sys/dev/tws/tws_hdm.c @@ -82,7 +82,7 @@ void tws_display_ctlr_info(struct tws_softc *sc); int tws_init_ctlr(struct tws_softc *sc) { - u_int64_t reg; + u_int64_t reg __diagused; u_int32_t regh, regl; TWS_TRACE_DEBUG(sc, "entry", sc, sc->is64bit);