linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.cz>
To: Anand Jain <anand.jain@oracle.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs: fix extent_buffer_uptodate() return
Date: Mon, 12 Feb 2018 17:55:19 +0100	[thread overview]
Message-ID: <20180212165519.GJ3003@twin.jikos.cz> (raw)
In-Reply-To: <20180212153456.19358-1-anand.jain@oracle.com>

On Mon, Feb 12, 2018 at 11:34:56PM +0800, Anand Jain wrote:
> extent_buffer_uptodate() returns from test_bit() which is of
> type bool, so update extent_buffer_uptodate() to it.

The return value of test_bit differes by architecture, there are several
that return int. You probably refer to x86 that uses some trickery to
optimize for constants and that returns bool. While we can add more
int/bool, I don't think it's wrong to have int here so I don't see what
this patch fixes.

In this particular case, extent_buffer_uptodate is a trivial wrapper
around test_bit so it would be better to make it a static inline. This
would remove the call indirection and reduce size of the code.

  reply	other threads:[~2018-02-12 16:57 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-12 15:34 [PATCH] btrfs: fix extent_buffer_uptodate() return Anand Jain
2018-02-12 16:55 ` David Sterba [this message]
2018-02-13  4:23   ` Anand Jain

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=20180212165519.GJ3003@twin.jikos.cz \
    --to=dsterba@suse.cz \
    --cc=anand.jain@oracle.com \
    --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).