PCI/switchtec: Declare local state_names[] as static
authorKelvin Cao <kelvin.cao@microchip.com>
Fri, 19 Nov 2021 00:38:03 +0000 (16:38 -0800)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 19 Nov 2021 18:14:02 +0000 (12:14 -0600)
commitb76521f6482d2a2a691e4eb1a496d55d73aea064
tree7ba6c754ee46bdda93ec71276e0f9869480f336d
parentbb17b15813eacc85ae8cb0c3901408ba051ebf91
PCI/switchtec: Declare local state_names[] as static

The local state_names[] array is constant and need not be allocated and
populated each time we enter stuser_set_state().  Declare it as static.

See the link below for the discussion.

  https://lore.kernel.org/r/20211014141859.11444-1-kelvin.cao@microchip.com/

[bhelgaas: simplify commit log]
Suggested-by: Krzysztof WilczyƄski <kw@linux.com>
Link: https://lore.kernel.org/r/20211119003803.2333-3-kelvin.cao@microchip.com
Signed-off-by: Kelvin Cao <kelvin.cao@microchip.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
drivers/pci/switch/switchtec.c