From patchwork Fri Oct 1 11:37:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12530393 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64715C433F5 for ; Fri, 1 Oct 2021 11:37:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3F8E961A63 for ; Fri, 1 Oct 2021 11:37:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354046AbhJALjm (ORCPT ); Fri, 1 Oct 2021 07:39:42 -0400 Received: from mga11.intel.com ([192.55.52.93]:47222 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353912AbhJALjl (ORCPT ); Fri, 1 Oct 2021 07:39:41 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="222207482" X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="222207482" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 04:37:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="520998784" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga008.fm.intel.com with ESMTP; 01 Oct 2021 04:37:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 125FF1AD; Fri, 1 Oct 2021 14:37:59 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Tomas Winkler , Alexander Usyskin , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Arnd Bergmann , Christoph Hellwig , Masahiro Yamada , Michal Marek , Nick Desaulniers Subject: [PATCH v3 1/4] modpost: Mark uuid_le type only for MEI Date: Fri, 1 Oct 2021 14:37:44 +0300 Message-Id: <20211001113747.64040-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The uuid_le type is used only for MEI ABI, do not advertise it for others. Due to above, bury add_uuid() in its only user. Signed-off-by: Andy Shevchenko --- v3: no change scripts/mod/file2alias.c | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 49aba862073e..c9c9c2328e26 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c @@ -34,19 +34,22 @@ typedef Elf64_Addr kernel_ulong_t; typedef uint32_t __u32; typedef uint16_t __u16; typedef unsigned char __u8; + typedef struct { __u8 b[16]; } guid_t; -/* backwards compatibility, don't use in new code */ -typedef struct { - __u8 b[16]; -} uuid_le; typedef struct { __u8 b[16]; } uuid_t; + #define UUID_STRING_LEN 36 +/* MEI UUID type, don't use anywhere else */ +typedef struct { + __u8 b[16]; +} uuid_le; + /* Big exception to the "don't include kernel headers into userspace, which * even potentially has different endianness and word sizes, since * we handle those differences explicitly below */ @@ -104,17 +107,6 @@ static inline void add_wildcard(char *str) strcat(str + len, "*"); } -static inline void add_uuid(char *str, uuid_le uuid) -{ - int len = strlen(str); - - sprintf(str + len, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", - uuid.b[3], uuid.b[2], uuid.b[1], uuid.b[0], - uuid.b[5], uuid.b[4], uuid.b[7], uuid.b[6], - uuid.b[8], uuid.b[9], uuid.b[10], uuid.b[11], - uuid.b[12], uuid.b[13], uuid.b[14], uuid.b[15]); -} - /** * Check that sizeof(device_id type) are consistent with size of section * in .o file. If in-consistent then userspace and kernel does not agree @@ -1211,12 +1203,16 @@ static int do_mei_entry(const char *filename, void *symval, char *alias) { DEF_FIELD_ADDR(symval, mei_cl_device_id, name); - DEF_FIELD_ADDR(symval, mei_cl_device_id, uuid); + DEF_FIELD(symval, mei_cl_device_id, uuid); DEF_FIELD(symval, mei_cl_device_id, version); sprintf(alias, MEI_CL_MODULE_PREFIX); sprintf(alias + strlen(alias), "%s:", (*name)[0] ? *name : "*"); - add_uuid(alias, *uuid); + sprintf(alias + strlen(alias), "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x", + uuid.b[3], uuid.b[2], uuid.b[1], uuid.b[0], + uuid.b[5], uuid.b[4], uuid.b[7], uuid.b[6], + uuid.b[8], uuid.b[9], uuid.b[10], uuid.b[11], + uuid.b[12], uuid.b[13], uuid.b[14], uuid.b[15]); ADD(alias, ":", version != MEI_CL_VERSION_ANY, version); strcat(alias, ":*"); From patchwork Fri Oct 1 11:37:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12530395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1C74C433FE for ; Fri, 1 Oct 2021 11:37:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D9C0F61A83 for ; Fri, 1 Oct 2021 11:37:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354057AbhJALjn (ORCPT ); Fri, 1 Oct 2021 07:39:43 -0400 Received: from mga11.intel.com ([192.55.52.93]:47222 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354007AbhJALjm (ORCPT ); Fri, 1 Oct 2021 07:39:42 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="222207483" X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="222207483" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 04:37:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="619033767" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga001.fm.intel.com with ESMTP; 01 Oct 2021 04:37:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 1B872177; Fri, 1 Oct 2021 14:38:00 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Tomas Winkler , Alexander Usyskin , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Arnd Bergmann , Christoph Hellwig , Masahiro Yamada , Michal Marek , Nick Desaulniers Subject: [PATCH v3 2/4] uuid: Make guid_t completely internal type to the kernel Date: Fri, 1 Oct 2021 14:37:45 +0300 Message-Id: <20211001113747.64040-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001113747.64040-1-andriy.shevchenko@linux.intel.com> References: <20211001113747.64040-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The guid_t type was defined in UAPI by mistake. Keep it an internal type and leave uuid_le UAPI for it's only user, i.e. MEI. Signed-off-by: Andy Shevchenko --- v3: no change include/linux/uuid.h | 20 ++++++++++++++++---- include/uapi/linux/uuid.h | 14 +++++--------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/include/linux/uuid.h b/include/linux/uuid.h index 8cdc0d3567cd..5be158a49e11 100644 --- a/include/linux/uuid.h +++ b/include/linux/uuid.h @@ -8,15 +8,25 @@ #ifndef _LINUX_UUID_H_ #define _LINUX_UUID_H_ -#include #include #define UUID_SIZE 16 +typedef struct { + __u8 b[UUID_SIZE]; +} guid_t; + typedef struct { __u8 b[UUID_SIZE]; } uuid_t; +#define GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ +((guid_t) \ +{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ + (b) & 0xff, ((b) >> 8) & 0xff, \ + (c) & 0xff, ((c) >> 8) & 0xff, \ + (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) + #define UUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ ((uuid_t) \ {{ ((a) >> 24) & 0xff, ((a) >> 16) & 0xff, ((a) >> 8) & 0xff, (a) & 0xff, \ @@ -97,10 +107,12 @@ extern const u8 uuid_index[16]; int guid_parse(const char *uuid, guid_t *u); int uuid_parse(const char *uuid, uuid_t *u); -/* backwards compatibility, don't use in new code */ -static inline int uuid_le_cmp(const guid_t u1, const guid_t u2) +/* MEI UUID type, don't use anywhere else */ +#include + +static inline int uuid_le_cmp(const uuid_le u1, const uuid_le u2) { - return memcmp(&u1, &u2, sizeof(guid_t)); + return memcmp(&u1, &u2, sizeof(uuid_le)); } #endif diff --git a/include/uapi/linux/uuid.h b/include/uapi/linux/uuid.h index e5a7eecef7c3..c3e175f686f4 100644 --- a/include/uapi/linux/uuid.h +++ b/include/uapi/linux/uuid.h @@ -1,6 +1,6 @@ /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ /* - * UUID/GUID definition + * MEI UUID definition * * Copyright (C) 2010, Intel Corp. * Huang Ying @@ -22,21 +22,17 @@ typedef struct { __u8 b[16]; -} guid_t; +} uuid_le; -#define GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ -((guid_t) \ +#define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ +((uuid_le) \ {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ (b) & 0xff, ((b) >> 8) & 0xff, \ (c) & 0xff, ((c) >> 8) & 0xff, \ (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) -/* backwards compatibility, don't use in new code */ -typedef guid_t uuid_le; -#define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ - GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) #define NULL_UUID_LE \ UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00) + 0x00, 0x00, 0x00, 0x00) #endif /* _UAPI_LINUX_UUID_H_ */ From patchwork Fri Oct 1 11:37:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12530391 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0C5A2C433EF for ; Fri, 1 Oct 2021 11:37:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E0D1661A63 for ; Fri, 1 Oct 2021 11:37:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354026AbhJALjm (ORCPT ); Fri, 1 Oct 2021 07:39:42 -0400 Received: from mga01.intel.com ([192.55.52.88]:58924 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353920AbhJALjl (ORCPT ); Fri, 1 Oct 2021 07:39:41 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="247965850" X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="247965850" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 04:37:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="556258670" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 01 Oct 2021 04:37:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 299843DA; Fri, 1 Oct 2021 14:38:00 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Tomas Winkler , Alexander Usyskin , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Arnd Bergmann , Christoph Hellwig , Masahiro Yamada , Michal Marek , Nick Desaulniers Subject: [PATCH v3 3/4] mei: Move uuid_le_cmp() to its only user Date: Fri, 1 Oct 2021 14:37:46 +0300 Message-Id: <20211001113747.64040-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001113747.64040-1-andriy.shevchenko@linux.intel.com> References: <20211001113747.64040-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org There is only a single user of uuid_le_cmp() API, let's make it private to that user. Signed-off-by: Andy Shevchenko --- v3: new patch drivers/misc/mei/mei_dev.h | 5 +++++ include/linux/uuid.h | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 694f866f87ef..2c1a22b64302 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h @@ -13,6 +13,11 @@ #include #include +static inline int uuid_le_cmp(const uuid_le u1, const uuid_le u2) +{ + return memcmp(&u1, &u2, sizeof(uuid_le)); +} + #include "hw.h" #include "hbm.h" diff --git a/include/linux/uuid.h b/include/linux/uuid.h index 5be158a49e11..6b1a3efa1e0b 100644 --- a/include/linux/uuid.h +++ b/include/linux/uuid.h @@ -110,9 +110,4 @@ int uuid_parse(const char *uuid, uuid_t *u); /* MEI UUID type, don't use anywhere else */ #include -static inline int uuid_le_cmp(const uuid_le u1, const uuid_le u2) -{ - return memcmp(&u1, &u2, sizeof(uuid_le)); -} - #endif From patchwork Fri Oct 1 11:37:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 12530397 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E43EC4332F for ; Fri, 1 Oct 2021 11:38:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5539261A82 for ; Fri, 1 Oct 2021 11:38:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1354070AbhJALjp (ORCPT ); Fri, 1 Oct 2021 07:39:45 -0400 Received: from mga17.intel.com ([192.55.52.151]:26877 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354065AbhJALjo (ORCPT ); Fri, 1 Oct 2021 07:39:44 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10123"; a="205562670" X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="205562670" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2021 04:38:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,337,1624345200"; d="scan'208";a="480402843" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 01 Oct 2021 04:37:54 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 334E8440; Fri, 1 Oct 2021 14:38:00 +0300 (EEST) From: Andy Shevchenko To: Greg Kroah-Hartman , Tomas Winkler , Alexander Usyskin , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?q?=C3=B6nig?= , Andy Shevchenko , linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org Cc: Arnd Bergmann , Christoph Hellwig , Masahiro Yamada , Michal Marek , Nick Desaulniers Subject: [PATCH v3 4/4] mei: Unite uuid.h and mei.h in uAPI Date: Fri, 1 Oct 2021 14:37:47 +0300 Message-Id: <20211001113747.64040-4-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211001113747.64040-1-andriy.shevchenko@linux.intel.com> References: <20211001113747.64040-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org There is only a single user of UUID uAPI, let's make it part of that user. Signed-off-by: Andy Shevchenko Reported-by: kernel test robot --- v3: new patch (Christoph) MAINTAINERS | 1 - drivers/misc/mei/bus-fixup.c | 1 - drivers/misc/mei/hdcp/mei_hdcp.c | 1 - drivers/misc/mei/hw.h | 2 -- drivers/misc/mei/main.c | 1 - include/linux/mei_cl_bus.h | 2 +- include/linux/mod_devicetable.h | 1 + include/linux/uuid.h | 3 --- include/uapi/linux/mei.h | 17 +++++++++++++- include/uapi/linux/uuid.h | 38 -------------------------------- 10 files changed, 18 insertions(+), 49 deletions(-) delete mode 100644 include/uapi/linux/uuid.h diff --git a/MAINTAINERS b/MAINTAINERS index 369a00af62c7..f4c9fa3433d5 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19740,7 +19740,6 @@ L: linux-kernel@vger.kernel.org S: Maintained T: git git://git.infradead.org/users/hch/uuid.git F: include/linux/uuid.h -F: include/uapi/linux/uuid.h F: lib/test_uuid.c F: lib/uuid.c diff --git a/drivers/misc/mei/bus-fixup.c b/drivers/misc/mei/bus-fixup.c index 67844089db21..03baa616a356 100644 --- a/drivers/misc/mei/bus-fixup.c +++ b/drivers/misc/mei/bus-fixup.c @@ -9,7 +9,6 @@ #include #include #include -#include #include diff --git a/drivers/misc/mei/hdcp/mei_hdcp.c b/drivers/misc/mei/hdcp/mei_hdcp.c index ec2a4fce8581..41e38fab425e 100644 --- a/drivers/misc/mei/hdcp/mei_hdcp.c +++ b/drivers/misc/mei/hdcp/mei_hdcp.c @@ -18,7 +18,6 @@ #include #include -#include #include #include #include diff --git a/drivers/misc/mei/hw.h b/drivers/misc/mei/hw.h index dfd60c916da0..9ad2a9b65506 100644 --- a/drivers/misc/mei/hw.h +++ b/drivers/misc/mei/hw.h @@ -7,8 +7,6 @@ #ifndef _MEI_HW_TYPES_H_ #define _MEI_HW_TYPES_H_ -#include - /* * Timeouts in Seconds */ diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index 786f7c8f7f61..15d8f7ae2f31 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -18,7 +18,6 @@ #include #include #include -#include #include #include #include diff --git a/include/linux/mei_cl_bus.h b/include/linux/mei_cl_bus.h index c6786c12b207..521eef218899 100644 --- a/include/linux/mei_cl_bus.h +++ b/include/linux/mei_cl_bus.h @@ -6,8 +6,8 @@ #define _LINUX_MEI_CL_BUS_H #include -#include #include +#include struct mei_cl_device; struct mei_device; diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index ae2e75d15b21..24e60693c44f 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h @@ -11,6 +11,7 @@ #ifdef __KERNEL__ #include #include +#include typedef unsigned long kernel_ulong_t; #endif diff --git a/include/linux/uuid.h b/include/linux/uuid.h index 6b1a3efa1e0b..43d4a79b273d 100644 --- a/include/linux/uuid.h +++ b/include/linux/uuid.h @@ -107,7 +107,4 @@ extern const u8 uuid_index[16]; int guid_parse(const char *uuid, guid_t *u); int uuid_parse(const char *uuid, uuid_t *u); -/* MEI UUID type, don't use anywhere else */ -#include - #endif diff --git a/include/uapi/linux/mei.h b/include/uapi/linux/mei.h index 4f3638489d01..38dded45e8c9 100644 --- a/include/uapi/linux/mei.h +++ b/include/uapi/linux/mei.h @@ -7,7 +7,22 @@ #ifndef _LINUX_MEI_H #define _LINUX_MEI_H -#include +#include + +typedef struct { + __u8 b[16]; +} uuid_le; + +#define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ +((uuid_le) \ +{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ + (b) & 0xff, ((b) >> 8) & 0xff, \ + (c) & 0xff, ((c) >> 8) & 0xff, \ + (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) + +#define NULL_UUID_LE \ + UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ + 0x00, 0x00, 0x00, 0x00) /* * This IOCTL is used to associate the current file descriptor with a diff --git a/include/uapi/linux/uuid.h b/include/uapi/linux/uuid.h deleted file mode 100644 index c3e175f686f4..000000000000 --- a/include/uapi/linux/uuid.h +++ /dev/null @@ -1,38 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* - * MEI UUID definition - * - * Copyright (C) 2010, Intel Corp. - * Huang Ying - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License version - * 2 as published by the Free Software Foundation; - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef _UAPI_LINUX_UUID_H_ -#define _UAPI_LINUX_UUID_H_ - -#include - -typedef struct { - __u8 b[16]; -} uuid_le; - -#define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ -((uuid_le) \ -{{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ - (b) & 0xff, ((b) >> 8) & 0xff, \ - (c) & 0xff, ((c) >> 8) & 0xff, \ - (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) - -#define NULL_UUID_LE \ - UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ - 0x00, 0x00, 0x00, 0x00) - -#endif /* _UAPI_LINUX_UUID_H_ */