]> xenbits.xensource.com Git - people/royger/freebsd.git/commitdiff
Fix "set but not used" in smartpqi. The PCI_MEM macros don't require a
authorScott Long <scottl@FreeBSD.org>
Sat, 26 Feb 2022 17:25:43 +0000 (10:25 -0700)
committerWarner Losh <imp@FreeBSD.org>
Wed, 9 Mar 2022 20:52:23 +0000 (13:52 -0700)
physical/absolute address in FreeBSD, but it looks like the calling
code might be somewhat portable to other OS's that do require this.
Therefore, set the variables to __unused instead of removing the code
entirely.

(cherry picked from commit e28289ca83673d753b7e479810947f6a1015ad39)

sys/dev/smartpqi/smartpqi_helper.c
sys/dev/smartpqi/smartpqi_init.c

index 809677c7cc1eed5e42f7564f76b896ba7d45f038..b49fb2d5a718e61e92aa1784dcdc5bc47425668b 100644 (file)
@@ -98,7 +98,7 @@ void
 pqisrc_configure_legacy_intx(pqisrc_softstate_t *softs, boolean_t enable_intx)
 {
        uint32_t intx_mask;
-       uint32_t *reg_addr = NULL;
+       uint32_t *reg_addr __unused;
 
        DBG_FUNC("IN\n");
 
index 1f127cff21ecbedbcfe70c9add52385f25890bc4..6a9cca23f72d38d6144cad8dc8fb6bb30450fadf 100644 (file)
@@ -590,7 +590,7 @@ pqisrc_process_config_table(pqisrc_softstate_t *softs)
        int ret = PQI_STATUS_FAILURE;
        uint32_t config_table_size;
        uint32_t section_off;
-       uint8_t *config_table_abs_addr;
+       uint8_t *config_table_abs_addr __unused;
        struct pqi_conf_table *conf_table;
        struct pqi_conf_table_section_header *section_hdr;