git: 09b966ee7c63 - main - Mark cfg as __unused to avoid ifdef soup

From: Warner Losh <imp_at_FreeBSD.org>
Date: Tue, 05 Apr 2022 04:32:29 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=09b966ee7c6389db635f793377cc50cb2fcb4962

commit 09b966ee7c6389db635f793377cc50cb2fcb4962
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2022-04-05 02:11:40 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2022-04-05 04:29:51 +0000

    Mark cfg as __unused to avoid ifdef soup
    
    Sponsored by:           Netflix
---
 sys/dev/pci/pci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 6f3bae13d791..535d4f6f3f3b 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -5645,7 +5645,7 @@ pci_release_resource(device_t dev, device_t child, int type, int rid,
 {
 	struct pci_devinfo *dinfo;
 	struct resource_list *rl;
-	pcicfgregs *cfg;
+	pcicfgregs *cfg __unused;
 
 	if (device_get_parent(child) != dev)
 		return (BUS_RELEASE_RESOURCE(device_get_parent(dev), child,
@@ -5655,7 +5655,7 @@ pci_release_resource(device_t dev, device_t child, int type, int rid,
 	cfg = &dinfo->cfg;
 
 #ifdef PCI_IOV
-	if (dinfo->cfg.flags & PCICFG_VF) {
+	if (cfg->flags & PCICFG_VF) {
 		switch (type) {
 		/* VFs can't have I/O BARs. */
 		case SYS_RES_IOPORT: