]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
cxl: Simplify cxl_root_ops allocation and handling
authorRobert Richter <rrichter@amd.com>
Wed, 14 Jan 2026 16:48:20 +0000 (17:48 +0100)
committerDave Jiang <dave.jiang@intel.com>
Tue, 3 Feb 2026 17:52:57 +0000 (10:52 -0700)
commit3e422caa40d0d4bf25ece6e82418ce642d56524a
tree02dc9e6b690478f9f805ff6d8f28c649f43d9fa9
parent98ceb1a42dab91c6dcf95d1d424cba61b0f9bc5c
cxl: Simplify cxl_root_ops allocation and handling

A root port's callback handlers are collected in struct cxl_root_ops.
The structure is dynamically allocated, though it contains only a
single pointer in it. This also requires to check two pointers to
check for the existance of a callback.

Simplify the allocation, release and handler check by embedding the
ops statically in struct cxl_root.

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Link: https://patch.msgid.link/20260114164837.1076338-5-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/acpi.c
drivers/cxl/core/cdat.c
drivers/cxl/core/port.c
drivers/cxl/cxl.h