mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 04:01:48 -04:00
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 <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
cb903bf4ee
commit
0eae88f31c
17 changed files with 65 additions and 61 deletions
|
|
@ -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(
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue