:::::: 
:::::: Manual check reason: "low confidence static check warning: 
fs/xfs/libxfs/xfs_refcount.c:1960:28: warning: Parameter 'low_rec' can be 
declared with const [constParameter]"
:::::: 

CC: [email protected]
BCC: [email protected]
CC: "Darrick J. Wong" <[email protected]>
CC: [email protected]
TO: "Darrick J. Wong" <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git 
report-refcounts
head:   e03415388b6396a20de350473226dde17bcf5728
commit: e03415388b6396a20de350473226dde17bcf5728 [369/369] xfs: export 
reference count information to userspace
:::::: branch date: 13 days ago
:::::: commit date: 13 days ago
compiler: s390-linux-gcc (GCC) 11.3.0
reproduce (cppcheck warning):
        # apt-get install cppcheck
        git checkout e03415388b6396a20de350473226dde17bcf5728
        cppcheck --quiet --enable=style,performance,portability --template=gcc 
FILE

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>


cppcheck possible warnings: (new ones prefixed by >>, may not real problems)

>> fs/xfs/xfs_itable.c:80:8: warning: Redundant initialization for 'error'. The 
>> initialized value is overwritten before it is read. [redundantInitialization]
    error = xfs_iget(mp, tp, ino,
          ^
   fs/xfs/xfs_itable.c:78:14: note: error is initialized
    int   error = -EINVAL;
                ^
   fs/xfs/xfs_itable.c:80:8: note: error is overwritten
    error = xfs_iget(mp, tp, ino,
          ^
>> fs/xfs/libxfs/xfs_rmap.c:2596:20: warning: Parameter 'pag' can be declared 
>> with const [constParameter]
    struct xfs_perag *pag)
                      ^
>> fs/xfs/libxfs/xfs_rmap.c:2717:25: warning: Parameter 'bmap' can be declared 
>> with const [constParameter]
    struct xfs_bmbt_irec  *bmap)
                           ^
   fs/xfs/libxfs/xfs_format.h:428:36: warning: Shifting signed 32-bit value by 
31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    sbp->sb_features_log_incompat &= ~XFS_SB_FEAT_INCOMPAT_LOG_ALL;
                                      ^
   fs/xfs/libxfs/xfs_format.h:448:4: warning: Shifting signed 32-bit value by 
31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
      XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
      ^
   fs/xfs/libxfs/xfs_format.h:428:36: warning: Signed integer overflow for 
expression '1<<31'. [integerOverflow]
    sbp->sb_features_log_incompat &= ~XFS_SB_FEAT_INCOMPAT_LOG_ALL;
                                      ^
   fs/xfs/libxfs/xfs_format.h:448:4: warning: Signed integer overflow for 
expression '1<<31'. [integerOverflow]
      XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
      ^
--
>> fs/xfs/libxfs/xfs_refcount.c:1960:28: warning: Parameter 'low_rec' can be 
>> declared with const [constParameter]
    struct xfs_refcount_irec *low_rec,
                              ^
>> fs/xfs/libxfs/xfs_refcount.c:1961:28: warning: Parameter 'high_rec' can be 
>> declared with const [constParameter]
    struct xfs_refcount_irec *high_rec,
                              ^
>> fs/xfs/libxfs/xfs_refcount.c:1216:20: warning: Parameter 'pag' can be 
>> declared with const [constParameter]
    struct xfs_perag *pag)
                      ^
   fs/xfs/libxfs/xfs_format.h:428:36: warning: Shifting signed 32-bit value by 
31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
    sbp->sb_features_log_incompat &= ~XFS_SB_FEAT_INCOMPAT_LOG_ALL;
                                      ^
   fs/xfs/libxfs/xfs_format.h:448:4: warning: Shifting signed 32-bit value by 
31 bits is implementation-defined behaviour [shiftTooManyBitsSigned]
      XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
      ^
   fs/xfs/libxfs/xfs_format.h:428:36: warning: Signed integer overflow for 
expression '1<<31'. [integerOverflow]
    sbp->sb_features_log_incompat &= ~XFS_SB_FEAT_INCOMPAT_LOG_ALL;
                                      ^
   fs/xfs/libxfs/xfs_format.h:448:4: warning: Signed integer overflow for 
expression '1<<31'. [integerOverflow]
      XFS_SB_FEAT_INCOMPAT_LOG_SWAPEXT);
      ^

vim +/low_rec +1960 fs/xfs/libxfs/xfs_refcount.c

e03415388b6396 Darrick J. Wong 2022-06-10  1955  
e03415388b6396 Darrick J. Wong 2022-06-10  1956  /* Find all refcount records 
between two keys. */
e03415388b6396 Darrick J. Wong 2022-06-10  1957  int
e03415388b6396 Darrick J. Wong 2022-06-10  1958  xfs_refcount_query_range(
e03415388b6396 Darrick J. Wong 2022-06-10  1959         struct xfs_btree_cur    
        *cur,
e03415388b6396 Darrick J. Wong 2022-06-10 @1960         struct 
xfs_refcount_irec        *low_rec,
e03415388b6396 Darrick J. Wong 2022-06-10 @1961         struct 
xfs_refcount_irec        *high_rec,

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to