Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Apr 2022 04:32:29 GMT
From:      Warner Losh <imp@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 09b966ee7c63 - main - Mark cfg as __unused to avoid ifdef soup
Message-ID:  <202204050432.2354WT5m009062@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202204050432.2354WT5m009062>