From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, Chris Lew <clew@codeaurora.org>
Subject: [PATCH v2 2/7] net: qrtr: Move constants to header file
Date: Tue, 10 Oct 2017 23:45:18 -0700 [thread overview]
Message-ID: <20171011064523.7902-3-bjorn.andersson@linaro.org> (raw)
In-Reply-To: <20171011064523.7902-1-bjorn.andersson@linaro.org>
The constants are used by both the name server and clients, so clarify
their value and move them to the uapi header.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
---
Changes since v1:
- None
include/uapi/linux/qrtr.h | 3 +++
net/qrtr/qrtr.c | 2 --
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/uapi/linux/qrtr.h b/include/uapi/linux/qrtr.h
index 9d76c566f66e..63e8803e4d90 100644
--- a/include/uapi/linux/qrtr.h
+++ b/include/uapi/linux/qrtr.h
@@ -4,6 +4,9 @@
#include <linux/socket.h>
#include <linux/types.h>
+#define QRTR_NODE_BCAST 0xffffffffu
+#define QRTR_PORT_CTRL 0xfffffffeu
+
struct sockaddr_qrtr {
__kernel_sa_family_t sq_family;
__u32 sq_node;
diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c
index 7e4b49a8349e..15981abc042c 100644
--- a/net/qrtr/qrtr.c
+++ b/net/qrtr/qrtr.c
@@ -61,8 +61,6 @@ struct qrtr_hdr {
} __packed;
#define QRTR_HDR_SIZE sizeof(struct qrtr_hdr)
-#define QRTR_NODE_BCAST ((unsigned int)-1)
-#define QRTR_PORT_CTRL ((unsigned int)-2)
struct qrtr_sock {
/* WARNING: sk must be the first member */
--
2.12.0
next prev parent reply other threads:[~2017-10-11 6:45 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 6:45 [PATCH v2 0/7] net: qrtr: Fixes and support receiving version 2 packets Bjorn Andersson
2017-10-11 6:45 ` [PATCH v2 1/7] net: qrtr: Invoke sk_error_report() after setting sk_err Bjorn Andersson
2017-10-11 6:45 ` Bjorn Andersson [this message]
2017-10-11 6:45 ` [PATCH v2 3/7] net: qrtr: Add control packet definition to uapi Bjorn Andersson
2017-10-11 6:45 ` [PATCH v2 4/7] net: qrtr: Pass source and destination to enqueue functions Bjorn Andersson
2017-10-11 6:45 ` [PATCH v2 5/7] net: qrtr: Clean up control packet handling Bjorn Andersson
2017-10-11 6:45 ` [PATCH v2 6/7] net: qrtr: Use sk_buff->cb in receive path Bjorn Andersson
2017-10-11 6:45 ` [PATCH v2 7/7] net: qrtr: Support decoding incoming v2 packets Bjorn Andersson
2017-10-11 22:38 ` [PATCH v2 0/7] net: qrtr: Fixes and support receiving version 2 packets David Miller
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=20171011064523.7902-3-bjorn.andersson@linaro.org \
--to=bjorn.andersson@linaro.org \
--cc=clew@codeaurora.org \
--cc=davem@davemloft.net \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).