powerpc pmu: Quiet set but unused warnings.

- Remove unused variables.

- Replace a dummy variable with a void cast.
This commit is contained in:
John Baldwin 2022-04-12 14:58:58 -07:00
parent 5f2995aa95
commit b7fe00faea

View File

@ -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);