From: NeilBrown <neilb@suse.de>
To: Akinobu Mita <akinobu.mita@gmail.com>
Cc: linux-kernel@vger.kernel.org, akpm@linux-foundation.org,
linux-raid@vger.kernel.org
Subject: Re: [PATCH] md: use set_bit_le and clear_bit_le
Date: Mon, 4 Mar 2013 11:58:21 +1100 [thread overview]
Message-ID: <20130304115821.06bba2f5@notabene.brown> (raw)
In-Reply-To: <1362234957-5570-1-git-send-email-akinobu.mita@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1487 bytes --]
On Sat, 2 Mar 2013 23:35:57 +0900 Akinobu Mita <akinobu.mita@gmail.com>
wrote:
> The value returned by test_and_set_bit_le() drivers/md/bitmap.c is not used.
> So just use set_bit_le(). The same goes for test_and_clear_bit_le().
>
> Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
> Cc: Neil Brown <neilb@suse.de>
> Cc: linux-raid@vger.kernel.org
> ---
> drivers/md/bitmap.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
> index 4fd9d6a..5a2c754 100644
> --- a/drivers/md/bitmap.c
> +++ b/drivers/md/bitmap.c
> @@ -846,7 +846,7 @@ static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
> if (test_bit(BITMAP_HOSTENDIAN, &bitmap->flags))
> set_bit(bit, kaddr);
> else
> - test_and_set_bit_le(bit, kaddr);
> + set_bit_le(bit, kaddr);
> kunmap_atomic(kaddr);
> pr_debug("set file bit %lu page %lu\n", bit, page->index);
> /* record page number so it gets flushed to disk when unplug occurs */
> @@ -868,7 +868,7 @@ static void bitmap_file_clear_bit(struct bitmap *bitmap, sector_t block)
> if (test_bit(BITMAP_HOSTENDIAN, &bitmap->flags))
> clear_bit(bit, paddr);
> else
> - test_and_clear_bit_le(bit, paddr);
> + clear_bit_le(bit, paddr);
> kunmap_atomic(paddr);
> if (!test_page_attr(bitmap, page->index, BITMAP_PAGE_NEEDWRITE)) {
> set_page_attr(bitmap, page->index, BITMAP_PAGE_PENDING);
applied, thanks.
NeilBrown
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
prev parent reply other threads:[~2013-03-04 0:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-02 14:35 [PATCH] md: use set_bit_le and clear_bit_le Akinobu Mita
2013-03-04 0:58 ` NeilBrown [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=20130304115821.06bba2f5@notabene.brown \
--to=neilb@suse.de \
--cc=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@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).