tree:
https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git scrub-fixes
head: 1acf4b5f989a50368c7400ebc9bcb8e694811472
commit: 871702d62b015d96e1c60e54090e63f06c90ad8a [278/304] xfs: create routine to allocate
and initialize a realtime rmap btree inode
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck warnings: (new ones prefixed by >>)
In file included from fs/xfs/libxfs/xfs_rtrmap_btree.c:
fs/xfs/libxfs/xfs_format.h:342:2: warning: Non-boolean value returned from function
returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_ATTRBIT);
^
fs/xfs/libxfs/xfs_format.h:352:2: warning: Non-boolean value returned from function
returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_QUOTABIT);
^
fs/xfs/libxfs/xfs_format.h:368:2: warning: Non-boolean value returned from function
returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_DALIGNBIT);
^
fs/xfs/libxfs/xfs_format.h:379:2: warning: Non-boolean value returned from function
returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_SECTORBIT);
^
fs/xfs/libxfs/xfs_format.h:384:2: warning: Non-boolean value returned from function
returning bool [returnNonBoolInBooleanFunction]
return (sbp->sb_versionnum & XFS_SB_VERSION_BORGBIT);
^
> fs/xfs/libxfs/xfs_rtrmap_btree.c:830:28: warning: Same value in
both branches of ternary operator. [duplicateValueTernary]
ip->i_df.if_broot_bytes = XFS_RTRMAP_BROOT_SPACE_CALC(0, 0);
^
vim +830 fs/xfs/libxfs/xfs_rtrmap_btree.c
797
798 /*
799 * Create a realtime rmap btree inode. The caller must clean up @ic and
800 * release the inode stored in @ipp (if it isn't NULL) regardless of the
return
801 * value.
802 */
803 int
804 xfs_rtrmapbt_create(
805 struct xfs_trans **tpp,
806 struct xfs_imeta_end *ic,
807 struct xfs_inode **ipp)
808 {
809 struct xfs_mount *mp = (*tpp)->t_mountp;
810 struct xfs_inode *ip;
811 struct xfs_btree_block *block;
812 xfs_ino_t ino = NULLFSINO;
813 int error;
814
815 *ipp = NULL;
816 error = xfs_imeta_lookup(mp, &XFS_IMETA_RTRMAPBT, &ino);
817 if (error)
818 return error;
819 if (ino != NULLFSINO)
820 return -EEXIST;
821
822 error = xfs_imeta_create(tpp, &XFS_IMETA_RTRMAPBT, S_IFREG, ipp, ic);
823 if (error)
824 return error;
825
826 ip = *ipp;
827 ip->i_df.if_format = XFS_DINODE_FMT_RMAP;
828 ASSERT(ip->i_df.if_broot_bytes == 0);
829 ASSERT(ip->i_df.if_bytes == 0);
830 ip->i_df.if_broot_bytes = XFS_RTRMAP_BROOT_SPACE_CALC(0, 0);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org