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
Unknown Object (File)
Sun, Oct 12, 1:13 AM
Unknown Object (File)
Sat, Oct 11, 3:42 PM
Unknown Object (File)
Sat, Oct 11, 3:42 PM
Unknown Object (File)
Sat, Oct 11, 3:42 PM
Unknown Object (File)
Sat, Oct 11, 7:11 AM
Unknown Object (File)
Fri, Oct 3, 5:17 PM
Unknown Object (File)
Sun, Sep 28, 7:14 AM
Unknown Object (File)
Fri, Sep 26, 5:20 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