]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cxl/core: Use guard() to drop the goto pattern of cxl_dpa_free()
authorLi Ming <ming.li@zohomail.com>
Fri, 21 Feb 2025 01:24:50 +0000 (09:24 +0800)
committerDave Jiang <dave.jiang@intel.com>
Fri, 14 Mar 2025 21:37:54 +0000 (14:37 -0700)
commit16fe6ec4ac3d828b3976bd36e4d99af73f8e43d2
tree5eac37d2156389534cab8243668f22188987062d
parenta58afda8bfd4a113295f0e12c0697c35a69614b2
cxl/core: Use guard() to drop the goto pattern of cxl_dpa_free()

cxl_dpa_free() has a goto pattern to call up_write() for cxl_dpa_rwsem,
it can be removed by using a guard() to replace the down_write() and
up_write().

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Reviewed-by: Alison Schofield <alison.schofield@intel.com>
Reviewed-by: Ira Weiny <ira.weiny@intel.com>
Acked-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Li Ming <ming.li@zohomail.com>
Link: https://patch.msgid.link/20250221012453.126366-5-ming.li@zohomail.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/hdm.c