[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20211028202933.GA105369@e2f4bfd2b83a>
Date: Fri, 29 Oct 2021 04:29:33 +0800
From: kernel test robot <lkp@...el.com>
To: "Darrick J. Wong" <djwong@...nel.org>
Cc: kbuild-all@...ts.01.org,
"Darrick J. Wong" <darrick.wong@...cle.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH] xfs: fix err_cast.cocci warnings
From: kernel test robot <lkp@...el.com>
fs/xfs/scrub/xfbtree.c:234:9-16: WARNING: ERR_CAST can be used with xfbt -> xfile
Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...))
Generated by: scripts/coccinelle/api/err_cast.cocci
Fixes: f47d10306ea7 ("xfs: connect in-memory btrees to xfiles")
Reported-by: kernel test robot <lkp@...el.com>
Signed-off-by: kernel test robot <lkp@...el.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-rmap-live
head: 058725b83f3ab866a225aec3bfa204c0b7f4d3a8
commit: f47d10306ea759e3e0749de65cdd1680383be13f [326/331] xfs: connect in-memory btrees to xfiles
:::::: branch date: 6 days ago
:::::: commit date: 6 days ago
xfbtree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/xfs/scrub/xfbtree.c
+++ b/fs/xfs/scrub/xfbtree.c
@@ -231,7 +231,7 @@ xfbtree_create(
xfbt->xfile = xfile_create(description, 0);
if (IS_ERR(xfbt->xfile))
- return ERR_PTR(PTR_ERR(xfbt->xfile));
+ return ERR_CAST(xfbt->xfile);
xfbt->target = xfs_alloc_memory_buftarg(mp, xfbt->xfile);
if (!xfbt->target) {
Powered by blists - more mailing lists