Page MenuHomeFreeBSD

LinuxKPI: pci: first round of file cleanup
Needs ReviewPublic

Authored by bz on Thu, Jun 4, 9:53 AM.
Tags
None
Referenced Files
F159337016: D57433.diff
Sat, Jun 13, 12:19 AM
F159330437: D57433.diff
Fri, Jun 12, 10:24 PM
Unknown Object (File)
Thu, Jun 11, 9:40 PM
Unknown Object (File)
Tue, Jun 9, 10:48 PM
Unknown Object (File)
Tue, Jun 9, 2:42 PM
Unknown Object (File)
Tue, Jun 9, 12:25 AM
Subscribers

Details

Reviewers
None
Group Reviewers
linuxkpi
Summary

While the multiple sections of the file are mostly clearly separated
some bits were spread around.

Get the device methods array to the end of the file saving us a lot
of forward function delcarations and making it easier to rename them
to a common lkpi_ prefix instead of linux_ showing that they are file
local internal functions not part of any official LinuxKPI KPI.

Sort the various lkpi_pci_* bus attachment functions together,
followed by the lkpi_pci_iov_ ones. Then add the
pci_[un]register_driver* driver bits. This keeps the group
logically together.

For the PCI functions then group the pdev allocations and free/release
functions--for the two paths--together, giving them more homogeneous
names and add comments to some of them so it is more clear which
ones are shared ("common") and which ones belong to which code path.

Move some helper function around to where they are needed now.

There is still more to do for the resource section which sits somewhere
in the middle but that will at best be a separate pass.

For the DMA and backlight parts, rename various private bits to
a lkpi_ prefix as well (structures, variables, functions) away
from the public linux_ prefix which should belong to the linuxolator
in first place.

No functional changes.

Sponsored by: The FreeBSD Foundation
MFC after: 3 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 73660
Build 70543: arc lint + arc unit