pds_core: Clean up init/uninit flows to be more readable
authorBrett Creeley <brett.creeley@amd.com>
Fri, 2 Feb 2024 19:59:11 +0000 (11:59 -0800)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 6 Feb 2024 12:26:54 +0000 (13:26 +0100)
commit792d36ccc163ac4aa606b3f5ec31cfd2c3a365de
treed7d9455664ca3a406fe84738ad7c9f99d5c8dd7c
parent247c4ed03321cd1c971195b8127764d0826664a7
pds_core: Clean up init/uninit flows to be more readable

The setup and teardown flows are somewhat hard to follow regarding
pdsc_core_init()/pdsc_dev_init() and their corresponding teardown
flows being in pdsc_teardown(). Improve the readability by adding
new pdsc_core_uninit()/pdsc_dev_unint() functions that mirror their
init counterparts. Also, move the notify and admin qcq allocations
into pdsc_core_init(), so they can be freed in pdsc_core_uninit().

Signed-off-by: Brett Creeley <brett.creeley@amd.com>
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/amd/pds_core/core.c
drivers/net/ethernet/amd/pds_core/core.h
drivers/net/ethernet/amd/pds_core/dev.c