kernel: Remove unused variables in ACPI code (and add a __debugvar).
authorSascha Wildner <saw@online.de>
Thu, 3 Jan 2013 21:23:37 +0000 (22:23 +0100)
committerSascha Wildner <saw@online.de>
Thu, 3 Jan 2013 21:24:00 +0000 (22:24 +0100)
sys/dev/acpica/acpi_fujitsu/acpi_fujitsu.c
sys/dev/acpica/acpi_resource.c
sys/dev/acpica/acpi_smbat.c
sys/dev/acpica/acpi_video/acpi_video.c

index 23749a6..5c28085 100644 (file)
@@ -564,9 +564,6 @@ static uint8_t
 acpi_fujitsu_check_hardware(struct acpi_fujitsu_softc *sc)
 {
        int val;
-       struct acpi_softc *acpi_sc;
-
-       acpi_sc = acpi_device_get_parent_softc(sc->dev);
 
        ACPI_SERIAL_ASSERT(fujitsu);
        /* save the hotkey bitmask */
index e3bc569..2283c53 100644 (file)
@@ -58,7 +58,8 @@ acpi_lookup_irq_handler(ACPI_RESOURCE *res, void *context)
 {
     struct lookup_irq_request *req;
     size_t len;
-    u_int irqnum, irq;
+    u_int irqnum;
+    u_int irq __debugvar;
 
     switch (res->Type) {
     case ACPI_RESOURCE_TYPE_IRQ:
index b903fe6..f2fb5d4 100644 (file)
@@ -344,7 +344,7 @@ acpi_smbat_get_bst(device_t dev, struct acpi_bst *bst)
 {
        struct acpi_smbat_softc *sc;
        int error;
-       uint32_t cap_units, factor;
+       uint32_t factor;
        int16_t val;
        uint8_t addr;
 
@@ -361,13 +361,10 @@ acpi_smbat_get_bst(device_t dev, struct acpi_bst *bst)
 
        if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_BATTERY_MODE, &val))
                goto out;
-       if (val & SMBATT_BM_CAPACITY_MODE) {
+       if (val & SMBATT_BM_CAPACITY_MODE)
                factor = 10;
-               cap_units = ACPI_BIF_UNITS_MW;
-       } else {
+       else
                factor = 1;
-               cap_units = ACPI_BIF_UNITS_MA;
-       }
 
        /* get battery status */
        if (acpi_smbus_read_2(sc, addr, SMBATT_CMD_BATTERY_STATUS, &val))
index ddb0491..298a25f 100644 (file)
@@ -398,15 +398,10 @@ acpi_video_vo_init(UINT32 adr)
 {
        struct acpi_video_output *vn, *vo, *vp;
        int n, x;
-       int display_index;
-       int display_port;
        char name[8], env[32];
        const char *type, *desc;
        struct acpi_video_output_queue *voqh;
 
-       display_index = adr & DOD_DEVID_MASK_DISPIDX;
-       display_port = (adr & DOD_DEVID_MASK_DISPPORT) >> 4;
-
        switch (adr & DOD_DEVID_MASK) {
        case DOD_DEVID_MONITOR:
                if ((adr & DOD_DEVID_MASK_FULL) == DOD_DEVID_LCD) {