summaryrefslogtreecommitdiff
path: root/include/net/netns/hash.h
blob: 69a6715d9f3fd16c9a6e90f9be403ba0cba1f022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef __NET_NS_HASH_H__
#define __NET_NS_HASH_H__

#include <asm/cache.h>

struct net;

static inline u32 net_hash_mix(const struct net *net)
{
#ifdef CONFIG_NET_NS
	/*
	 * shift this right to eliminate bits, that are
	 * always zeroed
	 */

	return (u32)(((unsigned long)net) >> L1_CACHE_SHIFT);
#else
	return 0;
#endif
}
#endif
mmit9587a01a7ead9efc5032c16e0d9668de58be1186 (patch) treee0254eeedd0c2896f0373af47476724e7d36f396 /drivers parent6773386f977ce5af339f9678fa2918909a946c6b (diff)
brcmfmac: merge two brcmf_err macros into one
This allows simplifying the code by adding a simple IS_ENABLED check for CONFIG_BRCMDB symbol. Signed-off-by: Rafał Miłecki <rafal@milecki.pl> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers')