diff options
author | David S. Miller <davem@davemloft.net> | 2015-10-24 09:54:12 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-10-24 09:54:12 -0400 |
commit | ba3e2084f268bdfed7627046e58a2218037e15af (patch) | |
tree | 36b99da43ee72f81b31f0627dbfc69f50c97378f /include/linux/overflow-arith.h | |
parent | a72c9512bf2bef12c5e66a4d910c4b348fe31d61 (diff) | |
parent | ce9d9b8e5c2b7486edf76958bcdb5e6534a915b0 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/ipv6/xfrm6_output.c
net/openvswitch/flow_netlink.c
net/openvswitch/vport-gre.c
net/openvswitch/vport-vxlan.c
net/openvswitch/vport.c
net/openvswitch/vport.h
The openvswitch conflicts were overlapping changes. One was
the egress tunnel info fix in 'net' and the other was the
vport ->send() op simplification in 'net-next'.
The xfrm6_output.c conflicts was also a simplification
overlapping a bug fix.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/overflow-arith.h')
-rw-r--r-- | include/linux/overflow-arith.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/include/linux/overflow-arith.h b/include/linux/overflow-arith.h new file mode 100644 index 000000000000..e12ccf854a70 --- /dev/null +++ b/include/linux/overflow-arith.h | |||
@@ -0,0 +1,18 @@ | |||
1 | #pragma once | ||
2 | |||
3 | #include <linux/kernel.h> | ||
4 | |||
5 | #ifdef CC_HAVE_BUILTIN_OVERFLOW | ||
6 | |||
7 | #define overflow_usub __builtin_usub_overflow | ||
8 | |||
9 | #else | ||
10 | |||
11 | static inline bool overflow_usub(unsigned int a, unsigned int b, | ||
12 | unsigned int *res) | ||
13 | { | ||
14 | *res = a - b; | ||
15 | return *res > a ? true : false; | ||
16 | } | ||
17 | |||
18 | #endif | ||