]> Gentwo Git Trees - linux/.git/commit
cxl/port: Use scoped_guard()/guard() to drop device_lock() for cxl_port
authorLi Ming <ming4.li@intel.com>
Fri, 30 Aug 2024 01:31:37 +0000 (01:31 +0000)
committerDave Jiang <dave.jiang@intel.com>
Tue, 3 Sep 2024 21:49:49 +0000 (14:49 -0700)
commit7f569e917b7866b6760e2cfc3a9549cabc890071
tree9f49e3c2fe54c992e7fa4c8c490618ce79fdd580
parentdd2617ebd2a69c012001a29274557199409eff39
cxl/port: Use scoped_guard()/guard() to drop device_lock() for cxl_port

A device_lock() and device_unlock() pair can be replaced by a cleanup
helper scoped_guard() or guard(), that can enhance code readability. In
CXL subsystem, still use device_lock() and device_unlock() pairs for cxl
port resource protection, most of them can be replaced by a
scoped_guard() or a guard() simply.

Suggested-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Li Ming <ming4.li@intel.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://patch.msgid.link/20240830013138.2256244-2-ming4.li@intel.com
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
drivers/cxl/core/mbox.c
drivers/cxl/core/port.c
drivers/cxl/core/region.c
drivers/cxl/mem.c
drivers/cxl/pmem.c