OSDN Git Service

cxl: Unify debug messages when calling devm_cxl_add_dport()
authorRobert Richter <rrichter@amd.com>
Tue, 18 Oct 2022 13:23:32 +0000 (15:23 +0200)
committerDan Williams <dan.j.williams@intel.com>
Mon, 14 Nov 2022 18:37:08 +0000 (10:37 -0800)
commit58eef878fcd1f44612445b5cdde598f04b940da8
tree3e50fac9fd3fa90053a28d5742c788b743e8b17d
parentf3cd264c4ec1ab9b8918f3b083cfc13c5e7c26b7
cxl: Unify debug messages when calling devm_cxl_add_dport()

CXL dports are added in a couple of code paths using
devm_cxl_add_dport(). Debug messages are individually generated, but are
incomplete and inconsistent. Change this by moving its generation to
devm_cxl_add_dport(). This unifies the messages and reduces code
duplication.  Also, generate messages on failure. Use a
__devm_cxl_add_dport() wrapper to keep the readability of the error
exits.

Signed-off-by: Robert Richter <rrichter@amd.com>
Link: https://lore.kernel.org/r/20221018132341.76259-5-rrichter@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/cxl/acpi.c
drivers/cxl/core/pci.c
drivers/cxl/core/port.c
tools/testing/cxl/test/cxl.c