All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hauke Mehrtens <hauke@hauke-m.de>
To: backports@vger.kernel.org
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Subject: [PATCH 3/7] backports: Add nl_set_extack_cookie_u64()
Date: Sat, 26 Jan 2019 23:00:29 +0100	[thread overview]
Message-ID: <20190126220033.27634-4-hauke@hauke-m.de> (raw)
In-Reply-To: <20190126220033.27634-1-hauke@hauke-m.de>

This was introduced in Linux commit 801f87469ee8 ("netlink: add
nl_set_extack_cookie_u64()") and is used by the wireless subsystem.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/netlink.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h
index f956a769..0fb8e0f3 100644
--- a/backport/backport-include/linux/netlink.h
+++ b/backport/backport-include/linux/netlink.h
@@ -58,4 +58,15 @@ struct netlink_ext_ack {
 } while (0)
 #endif /* NL_SET_BAD_ATTR */
 
+#if LINUX_VERSION_IS_LESS(5,0,0)
+static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
+					    u64 cookie)
+{
+	u64 __cookie = cookie;
+
+	memcpy(extack->cookie, &__cookie, sizeof(__cookie));
+	extack->cookie_len = sizeof(__cookie);
+}
+#endif
+
 #endif /* __BACKPORT_LINUX_NETLINK_H */
-- 
2.20.1

--
To unsubscribe from this list: send the line "unsubscribe backports" in

  parent reply	other threads:[~2019-01-26 22:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-26 22:00 [PATCH 0/7] backport: update to Linux 5.0-rc3 Hauke Mehrtens
2019-01-26 22:00 ` [PATCH 1/7] backports: Remove get_user_pages() functions Hauke Mehrtens
2019-01-26 22:00 ` [PATCH 2/7] backports: Add DEFINE_SHOW_ATTRIBUTE macro Hauke Mehrtens
2019-01-26 22:00 ` Hauke Mehrtens [this message]
2019-01-26 22:00 ` [PATCH 4/7] backports: Add CORDIC_FLOAT Hauke Mehrtens
2019-01-26 22:00 ` [PATCH 5/7] backports: Add extra parameter to dev_open() Hauke Mehrtens
2019-01-26 22:00 ` [PATCH 6/7] backports: Rename QTNFMAC_PEARL_PCIE to QTNFMAC_PCIE Hauke Mehrtens
2019-01-26 22:00 ` [PATCH 7/7] backports: refresh patches on top of 5.0-rc3 Hauke Mehrtens

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=20190126220033.27634-4-hauke@hauke-m.de \
    --to=hauke@hauke-m.de \
    --cc=backports@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 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.