diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2011-05-14 06:06:36 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2011-05-14 06:06:36 -0400 |
commit | a18f22a968de17b29f2310cdb7ba69163e65ec15 (patch) | |
tree | a7d56d88fad5e444d7661484109758a2f436129e /net/tipc/addr.h | |
parent | a1c57e0fec53defe745e64417eacdbd3618c3e66 (diff) | |
parent | 798778b8653f64b7b2162ac70eca10367cff6ce8 (diff) |
Merge branch 'consolidate-clksrc-i8253' of master.kernel.org:~rmk/linux-2.6-arm into timers/clocksource
Conflicts:
arch/ia64/kernel/cyclone.c
arch/mips/kernel/i8253.c
arch/x86/kernel/i8253.c
Reason: Resolve conflicts so further cleanups do not conflict further
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'net/tipc/addr.h')
-rw-r--r-- | net/tipc/addr.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/net/tipc/addr.h b/net/tipc/addr.h index 2490fadd0caf..8971aba99aea 100644 --- a/net/tipc/addr.h +++ b/net/tipc/addr.h | |||
@@ -37,6 +37,16 @@ | |||
37 | #ifndef _TIPC_ADDR_H | 37 | #ifndef _TIPC_ADDR_H |
38 | #define _TIPC_ADDR_H | 38 | #define _TIPC_ADDR_H |
39 | 39 | ||
40 | static inline u32 tipc_zone_mask(u32 addr) | ||
41 | { | ||
42 | return addr & 0xff000000u; | ||
43 | } | ||
44 | |||
45 | static inline u32 tipc_cluster_mask(u32 addr) | ||
46 | { | ||
47 | return addr & 0xfffff000u; | ||
48 | } | ||
49 | |||
40 | static inline int in_own_cluster(u32 addr) | 50 | static inline int in_own_cluster(u32 addr) |
41 | { | 51 | { |
42 | return !((addr ^ tipc_own_addr) >> 12); | 52 | return !((addr ^ tipc_own_addr) >> 12); |
@@ -49,14 +59,13 @@ static inline int in_own_cluster(u32 addr) | |||
49 | * after a network hop. | 59 | * after a network hop. |
50 | */ | 60 | */ |
51 | 61 | ||
52 | static inline int addr_domain(int sc) | 62 | static inline u32 addr_domain(u32 sc) |
53 | { | 63 | { |
54 | if (likely(sc == TIPC_NODE_SCOPE)) | 64 | if (likely(sc == TIPC_NODE_SCOPE)) |
55 | return tipc_own_addr; | 65 | return tipc_own_addr; |
56 | if (sc == TIPC_CLUSTER_SCOPE) | 66 | if (sc == TIPC_CLUSTER_SCOPE) |
57 | return tipc_addr(tipc_zone(tipc_own_addr), | 67 | return tipc_cluster_mask(tipc_own_addr); |
58 | tipc_cluster(tipc_own_addr), 0); | 68 | return tipc_zone_mask(tipc_own_addr); |
59 | return tipc_addr(tipc_zone(tipc_own_addr), 0, 0); | ||
60 | } | 69 | } |
61 | 70 | ||
62 | int tipc_addr_domain_valid(u32); | 71 | int tipc_addr_domain_valid(u32); |