From nobody Thu Jul 31 17:39:01 2025 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 4btGXk2RC5z62r2p; Thu, 31 Jul 2025 17:39:02 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4btGXj5BL0z3Zkk; Thu, 31 Jul 2025 17:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753983541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sTpixAlVsZKErcrGA3BZAECVwEkAprA1MqIQ/AeE4DE=; b=uMHOuOx5dwMk3ZxuO9lYZy52yDz01InLaF+ZvvWMpMF65CYFsf5mwrcP7aTQhDP0J+fZj1 cEAM61jX7OyYLBckVYEQiE2p2JTR8Hi3G3ZoRAcKT6JPz0pWt0wUkL8KtuMUodZCkFrPGx sjzxfDbMbP5XkhWuq7TilaKtRgE5sgzhUDERNe/N0/2zTJptXGMovfRYn1Qfrk8o9BhiTK e+u6PngpTLLhNToti7eNJbS1N1AGYMyAnddPN4WgL1DQoWoVJCvX2EjARq8ftZZkYxyDJp lNQOy2MJgIlM19ulpRwFB3BJK/pIq+9gX06IbVbY6NXDs9Dxhl/vuLZ/OHjazg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753983541; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sTpixAlVsZKErcrGA3BZAECVwEkAprA1MqIQ/AeE4DE=; b=HeTdzuZF7my+NMyluPoDaOZ0nK6rk7s+UJeLNRD5UiCr6DiP5I2+LyLfqs4rjYhhiCU741 P4BDmKUo7688SkY1xWYktKN0NkVAkpW9oSwsbdN2JIbWmQXZrQvYFdi5f3FuzmBuNG2SSv JZzikX0fXzDo6TdB46QCYuvC3YtbQp9FhOMEyYaU4YGVrwY4ZewmpRtFMHIhNM0EyaeB3M TloJMpo/DxPZB3NkxD6GnhXWCw7cYZhOZtMmUYJvdSK1bSOTx3HrYZC3koFcO1zwsJt9eY /V5JBf371nT0Oc8VfXredDhA90futMekfuTz2y61kB97Y+B2qkEvgNVUU9hqVA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753983541; a=rsa-sha256; cv=none; b=vKgV2anvC4WORw1m9a4HPjalX18xRWRMipyQZgAvmgF6qsCfxFYiiXK7EXzDFm5mlLSWRO rZjAAK7tgJ4DJNFpFmer5VXCOzLYhtjQmy20YAxXynFp33AuzS5Ris2O10zySVpdUt5r0v acxjFlvw3OJHO+6sbSXepJ87EX974fEmeZny/pIjecD3ccVSN5gJUQ0zP1Y7GXXPMukgLw LwWw5GmvmPUOHUEDarCpl932ahwqQgIcGjh9/zDGjUiGUMOgNBi8+AWVHliDVDGnRMIqVn pj6Onvz/kGWLqsus+hyAVe5m4f/r9KVXO4205s7qwewFuT186dpcYE4GxZmyiw== 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 4btGXj4h1hz19sv; Thu, 31 Jul 2025 17:39:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56VHd18G015260; Thu, 31 Jul 2025 17:39:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56VHd1cV015257; Thu, 31 Jul 2025 17:39:01 GMT (envelope-from git) Date: Thu, 31 Jul 2025 17:39:01 GMT Message-Id: <202507311739.56VHd1cV015257@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: a96486531b91 - main - LinuxKPI: pci: use unsigned int for vendor/device arguments 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-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/main X-Git-Reftype: branch X-Git-Commit: a96486531b915c621947980d01decff759afc65e Auto-Submitted: auto-generated The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a96486531b915c621947980d01decff759afc65e commit a96486531b915c621947980d01decff759afc65e Author: Bjoern A. Zeeb AuthorDate: 2025-07-31 07:24:58 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-07-31 17:37:54 +0000 LinuxKPI: pci: use unsigned int for vendor/device arguments Linux drivers may pass a typed PCI_ANY_ID (-1U) in which then leads to a warning that the value gets truncated. Switch argument types to unsigned int (or uint32_t as we use in struct pci_device_id) to avoid the problem. Sponsored by: The FreeBSD Foundation Discussed in: D50008 MFC after: 3 days Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D51652 --- sys/compat/linuxkpi/common/include/linux/pci.h | 4 ++-- sys/compat/linuxkpi/common/src/linux_pci.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 059f8561c71e..ba1c0d2ac99e 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -377,7 +377,7 @@ int linuxkpi_pci_enable_msix(struct pci_dev *pdev, struct msix_entry *entries, /* Internal helper function(s). */ struct pci_dev *lkpinew_pci_dev(device_t); void lkpi_pci_devres_release(struct device *, void *); -struct pci_dev *lkpi_pci_get_device(uint16_t, uint16_t, struct pci_dev *); +struct pci_dev *lkpi_pci_get_device(uint32_t, uint32_t, struct pci_dev *); struct msi_desc *lkpi_pci_msi_desc_alloc(int); struct device *lkpi_pci_find_irq_dev(unsigned int irq); int _lkpi_pci_enable_msi_range(struct pci_dev *pdev, int minvec, int maxvec); @@ -1439,7 +1439,7 @@ err: * using pci_get_device() need to be changed to call linuxkpi_pci_get_device(). */ static inline struct pci_dev * -linuxkpi_pci_get_device(uint16_t vendor, uint16_t device, struct pci_dev *odev) +linuxkpi_pci_get_device(uint32_t vendor, uint32_t device, struct pci_dev *odev) { return (lkpi_pci_get_device(vendor, device, odev)); diff --git a/sys/compat/linuxkpi/common/src/linux_pci.c b/sys/compat/linuxkpi/common/src/linux_pci.c index 057585d9edc0..d5bbbea1eb2c 100644 --- a/sys/compat/linuxkpi/common/src/linux_pci.c +++ b/sys/compat/linuxkpi/common/src/linux_pci.c @@ -285,7 +285,7 @@ linux_pci_find(device_t dev, const struct pci_device_id **idp) } struct pci_dev * -lkpi_pci_get_device(uint16_t vendor, uint16_t device, struct pci_dev *odev) +lkpi_pci_get_device(uint32_t vendor, uint32_t device, struct pci_dev *odev) { struct pci_dev *pdev, *found;