From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4BF11C282C7 for ; Sat, 26 Jan 2019 22:00:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15D2E2087F for ; Sat, 26 Jan 2019 22:00:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726394AbfAZWA6 (ORCPT ); Sat, 26 Jan 2019 17:00:58 -0500 Received: from mx2.mailbox.org ([80.241.60.215]:28270 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726381AbfAZWA6 (ORCPT ); Sat, 26 Jan 2019 17:00:58 -0500 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id BC455A11FC; Sat, 26 Jan 2019 23:00:56 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter05.heinlein-hosting.de (spamfilter05.heinlein-hosting.de [80.241.56.123]) (amavisd-new, port 10030) with ESMTP id 57SFE3dgc19J; Sat, 26 Jan 2019 23:00:55 +0100 (CET) From: Hauke Mehrtens To: backports@vger.kernel.org Cc: Hauke Mehrtens Subject: [PATCH 3/7] backports: Add nl_set_extack_cookie_u64() Date: Sat, 26 Jan 2019 23:00:29 +0100 Message-Id: <20190126220033.27634-4-hauke@hauke-m.de> In-Reply-To: <20190126220033.27634-1-hauke@hauke-m.de> References: <20190126220033.27634-1-hauke@hauke-m.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org 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 --- 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