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>
Loading
Please register or sign in to comment