lkml.org 
[lkml]   [2019]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] tcp: don't use __constant_cpu_to_be32
Date
A trivial patch.

cpu_to_be32() is capable enough to detect __builtin_constant_p()
and to use an appropriate compile time ___constant_swahb32()
function.

So we can use cpu_to_be32() instead of __constant_cpu_to_be32().

Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
---
include/uapi/linux/tcp.h | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/include/uapi/linux/tcp.h b/include/uapi/linux/tcp.h
index 8bb6cc5f3235..7d2330df9652 100644
--- a/include/uapi/linux/tcp.h
+++ b/include/uapi/linux/tcp.h
@@ -70,16 +70,16 @@ union tcp_word_hdr {
#define tcp_flag_word(tp) ( ((union tcp_word_hdr *)(tp))->words [3])

enum {
- TCP_FLAG_CWR = __constant_cpu_to_be32(0x00800000),
- TCP_FLAG_ECE = __constant_cpu_to_be32(0x00400000),
- TCP_FLAG_URG = __constant_cpu_to_be32(0x00200000),
- TCP_FLAG_ACK = __constant_cpu_to_be32(0x00100000),
- TCP_FLAG_PSH = __constant_cpu_to_be32(0x00080000),
- TCP_FLAG_RST = __constant_cpu_to_be32(0x00040000),
- TCP_FLAG_SYN = __constant_cpu_to_be32(0x00020000),
- TCP_FLAG_FIN = __constant_cpu_to_be32(0x00010000),
- TCP_RESERVED_BITS = __constant_cpu_to_be32(0x0F000000),
- TCP_DATA_OFFSET = __constant_cpu_to_be32(0xF0000000)
+ TCP_FLAG_CWR = cpu_to_be32(0x00800000),
+ TCP_FLAG_ECE = cpu_to_be32(0x00400000),
+ TCP_FLAG_URG = cpu_to_be32(0x00200000),
+ TCP_FLAG_ACK = cpu_to_be32(0x00100000),
+ TCP_FLAG_PSH = cpu_to_be32(0x00080000),
+ TCP_FLAG_RST = cpu_to_be32(0x00040000),
+ TCP_FLAG_SYN = cpu_to_be32(0x00020000),
+ TCP_FLAG_FIN = cpu_to_be32(0x00010000),
+ TCP_RESERVED_BITS = cpu_to_be32(0x0F000000),
+ TCP_DATA_OFFSET = cpu_to_be32(0xF0000000)
};

/*
--
2.21.0
\
 
 \ /
  Last update: 2019-03-14 07:16    [W:0.087 / U:7.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site