cxl/memdev: cxl_memdev_ioctl() cleanup
In cxl_memdev_ioctl(), the down_read(&cxl_memdev_rwsem) and up_read(&cxl_memdev_rwsem) can be replaced by a guard(rwsem_read)(&cxl_memdev_rwsem), it helps to remove the open-coded up_read(&cxl_memdev_rwsem). Besides, the local var 'rc' can be also removed to make the code more cleaner. 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-4-ming.li@zohomail.com Signed-off-by:
Dave Jiang <dave.jiang@intel.com>
Loading
Please register or sign in to comment