Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mei: Move uuid.h to the MEI namespace

There is only a single user of the UUID uAPI, let's make it
part of that user.

The way it's done is to prevent compilation time breakage for
the user space that does

#include <linux/uuid.h>

In the future MEI user space tools can switch over to use mei_uuid.h.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230310170747.22782-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Andy Shevchenko and committed by
Greg Kroah-Hartman
1fb1ea0d abae2626

+37 -39
+1
MAINTAINERS
··· 10459 10459 F: include/linux/mei_aux.h 10460 10460 F: include/linux/mei_cl_bus.h 10461 10461 F: include/uapi/linux/mei.h 10462 + F: include/uapi/linux/mei_uuid.h 10462 10463 F: include/uapi/linux/uuid.h 10463 10464 F: samples/mei/* 10464 10465
+1 -1
drivers/misc/mei/bus-fixup.c
··· 9 9 #include <linux/module.h> 10 10 #include <linux/device.h> 11 11 #include <linux/slab.h> 12 - #include <linux/uuid.h> 13 12 13 + #include <linux/mei.h> 14 14 #include <linux/mei_cl_bus.h> 15 15 16 16 #include "mei_dev.h"
+1 -1
drivers/misc/mei/hdcp/mei_hdcp.c
··· 18 18 19 19 #include <linux/module.h> 20 20 #include <linux/slab.h> 21 - #include <linux/uuid.h> 21 + #include <linux/mei.h> 22 22 #include <linux/mei_cl_bus.h> 23 23 #include <linux/component.h> 24 24 #include <drm/drm_connector.h>
+1 -1
drivers/misc/mei/hw.h
··· 7 7 #ifndef _MEI_HW_TYPES_H_ 8 8 #define _MEI_HW_TYPES_H_ 9 9 10 - #include <linux/uuid.h> 10 + #include <linux/mei.h> 11 11 12 12 /* 13 13 * Timeouts in Seconds
-1
drivers/misc/mei/main.c
··· 18 18 #include <linux/ioctl.h> 19 19 #include <linux/cdev.h> 20 20 #include <linux/sched/signal.h> 21 - #include <linux/uuid.h> 22 21 #include <linux/compat.h> 23 22 #include <linux/jiffies.h> 24 23 #include <linux/interrupt.h>
+1 -1
drivers/misc/mei/pxp/mei_pxp.c
··· 13 13 14 14 #include <linux/module.h> 15 15 #include <linux/slab.h> 16 - #include <linux/uuid.h> 16 + #include <linux/mei.h> 17 17 #include <linux/mei_cl_bus.h> 18 18 #include <linux/component.h> 19 19 #include <drm/drm_connector.h>
+1
include/linux/mod_devicetable.h
··· 9 9 #define LINUX_MOD_DEVICETABLE_H 10 10 11 11 #ifdef __KERNEL__ 12 + #include <linux/mei.h> 12 13 #include <linux/types.h> 13 14 #include <linux/uuid.h> 14 15 typedef unsigned long kernel_ulong_t;
-3
include/linux/uuid.h
··· 107 107 int guid_parse(const char *uuid, guid_t *u); 108 108 int uuid_parse(const char *uuid, uuid_t *u); 109 109 110 - /* MEI UUID type, don't use anywhere else */ 111 - #include <uapi/linux/uuid.h> 112 - 113 110 #endif
+1 -1
include/uapi/linux/mei.h
··· 7 7 #ifndef _LINUX_MEI_H 8 8 #define _LINUX_MEI_H 9 9 10 - #include <linux/uuid.h> 10 + #include <linux/mei_uuid.h> 11 11 12 12 /* 13 13 * This IOCTL is used to associate the current file descriptor with a
+29
include/uapi/linux/mei_uuid.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 + /* 3 + * MEI UUID definition 4 + * 5 + * Copyright (C) 2010, Intel Corp. 6 + * Huang Ying <ying.huang@intel.com> 7 + */ 8 + 9 + #ifndef _UAPI_LINUX_MEI_UUID_H_ 10 + #define _UAPI_LINUX_MEI_UUID_H_ 11 + 12 + #include <linux/types.h> 13 + 14 + typedef struct { 15 + __u8 b[16]; 16 + } uuid_le; 17 + 18 + #define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ 19 + ((uuid_le) \ 20 + {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ 21 + (b) & 0xff, ((b) >> 8) & 0xff, \ 22 + (c) & 0xff, ((c) >> 8) & 0xff, \ 23 + (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) 24 + 25 + #define NULL_UUID_LE \ 26 + UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ 27 + 0x00, 0x00, 0x00, 0x00) 28 + 29 + #endif /* _UAPI_LINUX_MEI_UUID_H_ */
+1 -30
include/uapi/linux/uuid.h
··· 1 - /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2 - /* DO NOT USE in new code! This is solely for MEI due to legacy reasons */ 3 - /* 4 - * MEI UUID definition 5 - * 6 - * Copyright (C) 2010, Intel Corp. 7 - * Huang Ying <ying.huang@intel.com> 8 - */ 9 - 10 - #ifndef _UAPI_LINUX_UUID_H_ 11 - #define _UAPI_LINUX_UUID_H_ 12 - 13 - #include <linux/types.h> 14 - 15 - typedef struct { 16 - __u8 b[16]; 17 - } uuid_le; 18 - 19 - #define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ 20 - ((uuid_le) \ 21 - {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ 22 - (b) & 0xff, ((b) >> 8) & 0xff, \ 23 - (c) & 0xff, ((c) >> 8) & 0xff, \ 24 - (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) 25 - 26 - #define NULL_UUID_LE \ 27 - UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ 28 - 0x00, 0x00, 0x00, 0x00) 29 - 30 - #endif /* _UAPI_LINUX_UUID_H_ */ 1 + #include <linux/mei_uuid.h>