linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Li Zefan <lizf@cn.fujitsu.com>
To: David Sterba <dave@jikos.cz>
Cc: "linux-btrfs@vger.kernel.org" <linux-btrfs@vger.kernel.org>
Subject: Re: [PATCH] Btrfs: rewrite btrfs_trim_block_group()
Date: Thu, 24 Nov 2011 10:49:51 +0800	[thread overview]
Message-ID: <4ECDB0CF.6020507@cn.fujitsu.com> (raw)
In-Reply-To: <20111123154657.GD12759@twin.jikos.cz>

David Sterba wrote:
> On Thu, Nov 17, 2011 at 03:26:17PM +0800, Li Zefan wrote:
>> diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
>> index 8c32434..89cc54e 100644
>> --- a/fs/btrfs/free-space-cache.c
>> +++ b/fs/btrfs/free-space-cache.c
>> +static int trim_no_bitmap(struct btrfs_block_group_cache *block_group,
>> +			  u64 *total_trimmed, u64 start, u64 end, u64 minlen)
>> +{
>> +	struct btrfs_free_space_ctl *ctl = block_group->free_space_ctl;
>> +	struct btrfs_free_space *entry;
>> +	struct rb_node *node;
>> +	int ret;
>         int ret = 0;
> 
>   CC [M]  fs/btrfs/free-space-cache.o
> fs/btrfs/free-space-cache.c: In function trim_no_bitmap:
> fs/btrfs/free-space-cache.c:2636: warning: ret may be used uninitialized in this function
> 
> Although it seems the uninitialized value could never be returned.
> 

Actually it's possible. The odd thing is my gcc doesn't complain about this.

Will fix. Thanks!

--
Li Zefan

      reply	other threads:[~2011-11-24  2:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-17  7:26 [PATCH] Btrfs: rewrite btrfs_trim_block_group() Li Zefan
2011-11-23 15:46 ` David Sterba
2011-11-24  2:49   ` Li Zefan [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=4ECDB0CF.6020507@cn.fujitsu.com \
    --to=lizf@cn.fujitsu.com \
    --cc=dave@jikos.cz \
    --cc=linux-btrfs@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;
as well as URLs for NNTP newsgroup(s).