pci/shpc: refactor shpc_device_plug_common()
commit05d8a107dba8f94ed6c29fef965a73dca7e549ce
authorVladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Thu, 16 Feb 2023 18:03:44 +0000 (16 21:03 +0300)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 2 Mar 2023 08:10:48 +0000 (2 03:10 -0500)
tree2aabf30312a9a1d421bd051d6c6e63d68f6c0299
parent0adc05f480d7b8b3fe849345279beaee05df9b2d
pci/shpc: refactor shpc_device_plug_common()

Rename it to shpc_device_get_slot(), to mention what it does rather
than how it is used. It also helps to reuse it in further commit.

Also, add a return value and get rid of local_err.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Reviewed-by: Anton Kuchin <antonkuchin@yandex-team.ru>
Message-Id: <20230216180356.156832-7-vsementsov@yandex-team.ru>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/pci/shpc.c