mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [djwong-xfs:repair-rmap-live 326/331] fs/xfs/scrub/xfbtree.c:234:9-16: WARNING: ERR_CAST can be used with xfbt -> xfile
@ 2021-10-28 20:29 kernel test robot
  2021-10-28 20:29 ` [PATCH] xfs: fix err_cast.cocci warnings kernel test robot
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2021-10-28 20:29 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: kbuild-all, Darrick J. Wong, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

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
config: i386-randconfig-c021-20211028 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


cocci warnings: (new ones prefixed by >>)
>> fs/xfs/scrub/xfbtree.c:234:9-16: WARNING: ERR_CAST can be used with xfbt -> xfile

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 37750 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] xfs: fix err_cast.cocci warnings
  2021-10-28 20:29 [djwong-xfs:repair-rmap-live 326/331] fs/xfs/scrub/xfbtree.c:234:9-16: WARNING: ERR_CAST can be used with xfbt -> xfile kernel test robot
@ 2021-10-28 20:29 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-10-28 20:29 UTC (permalink / raw)
  To: Darrick J. Wong; +Cc: kbuild-all, Darrick J. Wong, linux-kernel

From: kernel test robot <lkp@intel.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@intel.com>
Signed-off-by: kernel test robot <lkp@intel.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) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-28 20:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28 20:29 [djwong-xfs:repair-rmap-live 326/331] fs/xfs/scrub/xfbtree.c:234:9-16: WARNING: ERR_CAST can be used with xfbt -> xfile kernel test robot
2021-10-28 20:29 ` [PATCH] xfs: fix err_cast.cocci warnings kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®