From nobody Mon Oct 25 20:20:23 2021 X-Original-To: dev-commits-src-main@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 2B89D180FEA5; Mon, 25 Oct 2021 20:20:24 +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 4HdRCX0pCBz4s6q; Mon, 25 Oct 2021 20:20:24 +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 E4EFE7489; Mon, 25 Oct 2021 20:20:23 +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 19PKKN3r026629; Mon, 25 Oct 2021 20:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19PKKNb5026628; Mon, 25 Oct 2021 20:20:23 GMT (envelope-from git) Date: Mon, 25 Oct 2021 20:20:23 GMT Message-Id: <202110252020.19PKKNb5026628@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: ed5600f5329f - main - LinuxKPI: pci.h make pci_dev argument const for pci_{read,write}_config*() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: ed5600f5329fad8b167bed0a5ae8a5f60d12258e Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=ed5600f5329fad8b167bed0a5ae8a5f60d12258e commit ed5600f5329fad8b167bed0a5ae8a5f60d12258e Author: Bjoern A. Zeeb AuthorDate: 2021-10-25 17:06:09 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-10-25 20:17:56 +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 MFC after: 3 days Reviewed by: hselasky Differential Revision: https://reviews.freebsd.org/D32644 --- 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 2bac82de2af5..5903a402c52e 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -692,7 +692,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); @@ -700,7 +700,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); @@ -708,7 +708,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); @@ -716,7 +716,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); @@ -724,7 +724,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); @@ -732,7 +732,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);