From: Hauke Mehrtens <hauke@hauke-m.de>
To: johannes@sipsolutions.net
Cc: backports@vger.kernel.org, Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 2/4] header: add uuid backports
Date: Sun, 17 Sep 2017 18:58:11 +0200 [thread overview]
Message-ID: <20170917165813.17580-3-hauke@hauke-m.de> (raw)
In-Reply-To: <20170917165813.17580-1-hauke@hauke-m.de>
This backports the following upstream commits:
f9727a17db9: ("uuid: rename uuid types")
df33767d9fe: ("uuid: hoist helpers uuid_equal() and uuid_copy() from xfs")
ath10k now makes use of them.
Some parts should go into the uapi/linux/uuid.h file, but
then #include_next hack is not working correctly any more, so place it
all into the normal file.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/uuid.h | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
create mode 100644 backport/backport-include/linux/uuid.h
diff --git a/backport/backport-include/linux/uuid.h b/backport/backport-include/linux/uuid.h
new file mode 100644
index 00000000..5ffe225b
--- /dev/null
+++ b/backport/backport-include/linux/uuid.h
@@ -0,0 +1,25 @@
+#ifndef __BACKPORT_LINUX_UUID_H_
+#define __BACKPORT_LINUX_UUID_H_
+#include <linux/version.h>
+#include_next <linux/uuid.h>
+
+#if LINUX_VERSION_IS_LESS(4,13,0)
+#define guid_t uuid_le
+#define uuid_t uuid_be
+
+static inline void guid_gen(guid_t *u)
+{
+ return uuid_le_gen(u);
+}
+static inline void uuid_gen(uuid_t *u)
+{
+ return uuid_be_gen(u);
+}
+
+static inline void guid_copy(guid_t *dst, const guid_t *src)
+{
+ memcpy(dst, src, sizeof(guid_t));
+}
+#endif
+
+#endif /* __BACKPORT_LINUX_UUID_H_ */
--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe backports" in
next prev parent reply other threads:[~2017-09-17 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-17 16:58 [PATCH 0/4] backports: make compatible with kernel 4.14-rc Hauke Mehrtens
2017-09-17 16:58 ` [PATCH 1/4] patches: refresh patches on v4.14-rc1 Hauke Mehrtens
2017-09-17 16:58 ` Hauke Mehrtens [this message]
2017-09-17 16:58 ` [PATCH 3/4] header: add UUID_STRING_LEN Hauke Mehrtens
2017-09-17 16:58 ` [PATCH 4/4] header: add ether_addr_to_u64() and u64_to_ether_addr() Hauke Mehrtens
2017-09-21 13:23 ` [PATCH 0/4] backports: make compatible with kernel 4.14-rc Johannes Berg
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=20170917165813.17580-3-hauke@hauke-m.de \
--to=hauke@hauke-m.de \
--cc=backports@vger.kernel.org \
--cc=johannes@sipsolutions.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.