Re: [PATCH v1 3/7] cxl/memdev: cxl_memdev_ioctl() cleanup
From: Jonathan Cameron
Date: Tue Feb 11 2025 - 12:30:24 EST
On Tue, 11 Feb 2025 15:57:23 +0800
Li Ming <ming.li@xxxxxxxxxxxx> wrote:
> 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.
>
> Signed-off-by: Li Ming <ming.li@xxxxxxxxxxxx>
Seems reasonable to me.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>