]> git.ipfire.org Git - thirdparty/linux.git/commit
cxl: Simplify cxl_rd_ops allocation and handling
authorRobert Richter <rrichter@amd.com>
Fri, 14 Nov 2025 07:58:41 +0000 (08:58 +0100)
committerDave Jiang <dave.jiang@intel.com>
Fri, 14 Nov 2025 17:37:13 +0000 (10:37 -0700)
commit6123133ee90fc55a5437364d442dd5876648628d
treee2399fcf6da79ca922e38f39a3089297501fff67
parente9a6fb0bcdd7609be6969112f3fbfcce3b1d4a7c
cxl: Simplify cxl_rd_ops allocation and handling

A root decoder's callback handlers are collected in struct cxl_rd_ops.
The structure is dynamically allocated, though it contains only a few
pointers in it. This also requires to check two pointes to check for
the existence of a callback.

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

Implementation is equivalent to how struct cxl_root_ops handles the
callbacks.

[ dj: Fix spelling error in commit log. ]

Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Signed-off-by: Robert Richter <rrichter@amd.com>
Link: https://patch.msgid.link/20251114075844.1315805-2-rrichter@amd.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/acpi.c
drivers/cxl/core/port.c
drivers/cxl/core/region.c
drivers/cxl/cxl.h