LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org,
	akpm@linux-foundation.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
	Andy Grover <andy.grover@oracle.com>,
	rds-devel@oss.oracle.com, "David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: [PATCH v5 02/27] rds: stop including asm-generic/bitops/le.h directly
Date: Sat, 22 Jan 2011 22:13:34 +0900	[thread overview]
Message-ID: <1295702039-23186-3-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1295702039-23186-1-git-send-email-akinobu.mita@gmail.com>

asm-generic/bitops/le.h is only intended to be included directly from
asm-generic/bitops/ext2-non-atomic.h or asm-generic/bitops/minix-le.h
which implements generic ext2 or minix bit operations.

This stops including asm-generic/bitops/le.h directly and use ext2
non-atomic bit operations instead.

It seems odd to use ext2_*_bit() on rds, but it will replaced with
__{set,clear,test}_bit_le() after introducing little endian bit operations
for all architectures.  This indirect step is necessary to maintain
bisectability for some architectures which have their own little-endian
bit operations.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Andy Grover <andy.grover@oracle.com>
Cc: rds-devel@oss.oracle.com
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
---

Change from v4:
 - splitted into two patches to fix a bisection hole

The whole series is available in the git branch at:
 git://git.kernel.org/pub/scm/linux/kernel/git/mita/linux-2.6.git le-bitops-v5

 net/rds/cong.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/net/rds/cong.c b/net/rds/cong.c
index 75ea686..8cc322b 100644
--- a/net/rds/cong.c
+++ b/net/rds/cong.c
@@ -33,8 +33,7 @@
 #include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/rbtree.h>
-
-#include <asm-generic/bitops/le.h>
+#include <linux/bitops.h>
 
 #include "rds.h"
 
@@ -285,7 +284,7 @@ void rds_cong_set_bit(struct rds_cong_map *map, __be16 port)
 	i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS;
 	off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS;
 
-	generic___set_le_bit(off, (void *)map->m_page_addrs[i]);
+	ext2_set_bit(off, (void *)map->m_page_addrs[i]);
 }
 
 void rds_cong_clear_bit(struct rds_cong_map *map, __be16 port)
@@ -299,7 +298,7 @@ void rds_cong_clear_bit(struct rds_cong_map *map, __be16 port)
 	i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS;
 	off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS;
 
-	generic___clear_le_bit(off, (void *)map->m_page_addrs[i]);
+	ext2_clear_bit(off, (void *)map->m_page_addrs[i]);
 }
 
 static int rds_cong_test_bit(struct rds_cong_map *map, __be16 port)
@@ -310,7 +309,7 @@ static int rds_cong_test_bit(struct rds_cong_map *map, __be16 port)
 	i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS;
 	off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS;
 
-	return generic_test_le_bit(off, (void *)map->m_page_addrs[i]);
+	return ext2_test_bit(off, (void *)map->m_page_addrs[i]);
 }
 
 void rds_cong_add_socket(struct rds_sock *rs)
-- 
1.7.3.4


  parent reply	other threads:[~2011-01-22 13:13 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-22 13:13 [PATCH v5 00/27] Introduce little-endian bitops Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 01/27] kvm: stop including asm-generic/bitops/le.h directly Akinobu Mita
2011-01-22 13:13 ` Akinobu Mita [this message]
2011-01-22 13:13 ` [PATCH v5 03/27] bitops: merge little and big endian definisions in asm-generic/bitops/le.h Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 04/27] asm-generic: rename generic little-endian bitops functions Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 05/27] asm-generic: change little-endian bitops to take any pointer types Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 06/27] powerpc: introduce little-endian bitops Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 07/27] s390: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 08/27] arm: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 09/27] m68k: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 10/27] bitops: introduce CONFIG_GENERIC_FIND_BIT_LE Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 11/27] m68knommu: introduce little-endian bitops Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 12/27] bitops: introduce little-endian bitops for most architectures Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 13/27] asm-generic: use little-endian bitops Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 14/27] kvm: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 15/27] rds: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 16/27] ext3: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 17/27] ext4: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 18/27] ocfs2: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 19/27] nilfs2: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 20/27] reiserfs: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 21/27] udf: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 22/27] ufs: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 23/27] md: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 24/27] dm: " Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 25/27] bitops: remove ext2 non-atomic bitops from asm/bitops.h Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 26/27] m68k: remove inline asm from minix_find_first_zero_bit Akinobu Mita
2011-01-22 13:13 ` [PATCH v5 27/27] bitops: remove minix bitops from asm/bitops.h 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=1295702039-23186-3-git-send-email-akinobu.mita@gmail.com \
    --to=akinobu.mita@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=andy.grover@oracle.com \
    --cc=davem@davemloft.net \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rds-devel@oss.oracle.com \
    --subject='Re: [PATCH v5 02/27] rds: stop including asm-generic/bitops/le.h directly' \
    /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

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).