Commit a58afda
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>1 parent 3ad4f59 commit a58afda
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
668 | 668 | | |
669 | 669 | | |
670 | 670 | | |
671 | | - | |
672 | 671 | | |
673 | | - | |
| 672 | + | |
674 | 673 | | |
675 | 674 | | |
676 | | - | |
677 | | - | |
| 675 | + | |
678 | 676 | | |
679 | | - | |
| 677 | + | |
680 | 678 | | |
681 | 679 | | |
682 | 680 | | |
| |||
0 commit comments