aboutsummaryrefslogtreecommitdiffstats
path: root/net/bridge
diff options
context:
space:
mode:
authorEric Dumazet <eric.dumazet@gmail.com>2010-04-20 19:06:52 -0700
committerDavid S. Miller <davem@davemloft.net>2010-04-20 19:06:52 -0700
commit0eae88f31ca2b88911ce843452054139e028771f (patch)
tree90f50197d8e1e50e3621e9c525bd4ca2634fe368 /net/bridge
parentcb903bf4ee2d6e53210e2174d363e10698112042 (diff)
downloadkernel_samsung_smdk4412-0eae88f31ca2b88911ce843452054139e028771f.zip
kernel_samsung_smdk4412-0eae88f31ca2b88911ce843452054139e028771f.tar.gz
kernel_samsung_smdk4412-0eae88f31ca2b88911ce843452054139e028771f.tar.bz2
net: Fix various endianness glitches
Sparse can help us find endianness bugs, but we need to make some cleanups to be able to more easily spot real bugs. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/bridge')
-rw-r--r--net/bridge/br_multicast.c2
-rw-r--r--net/bridge/br_private.h15
2 files changed, 9 insertions, 8 deletions
diff --git a/net/bridge/br_multicast.c b/net/bridge/br_multicast.c
index 3fe86ff..61e1d10 100644
--- a/net/bridge/br_multicast.c
+++ b/net/bridge/br_multicast.c
@@ -29,7 +29,7 @@
static inline int br_ip_hash(struct net_bridge_mdb_htable *mdb, __be32 ip)
{
- return jhash_1word(mdb->secret, (u32)ip) & (mdb->max - 1);
+ return jhash_1word(mdb->secret, (__force u32)ip) & (mdb->max - 1);
}
static struct net_bridge_mdb_entry *__br_mdb_ip_get(
diff --git a/net/bridge/br_private.h b/net/bridge/br_private.h
index 791d4ab..63181e4 100644
--- a/net/bridge/br_private.h
+++ b/net/bridge/br_private.h
@@ -130,19 +130,20 @@ struct net_bridge_port
#endif
};
+struct br_cpu_netstats {
+ unsigned long rx_packets;
+ unsigned long rx_bytes;
+ unsigned long tx_packets;
+ unsigned long tx_bytes;
+};
+
struct net_bridge
{
spinlock_t lock;
struct list_head port_list;
struct net_device *dev;
- struct br_cpu_netstats __percpu {
- unsigned long rx_packets;
- unsigned long rx_bytes;
- unsigned long tx_packets;
- unsigned long tx_bytes;
- } *stats;
-
+ struct br_cpu_netstats __percpu *stats;
spinlock_t hash_lock;
struct hlist_head hash[BR_HASH_SIZE];
unsigned long feature_mask;