From: kernel test robot <lkp@intel.com>
To: Chao Yu <yuchao0@huawei.com>, Chao Yu <chao@kernel.org>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
Jaegeuk Kim <jaegeuk@kernel.org>
Subject: fs/f2fs/file.c:761:9: warning: Identical condition 'err', second condition is always false
Date: Sun, 9 Aug 2020 20:10:56 +0800 [thread overview]
Message-ID: <202008092050.gjiX70dJ%lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06a81c1c7db9bd5de0bd38cd5acc44bb22b99150
commit: 3265d3db1f16395cfc6b8ea9b31b4001d98d05ef f2fs: support partial truncation on compressed inode
date: 3 months ago
compiler: xtensa-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> fs/f2fs/file.c:761:9: warning: Identical condition 'err', second condition is always false [identicalConditionAfterEarlyExit]
return err;
^
fs/f2fs/file.c:753:6: note: first condition
if (err)
^
fs/f2fs/file.c:761:9: note: second condition
return err;
^
>> fs/f2fs/file.c:1689:12: warning: Variable 'new_size' is reassigned a value before the old one has been used. [redundantAssignment]
new_size = (last_off == pg_end) ? offset + len :
^
fs/f2fs/file.c:1620:0: note: Variable 'new_size' is reassigned a value before the old one has been used.
loff_t new_size = i_size_read(inode);
^
fs/f2fs/file.c:1689:12: note: Variable 'new_size' is reassigned a value before the old one has been used.
new_size = (last_off == pg_end) ? offset + len :
^
>> fs/f2fs/file.c:2789:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = -EINVAL;
^
fs/f2fs/file.c:2784:7: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = -EBUSY;
^
fs/f2fs/file.c:2789:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = -EINVAL;
^
fs/f2fs/file.c:2811:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = f2fs_convert_inline_inode(src);
^
fs/f2fs/file.c:2789:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = -EINVAL;
^
fs/f2fs/file.c:2811:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = f2fs_convert_inline_inode(src);
^
fs/f2fs/file.c:2840:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = __exchange_data_block(src, dst, pos_in >> F2FS_BLKSIZE_BITS,
^
fs/f2fs/file.c:2834:7: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = -EBUSY;
^
fs/f2fs/file.c:2840:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = __exchange_data_block(src, dst, pos_in >> F2FS_BLKSIZE_BITS,
^
fs/f2fs/f2fs.h:2209:15: warning: Local variable valid_node_count shadows outer function [shadowFunction]
unsigned int valid_node_count, user_block_count;
^
fs/f2fs/f2fs.h:2305:28: note: Shadowed declaration
static inline unsigned int valid_node_count(struct f2fs_sb_info *sbi)
^
fs/f2fs/f2fs.h:2209:15: note: Shadow variable
unsigned int valid_node_count, user_block_count;
^
vim +/err +761 fs/f2fs/file.c
760
> 761 return err;
762 }
763
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2020-08-09 12:13 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202008092050.gjiX70dJ%lkp@intel.com \
--to=lkp@intel.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yuchao0@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®