From nobody Fri Nov 19 00:02:40 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 9A65D188F930; Fri, 19 Nov 2021 00:02:44 +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 4HwH0y0jCFz4vnW; Fri, 19 Nov 2021 00:02:42 +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 E8A061E541; Fri, 19 Nov 2021 00:02:40 +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 1AJ02ekg072554; Fri, 19 Nov 2021 00:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AJ02eh5072553; Fri, 19 Nov 2021 00:02:40 GMT (envelope-from git) Date: Fri, 19 Nov 2021 00:02:40 GMT Message-Id: <202111190002.1AJ02eh5072553@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: c7fc9ca77946 - stable/13 - LinuxKPI: pci.h make pci_dev argument const for pci_{read,write}_config*() 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: c7fc9ca779468264028e20912f3e7cb2ff984641 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=c7fc9ca779468264028e20912f3e7cb2ff984641 commit c7fc9ca779468264028e20912f3e7cb2ff984641 Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 17:06:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-11-19 00:01:26 +0000 LinuxKPI: pci.h make pci_dev argument const for pci_{read,write}_config*() Make the struct pci_dev argument to the pci_{read,write}_config*() functions "const" to match the Linux definition as some drivers try to pass in a const argument which we currently fail to honor. Sponsored by: The FreeBSD Foundation (cherry picked from commit ed5600f5329fad8b167bed0a5ae8a5f60d12258e) --- sys/compat/linuxkpi/common/include/linux/pci.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index b2b87f993c1f..c6737b7b2311 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -696,7 +696,7 @@ pci_disable_link_state(struct pci_dev *pdev, uint32_t flags) } static inline int -pci_read_config_byte(struct pci_dev *pdev, int where, u8 *val) +pci_read_config_byte(const struct pci_dev *pdev, int where, u8 *val) { *val = (u8)pci_read_config(pdev->dev.bsddev, where, 1); @@ -704,7 +704,7 @@ pci_read_config_byte(struct pci_dev *pdev, int where, u8 *val) } static inline int -pci_read_config_word(struct pci_dev *pdev, int where, u16 *val) +pci_read_config_word(const struct pci_dev *pdev, int where, u16 *val) { *val = (u16)pci_read_config(pdev->dev.bsddev, where, 2); @@ -712,7 +712,7 @@ pci_read_config_word(struct pci_dev *pdev, int where, u16 *val) } static inline int -pci_read_config_dword(struct pci_dev *pdev, int where, u32 *val) +pci_read_config_dword(const struct pci_dev *pdev, int where, u32 *val) { *val = (u32)pci_read_config(pdev->dev.bsddev, where, 4); @@ -720,7 +720,7 @@ pci_read_config_dword(struct pci_dev *pdev, int where, u32 *val) } static inline int -pci_write_config_byte(struct pci_dev *pdev, int where, u8 val) +pci_write_config_byte(const struct pci_dev *pdev, int where, u8 val) { pci_write_config(pdev->dev.bsddev, where, val, 1); @@ -728,7 +728,7 @@ pci_write_config_byte(struct pci_dev *pdev, int where, u8 val) } static inline int -pci_write_config_word(struct pci_dev *pdev, int where, u16 val) +pci_write_config_word(const struct pci_dev *pdev, int where, u16 val) { pci_write_config(pdev->dev.bsddev, where, val, 2); @@ -736,7 +736,7 @@ pci_write_config_word(struct pci_dev *pdev, int where, u16 val) } static inline int -pci_write_config_dword(struct pci_dev *pdev, int where, u32 val) +pci_write_config_dword(const struct pci_dev *pdev, int where, u32 val) { pci_write_config(pdev->dev.bsddev, where, val, 4);