From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Alasdair Kergon <agk@redhat.com>,
dm-devel@redhat.com
Subject: [PATCH resend 2/6] dm: use use proper little-endian bitops
Date: Sun, 26 Jun 2011 14:57:52 +0900 [thread overview]
Message-ID: <1309067876-3537-3-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1309067876-3537-1-git-send-email-akinobu.mita@gmail.com>
Using __test_and_{set,clear}_bit_le() with ignoring its return value
can be replaced with __{set,clear}_bit_le().
This also removes unnecessary casts.
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Alasdair Kergon <agk@redhat.com>
Cc: dm-devel@redhat.com
---
drivers/md/dm-log.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/drivers/md/dm-log.c b/drivers/md/dm-log.c
index 948e3f4..2ef7e6e 100644
--- a/drivers/md/dm-log.c
+++ b/drivers/md/dm-log.c
@@ -251,20 +251,20 @@ struct log_c {
*/
static inline int log_test_bit(uint32_t *bs, unsigned bit)
{
- return test_bit_le(bit, (unsigned long *) bs) ? 1 : 0;
+ return test_bit_le(bit, bs) ? 1 : 0;
}
static inline void log_set_bit(struct log_c *l,
uint32_t *bs, unsigned bit)
{
- __test_and_set_bit_le(bit, (unsigned long *) bs);
+ __set_bit_le(bit, bs);
l->touched_cleaned = 1;
}
static inline void log_clear_bit(struct log_c *l,
uint32_t *bs, unsigned bit)
{
- __test_and_clear_bit_le(bit, (unsigned long *) bs);
+ __clear_bit_le(bit, bs);
l->touched_dirtied = 1;
}
@@ -739,8 +739,7 @@ static int core_get_resync_work(struct dm_dirty_log *log, region_t *region)
return 0;
do {
- *region = find_next_zero_bit_le(
- (unsigned long *) lc->sync_bits,
+ *region = find_next_zero_bit_le(lc->sync_bits,
lc->region_count,
lc->sync_search);
lc->sync_search = *region + 1;
--
1.7.4.4
next prev parent reply other threads:[~2011-06-26 5:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-26 5:57 [PATCH resend 0/6] use little-endian bitops properly Akinobu Mita
2011-06-26 5:57 ` [PATCH resend 1/6] ext4: use proper little-endian bitops Akinobu Mita
2011-06-26 5:57 ` Akinobu Mita [this message]
2011-06-26 5:57 ` [PATCH resend 3/6] md: " Akinobu Mita
2011-06-28 6:43 ` NeilBrown
2011-06-26 5:57 ` [PATCH resend 4/6] reiserfs: " Akinobu Mita
2011-06-26 5:57 ` [PATCH resend 5/6] reiserfs: use hweight_long() Akinobu Mita
2011-06-26 5:57 ` [PATCH resend 6/6] ocfs2: avoid unaligned access to dqc_bitmap 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=1309067876-3537-3-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=agk@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=dm-devel@redhat.com \
--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
Powered by JetHome