Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Akinobu Mita and committed by
Linus Torvalds
12ce2242 5140a357

+4 -5
+4 -5
net/rds/cong.c
··· 33 33 #include <linux/slab.h> 34 34 #include <linux/types.h> 35 35 #include <linux/rbtree.h> 36 - 37 - #include <asm-generic/bitops/le.h> 36 + #include <linux/bitops.h> 38 37 39 38 #include "rds.h" 40 39 ··· 284 285 i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; 285 286 off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS; 286 287 287 - generic___set_le_bit(off, (void *)map->m_page_addrs[i]); 288 + ext2_set_bit(off, (void *)map->m_page_addrs[i]); 288 289 } 289 290 290 291 void rds_cong_clear_bit(struct rds_cong_map *map, __be16 port) ··· 298 299 i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; 299 300 off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS; 300 301 301 - generic___clear_le_bit(off, (void *)map->m_page_addrs[i]); 302 + ext2_clear_bit(off, (void *)map->m_page_addrs[i]); 302 303 } 303 304 304 305 static int rds_cong_test_bit(struct rds_cong_map *map, __be16 port) ··· 309 310 i = be16_to_cpu(port) / RDS_CONG_MAP_PAGE_BITS; 310 311 off = be16_to_cpu(port) % RDS_CONG_MAP_PAGE_BITS; 311 312 312 - return generic_test_le_bit(off, (void *)map->m_page_addrs[i]); 313 + return ext2_test_bit(off, (void *)map->m_page_addrs[i]); 313 314 } 314 315 315 316 void rds_cong_add_socket(struct rds_sock *rs)