Re: [PATCH v2 3/7] cxl/memdev: cxl_memdev_ioctl() cleanup
From: Alison Schofield
Date: Wed Feb 19 2025 - 13:05:36 EST
On Mon, Feb 17, 2025 at 10:48:24PM +0800, Li Ming 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.
>
> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> Signed-off-by: Li Ming <ming.li@xxxxxxxxxxxx>
> ---
Reviewed-by: Alison Schofield <alison.schofield@xxxxxxxxx>
snip