linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: Andreas Dilger <adilger.kernel@dilger.ca>
Cc: linux-kernel@vger.kernel.org, "Theodore Ts'o" <tytso@mit.edu>,
	linux-ext4@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ext4: arrange ext4_*_bit() macros
Date: Thu, 2 Jun 2011 10:25:28 +0900	[thread overview]
Message-ID: <BANLkTinbiK0ESg90EU9d8WvL_VjbQpthhQ@mail.gmail.com> (raw)
In-Reply-To: <46950A08-9300-4649-A38D-88829035DFC2@dilger.ca>

2011/6/2 Andreas Dilger <adilger.kernel@dilger.ca>:
> On 2011-06-01, at 8:36 AM, Akinobu Mita wrote:
>> - remove unused ext4_{set,clear}_bit_atomic and ext4_find_first_zero_bit
>> - rename ext4_{set,clear}_bit to ext4_test_and_{set,clear}_bit
>> - reintroduce ext4_{set,clear}_bit for __{set,clear}_bit_le
>>
>> This changes ext4_{set,clear}_bit safely, because if someone uses
>> these macros without noticing the change, new ext4_{set,clear}_bit
>> don't have return value and causes compiler errors where the return
>> value is used.
>
> I don't think it makes sense to change all of the ext4_set_bit() calls that
> don't check the return code to use ext4_test_and_set_bit(), just to return
> them back to ext4_set_bit() in the next patch.
>
> If you want to do this in separate steps, and maintain git bisect working,
> then it would be more clear to have two patches:
>
> Patch #1: Add new ext4_test_and_set_bit() macro
> #define ext4_test_and_set_bit           __test_and_set_bit_le
> {change ext4_set_bit() calls that check return to  ext4_test_and_set_bit()}
>
> Patch #2: Change ext4_set_bit() to not return old bit
> #define ext4_set_bit                    __set_bit_le
> {nothing else changes}
>
> Alternately, you could just leave the calls that do not check the return
> value as ext4_set_bit() and have only a single patch.

OK, I will do in a single patch. The change will be much smaller than this
version because there are only two calls where ext4_{set,clear}_bit() checks
the return value.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-06-02  1:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 14:36 [PATCH v2 1/2] ext4: arrange ext4_*_bit() macros Akinobu Mita
2011-06-01 14:36 ` [PATCH v2 2/2] ext4: use proper " Akinobu Mita
2011-06-01 20:49 ` [PATCH v2 1/2] ext4: arrange " Andreas Dilger
2011-06-02  1:25   ` Akinobu Mita [this message]
2011-06-02  8:50   ` Amir Goldstein
2011-06-02 10:04     ` Akinobu Mita

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=BANLkTinbiK0ESg90EU9d8WvL_VjbQpthhQ@mail.gmail.com \
    --to=akinobu.mita@gmail.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 NNTP newsgroup(s).