]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cxl: Unify debug messages when calling devm_cxl_add_port()
authorRobert Richter <rrichter@amd.com>
Tue, 18 Oct 2022 13:23:31 +0000 (15:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:07:17 +0000 (17:07 +0000)
commit8fce427169ec7578d7c2422fa859db438ec416c3
treeadb377bd9aff703788aaf1b64f1a81649435a1f2
parente841a59ac1d89a75a7b7810c25a00f4b5f1b2e60
cxl: Unify debug messages when calling devm_cxl_add_port()

[ Upstream commit f3cd264c4ec1ab9b8918f3b083cfc13c5e7c26b7 ]

CXL ports are added in a couple of code paths using devm_cxl_add_port().
Debug messages are individually generated, but are incomplete and
inconsistent. Change this by moving its generation to
devm_cxl_add_port(). This unifies the messages and reduces code
duplication.  Also, generate messages on failure. Use a
__devm_cxl_add_port() 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-4-rrichter@amd.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Stable-dep-of: 98a04c7aced2 ("cxl/region: Fix x1 root-decoder granularity calculations")
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cxl/acpi.c
drivers/cxl/core/port.c