Page MenuHomeFreeBSD

LinuxKPI: pci: use unsigned int for vendor/device arguemnts
ClosedPublic

Authored by bz on Jul 31 2025, 7:29 AM.
Tags
None
Referenced Files
F150054327: D51652.id.diff
Sun, Mar 29, 1:01 AM
Unknown Object (File)
Fri, Mar 27, 8:30 PM
Unknown Object (File)
Thu, Mar 26, 10:39 PM
Unknown Object (File)
Tue, Mar 24, 7:16 PM
Unknown Object (File)
Sat, Feb 28, 5:39 AM
Unknown Object (File)
Feb 25 2026, 4:09 PM
Unknown Object (File)
Feb 21 2026, 8:45 PM
Unknown Object (File)
Feb 8 2026, 12:05 PM
Subscribers

Details

Summary

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

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable