git: b7fe00faea88 - main - powerpc pmu: Quiet set but unused warnings.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 12 Apr 2022 21:59:24 UTC
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=b7fe00faea88999f99b29af30c11755c4c2fad7f commit b7fe00faea88999f99b29af30c11755c4c2fad7f Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2022-04-12 21:58:58 +0000 Commit: John Baldwin <jhb@FreeBSD.org> 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);