From nobody Tue Apr 12 21:59:24 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 740761AFBF1A; Tue, 12 Apr 2022 21:59:26 +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 4KdKPm6x08z4hsf; Tue, 12 Apr 2022 21:59:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649800766; 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=vz58aszYK1SAKTwes4xkZOz9Bkotd75BMHKFhBCRdjc=; b=Ol0tP9k2xZJhfqYzgynit86gBtS+mxrIEPRLRbPGm0+QNikNMasMpM6xo/F58jv/Yry5VJ ojdqmyk3HkjR+W596p9fBYSn6cpJCytcktBaP6R5DHBOsy54HDp33E7IHXCe9fSbOvRS+0 db3gx29mgRYXdhuGwJJAbv3BcQqzYT+f8we37I3V74ToxIuz5b/LfV5tydgfQizPFJ/rH0 5y1fS1pWO6QQTWD+jYzdLY+hsPES1TmAZRrSgk9IKrTcJf2uveTOCj/vCBgqBAntKjeYVI g9Sk0VcZ8GV+QQBf/GYDUddbbz5qCIZ6ts+U+1Sn+PUvYJbayu1f056KnRiRIA== 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 450D11F45A; Tue, 12 Apr 2022 21:59:24 +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 23CLxO4u035477; Tue, 12 Apr 2022 21:59:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23CLxOGI035476; Tue, 12 Apr 2022 21:59:24 GMT (envelope-from git) Date: Tue, 12 Apr 2022 21:59:24 GMT Message-Id: <202204122159.23CLxOGI035476@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: b7fe00faea88 - main - powerpc pmu: Quiet set but unused warnings. 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: b7fe00faea88999f99b29af30c11755c4c2fad7f Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649800766; 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=vz58aszYK1SAKTwes4xkZOz9Bkotd75BMHKFhBCRdjc=; b=i/HjGCr6divh7/iCIJB0d0ck3YGnacDApCrOu9lb+gGE9GuohnAoUO5YfhEXQoxyaDPeql OLOwjZQgAoI9EzXE9BrfKhVdcfd+X/vGOi/0eIEwoyH93S7mM7O1BBoWh5aOdaN/9i4OEl WOkHMB8iWBkZld9w8eqZTTrvmPZvRuMEkaYAAesycQ5mZYhOJkNw/zDx1lJ2VaSAHCdhEt kZQei46sw+bijyTO3MHudU3gy5hA2soD+ESUHZ7vbUsjcy2LT3pjjVFB9Zk6ODunj48oB3 Uf3VM7D5rGKBWXJyhZvPgI4+26CN06+A6ETNU4rFVcOouDrr6Id1NC3CrgzsjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649800766; a=rsa-sha256; cv=none; b=hO+ZvpXAbNcdd63aGoNbhPDxMkyx/rEnjSd0BSgXBUn2xQPwltv/g7FVUXix7F7CGKxkFC GVZUJdnP4mfyJzYrHIhmIOayZc6hAp/U7LyZuOyCo7anSIaztZ6HdUNwilN0TrSC2XsRfN DwrQ1rP6EOPG2gocBIsqLMvnmIFtG5l2TbcW2cdgTLAFILHnx0CeZtZF4gIN19WHemTBGw GDfo/uy4xWny8VRT8ppuQOTP3kTQFJxG0Yo0tCyFNZJ8RPs+6Hdr6CySUh6d2iLi8ILWk2 8vAER6G4HBgw++JWDxG4gvTlE8lqA7kBZG/z+5Efh0RLQlYcLxZ3Rb24NFFFTQ== 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=b7fe00faea88999f99b29af30c11755c4c2fad7f commit b7fe00faea88999f99b29af30c11755c4c2fad7f Author: John Baldwin AuthorDate: 2022-04-12 21:58:58 +0000 Commit: John Baldwin CommitDate: 2022-04-12 21:58:58 +0000 powerpc pmu: Quiet set but unused warnings. - Remove unused variables. - Replace a dummy variable with a void cast. --- sys/powerpc/powermac/pmu.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/powerpc/powermac/pmu.c b/sys/powerpc/powermac/pmu.c index ae01b9251b11..642206fd4f78 100644 --- a/sys/powerpc/powermac/pmu.c +++ b/sys/powerpc/powermac/pmu.c @@ -577,9 +577,8 @@ pmu_send_byte(struct pmu_softc *sc, uint8_t data) static inline int pmu_read_byte(struct pmu_softc *sc, uint8_t *data) { - volatile uint8_t scratch; pmu_in(sc); - scratch = pmu_read_reg(sc, vSR); + (void)pmu_read_reg(sc, vSR); pmu_ack_off(sc); /* wait for intr to come up */ do {} while (pmu_intr_state(sc) == 0); @@ -764,7 +763,7 @@ pmu_adb_send(device_t dev, u_char command_byte, int len, u_char *data, u_char poll) { struct pmu_softc *sc = device_get_softc(dev); - int i,replen; + int i; uint8_t packet[16], resp[16]; /* construct an ADB command packet and send it */ @@ -777,7 +776,7 @@ pmu_adb_send(device_t dev, u_char command_byte, int len, u_char *data, packet[i + 3] = data[i]; mtx_lock(&sc->sc_mutex); - replen = pmu_send(sc, PMU_ADB_CMD, len + 3, packet, 16, resp); + pmu_send(sc, PMU_ADB_CMD, len + 3, packet, 16, resp); mtx_unlock(&sc->sc_mutex); if (poll) @@ -988,10 +987,8 @@ pmu_battquery_proc(void) static int pmu_battmon(SYSCTL_HANDLER_ARGS) { - struct pmu_softc *sc; int error, result; - sc = arg1; result = pmu_battmon_enabled; error = sysctl_handle_int(oidp, &result, 0, req);