]> git.baikalelectronics.ru Git - kernel.git/commit
io_uring: Use ERR_CAST() instead of ERR_PTR(PTR_ERR())
authorChangcheng Deng <deng.changcheng@zte.com.cn>
Wed, 20 Oct 2021 08:49:48 +0000 (08:49 +0000)
committerJens Axboe <axboe@kernel.dk>
Wed, 20 Oct 2021 14:02:35 +0000 (08:02 -0600)
commit5b48bc337bc7af6efca0b6332c94a8b298f3ea26
tree14aab37a126cd6d4f2af3dbcd3a82d3cef3376e6
parenta74c002c8fdb6a213639f8127e43ee77c8d451f5
io_uring: Use ERR_CAST() instead of ERR_PTR(PTR_ERR())

Use ERR_CAST() instead of ERR_PTR(PTR_ERR()).
This makes it more readable and also fix this warning detected by
err_cast.cocci:
./fs/io_uring.c: WARNING: 3208: 11-18: ERR_CAST can be used with buf

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Changcheng Deng <deng.changcheng@zte.com.cn>
Link: https://lore.kernel.org/r/20211020084948.1038420-1-deng.changcheng@zte.com.cn
Signed-off-by: Jens Axboe <axboe@kernel.dk>
fs/io_uring.c