mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Chao Yu <yuchao0@huawei.com>
To: <trix@redhat.com>, <jaegeuk@kernel.org>, <chao@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <linux-f2fs-devel@lists.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] f2fs: return success if there is no work to do
Date: Mon, 17 May 2021 09:19:05 +0800	[thread overview]
Message-ID: <567d4fcd-6e02-d80e-33cb-3a6810bf833a@huawei.com> (raw)
In-Reply-To: <20210515180941.1751362-1-trix@redhat.com>

On 2021/5/16 2:09, trix@redhat.com wrote:
> From: Tom Rix <trix@redhat.com>
> 
> Static analysis reports this problem
> file.c:3206:2: warning: Undefined or garbage value returned to caller
>          return err;
>          ^~~~~~~~~~
> 
> err is only set if there is some work to do.  Because the loop returns
> immediately on an error, if all the work was done, a 0 would be returned.
> Instead of checking the unlikely case that there was no work to do,
> change the return of err to 0.
> 
> Signed-off-by: Tom Rix <trix@redhat.com>

Reviewed-by: Chao Yu <yuchao0@huawei.com>

Thanks,

      reply	other threads:[~2021-05-17  1:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-15 18:09 trix
2021-05-17  1:19 ` Chao Yu [this message]

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=567d4fcd-6e02-d80e-33cb-3a6810bf833a@huawei.com \
    --to=yuchao0@huawei.com \
    --cc=chao@kernel.org \
    --cc=jaegeuk@kernel.org \
    --cc=linux-f2fs-devel@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trix@redhat.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®