From nobody Fri Nov 19 00:02:39 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1D094188F762; Fri, 19 Nov 2021 00:02:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HwH0w3TNwz3Brr; Fri, 19 Nov 2021 00:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C60E11E705; Fri, 19 Nov 2021 00:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AJ02d06072530; Fri, 19 Nov 2021 00:02:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02dXt072529; Fri, 19 Nov 2021 00:02:39 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:39 GMT Message-Id: <202111190002.1AJ02dXt072529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: dc70c937b1d6 - stable/13 - LinuxKPI: pci.h / linux_pci.c rename pci_driver field List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dc70c937b1d6972d8774cea69da7983bb447622c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=dc70c937b1d6972d8774cea69da7983bb447622c commit dc70c937b1d6972d8774cea69da7983bb447622c Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 17:15:01 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: pci.h / linux_pci.c rename pci_driver field Rename the struct pci_driver {} field to the list_head from links to node as a driver is actually initialsing this to {} which seems questionable but it will at least make us match the Linux structure field name. Reviewed by: manu, hselasky (cherry picked from commit cf899348420ce8839e32ddc30247b5d1c2b384f4) --- sys/compat/linuxkpi/common/include/linux/pci.h | 2 +- sys/compat/linuxkpi/common/src/linux_pci.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 4914bc247ebc..b2b87f993c1f 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -193,7 +193,7 @@ typedef int pci_power_t; struct pci_dev; struct pci_driver { - struct list_head links; + struct list_head node; char *name; const struct pci_device_id *id_table; int (*probe)(struct pci_dev *dev, const struct pci_device_id *id); diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 780ba38d18dd..db94bc08239e 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -242,7 +242,7 @@ linux_pci_find(device_t dev, const struct pci_device_id **idp) subdevice = pci_get_subdevice(dev); spin_lock(&pci_lock); - list_for_each_entry(pdrv, &pci_drivers, links) { + list_for_each_entry(pdrv, &pci_drivers, node) { for (id = pdrv->id_table; id->vendor != 0; id++) { if (vendor == id->vendor && (PCI_ANY_ID == id->device || device == id->device) && @@ -640,7 +640,7 @@ _linux_pci_register_driver(struct pci_driver *pdrv, devclass_t dc) linux_set_current(curthread); spin_lock(&pci_lock); - list_add(&pdrv->links, &pci_drivers); + list_add(&pdrv->node, &pci_drivers); spin_unlock(&pci_lock); pdrv->bsddriver.name = pdrv->name; pdrv->bsddriver.methods = pci_methods; @@ -734,7 +734,7 @@ linux_pci_unregister_driver(struct pci_driver *pdrv) bus = devclass_find("pci"); spin_lock(&pci_lock); - list_del(&pdrv->links); + list_del(&pdrv->node); spin_unlock(&pci_lock); mtx_lock(&Giant); if (bus != NULL) @@ -750,7 +750,7 @@ linux_pci_unregister_drm_driver(struct pci_driver *pdrv) bus = devclass_find("vgapci"); spin_lock(&pci_lock); - list_del(&pdrv->links); + list_del(&pdrv->node); spin_unlock(&pci_lock); mtx_lock(&Giant); if (bus != NULL)