]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
cxl/region: Handle endpoint decoders in cxl_region_find_decoder()
authorAlison Schofield <alison.schofield@intel.com>
Wed, 31 Jan 2024 21:59:30 +0000 (13:59 -0800)
committerSasha Levin <sashal@kernel.org>
Tue, 26 Mar 2024 22:19:12 +0000 (18:19 -0400)
commit9f57eecf94ff28852e0bd9feecaa445c7f11af73
tree5e7578f9aa0fc9462b57931ed5e40ee4b2e87fdb
parent031b6233fe7ef75c6f21f7cefb56e89a677712f0
cxl/region: Handle endpoint decoders in cxl_region_find_decoder()

[ Upstream commit 453a7fde8031a5192ed2f9646ad048c1a5e930dc ]

In preparation for adding a new caller of cxl_region_find_decoders()
teach it to find a decoder from a cxl_endpoint_decoder structure.

Combining switch and endpoint decoder lookup in one function prevents
code duplication in call sites.

Update the existing caller.

Signed-off-by: Alison Schofield <alison.schofield@intel.com>
Tested-by: Wonjae Lee <wj28.lee@samsung.com>
Link: https://lore.kernel.org/r/79ae6d72978ef9f3ceec9722e1cb793820553c8e.1706736863.git.alison.schofield@intel.com
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/cxl/core/region.c