PCI: Make specifying PCI devices in kernel parameters reusable
authorLogan Gunthorpe <logang@deltatee.com>
Mon, 30 Jul 2018 16:18:37 +0000 (10:18 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Thu, 9 Aug 2018 21:23:06 +0000 (16:23 -0500)
commit07d8d7e57c28ca9a07dab4efd75dad3a654aeb85
tree53592de54320ccabbfd94f043769cc3881ad0b41
parentbd2e9567db72e37f7f4b90faa5133bc7365b5f65
PCI: Make specifying PCI devices in kernel parameters reusable

Separate out the code to match a PCI device with a string (typically
originating from a kernel parameter) from the
pci_specified_resource_alignment() function into its own helper function.

While we are at it, this change fixes the kernel style of the function
(fixing a number of long lines and extra parentheses).

Additionally, make the analogous change to the kernel parameter
documentation: Separate the description of how to specify a PCI device
into its own section at the head of the "pci=" parameter.

This patch should have no functional alterations.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
[bhelgaas: use "device" instead of "slot" in documentation since that's the
usual language in the PCI specs]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Stephen Bates <sbates@raithlin.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Christian König <christian.koenig@amd.com>
Documentation/admin-guide/kernel-parameters.txt
drivers/pci/pci.c