From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: Eric Dumazet <edumazet@google.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Subject: [PATCH] tcp: don't use __constant_cpu_to_be32
Date: Thu, 14 Mar 2019 15:15:14 +0900 [thread overview]
Message-ID: <20190314061514.19586-1-sergey.senozhatsky@gmail.com> (raw)
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
next reply other threads:[~2019-03-14 6:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-14 6:15 Sergey Senozhatsky [this message]
2019-03-14 12:42 ` Eric Dumazet
2019-03-15 1:20 ` Sergey Senozhatsky
2019-03-15 17:24 ` Stanislav Fomichev
2019-03-16 5:19 ` Sergey Senozhatsky
2019-03-16 7:18 ` Sergey Senozhatsky
2019-03-16 14:26 ` Sergey Senozhatsky
2019-03-18 16:32 ` Stanislav Fomichev
2019-03-19 1:29 ` Sergey Senozhatsky
2019-03-18 16:28 ` Stanislav Fomichev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190314061514.19586-1-sergey.senozhatsky@gmail.com \
--to=sergey.senozhatsky.work@gmail.com \
--cc=edumazet@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=sergey.senozhatsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®