From patchwork Sun Sep 17 16:58:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hauke Mehrtens X-Patchwork-Id: 9954947 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E5D2260208 for ; Sun, 17 Sep 2017 16:58:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D295628A00 for ; Sun, 17 Sep 2017 16:58:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C77F528A04; Sun, 17 Sep 2017 16:58:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A82FD28A00 for ; Sun, 17 Sep 2017 16:58:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751628AbdIQQ6h (ORCPT ); Sun, 17 Sep 2017 12:58:37 -0400 Received: from mx2.mailbox.org ([80.241.60.215]:43318 "EHLO mx2.mailbox.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751600AbdIQQ6h (ORCPT ); Sun, 17 Sep 2017 12:58:37 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id CC156487DB; Sun, 17 Sep 2017 18:58:35 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by hefe.heinlein-support.de (hefe.heinlein-support.de [91.198.250.172]) (amavisd-new, port 10030) with ESMTP id UExUWlYk_JiA; Sun, 17 Sep 2017 18:58:31 +0200 (CEST) From: Hauke Mehrtens To: johannes@sipsolutions.net Cc: backports@vger.kernel.org, Hauke Mehrtens Subject: [PATCH 2/4] header: add uuid backports Date: Sun, 17 Sep 2017 18:58:11 +0200 Message-Id: <20170917165813.17580-3-hauke@hauke-m.de> In-Reply-To: <20170917165813.17580-1-hauke@hauke-m.de> References: <20170917165813.17580-1-hauke@hauke-m.de> Sender: backports-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: backports@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 +#include_next + +#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_ */