Skip to content

Commit 12ce224

Browse files
mitatorvalds
authored andcommitted
rds: stop including asm-generic/bitops/le.h directly
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: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 5140a35 commit 12ce224

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎net/rds/cong.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@
3333
#include <linux/slab.h>
3434
#include <linux/types.h>
3535
#include <linux/rbtree.h>
36-
37-
#include <asm-generic/bitops/le.h>
36+
#include <linux/bitops.h>
3837

3938
#include "rds.h"
4039

@@ -285,7 +284,7 @@ void rds_cong_set_bit(struct rds_cong_map *map, __be16 port)
285284
i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS;
286285
off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS;
287286

288-
generic___set_le_bit(off, (void *)map->m_page_addrs[i]);
287+
ext2_set_bit(off, (void *)map->m_page_addrs[i]);
289288
}
290289

291290
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)
299298
i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS;
300299
off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS;
301300

302-
generic___clear_le_bit(off, (void *)map->m_page_addrs[i]);
301+
ext2_clear_bit(off, (void *)map->m_page_addrs[i]);
303302
}
304303

305304
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)
310309
i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS;
311310
off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS;
312311

313-
return generic_test_le_bit(off, (void *)map->m_page_addrs[i]);
312+
return ext2_test_bit(off, (void *)map->m_page_addrs[i]);
314313
}
315314

316315
void rds_cong_add_socket(struct rds_sock *rs)

0 commit comments

Comments
 (0)