Commit e3cdcfce authored by Colin Ian King's avatar Colin Ian King Committed by Bjorn Helgaas

PCI/ACPI: Move pcie_to_hpx3_type[] from stack to static data

Move pcie_to_hpx3_type[] from the stack to static data.  This reduces stack
usage and also makes the object code slightly smaller.

Link: https://lore.kernel.org/r/20200210085256.319424-1-colin.king@canonical.comSigned-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent bb6d3fb3
...@@ -439,7 +439,7 @@ enum hpx_type3_dev_type { ...@@ -439,7 +439,7 @@ enum hpx_type3_dev_type {
static u16 hpx3_device_type(struct pci_dev *dev) static u16 hpx3_device_type(struct pci_dev *dev)
{ {
u16 pcie_type = pci_pcie_type(dev); u16 pcie_type = pci_pcie_type(dev);
const int pcie_to_hpx3_type[] = { static const int pcie_to_hpx3_type[] = {
[PCI_EXP_TYPE_ENDPOINT] = HPX_TYPE_ENDPOINT, [PCI_EXP_TYPE_ENDPOINT] = HPX_TYPE_ENDPOINT,
[PCI_EXP_TYPE_LEG_END] = HPX_TYPE_LEG_END, [PCI_EXP_TYPE_LEG_END] = HPX_TYPE_LEG_END,
[PCI_EXP_TYPE_RC_END] = HPX_TYPE_RC_END, [PCI_EXP_TYPE_RC_END] = HPX_TYPE_RC_END,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment