From: Li kunyu <kunyu@nfschina.com>
To: tytso@mit.edu, adilger.kernel@dilger.ca
Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
Li kunyu <kunyu@nfschina.com>
Subject: [PATCH] ext4: extents: Remove unnecessary ‘0’ values from error
Date: Tue, 2 Apr 2024 11:19:28 +0800 [thread overview]
Message-ID: <20240402031928.33790-1-kunyu@nfschina.com> (raw)
error is assigned first, so it does not need to initialize the assignment.
Signed-off-by: Li kunyu <kunyu@nfschina.com>
---
fs/ext4/extents.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index f3cb570951a7e..254e07a33eb9b 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -4977,7 +4977,7 @@ static int ext4_fiemap_check_ranges(struct inode *inode, u64 start, u64 *len)
int ext4_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
u64 start, u64 len)
{
- int error = 0;
+ int error;
if (fieinfo->fi_flags & FIEMAP_FLAG_CACHE) {
error = ext4_ext_precache(inode);
@@ -5009,7 +5009,7 @@ int ext4_get_es_cache(struct inode *inode, struct fiemap_extent_info *fieinfo,
{
ext4_lblk_t start_blk, len_blks;
__u64 last_blk;
- int error = 0;
+ int error;
if (ext4_has_inline_data(inode)) {
int has_inline;
--
2.18.2
reply other threads:[~2024-04-02 3:19 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=20240402031928.33790-1-kunyu@nfschina.com \
--to=kunyu@nfschina.com \
--cc=adilger.kernel@dilger.ca \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).