Linux Btrfs filesystem development
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Jiapeng Chong <jiapeng.chong@linux.alibaba.com>
Cc: clm@fb.com, josef@toxicpanda.com, dsterba@suse.com,
	linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] btrfs: Remove unused variable ret
Date: Tue, 2 Mar 2021 18:22:14 +0100	[thread overview]
Message-ID: <20210302172214.GJ7604@twin.jikos.cz> (raw)
In-Reply-To: <1613715538-90761-1-git-send-email-jiapeng.chong@linux.alibaba.com>

On Fri, Feb 19, 2021 at 02:18:58PM +0800, Jiapeng Chong wrote:
> Fix the following coccicheck warnings:
> 
> ./fs/btrfs/disk-io.c:4403:5-8: Unneeded variable: "ret". Return "0" on
> line 4411.

That maybe stops the check to report the warning but it's not the right
way to fix the code. The callees do not properly handle and propagate
errors so that needs to be fixed, and the return value propagated from
btrfs_destroy_delayed_refs.

      reply	other threads:[~2021-03-03  2:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-19  6:18 [PATCH] btrfs: Remove unused variable ret Jiapeng Chong
2021-03-02 17:22 ` David Sterba [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=20210302172214.GJ7604@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=clm@fb.com \
    --cc=dsterba@suse.com \
    --cc=jiapeng.chong@linux.alibaba.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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