mei: Move uuid.h to the MEI namespace
Subsystems (3)
Andy Shevchenko
reviewerPATCH 1/1 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.
---
MAINTAINERS | 1 +
drivers/misc/mei/bus-fixup.c | 2 +-
drivers/misc/mei/hdcp/mei_hdcp.c | 2 +-
drivers/misc/mei/hw.h | 2 +-
drivers/misc/mei/main.c | 1 -
drivers/misc/mei/pxp/mei_pxp.c | 2 +-
include/linux/mod_devicetable.h | 1 +
include/linux/uuid.h | 3 ---
include/uapi/linux/mei.h | 2 +-
include/uapi/linux/{uuid.h => mei_uuid.h} | 7 +++--
include/uapi/linux/uuid.h | 31 +----------------------
11 files changed, 11 insertions(+), 43 deletions(-)
copy include/uapi/linux/{uuid.h => mei_uuid.h} (79%)MAINTAINERS +1 -0
@@ -10479,6 +10479,7 @@ F: drivers/watchdog/mei_wdt.c F: include/linux/mei_aux.h F: include/linux/mei_cl_bus.h F: include/uapi/linux/mei.h +F: include/uapi/linux/mei_uuid.h F: include/uapi/linux/uuid.h F: samples/mei/*
drivers/misc/mei/bus-fixup.c +1 -1
@@ -9,8 +9,8 @@#include <linux/module.h> #include <linux/device.h> #include <linux/slab.h> -#include <linux/uuid.h> +#include <linux/mei.h> #include <linux/mei_cl_bus.h> #include "mei_dev.h"
drivers/misc/mei/hdcp/mei_hdcp.c +1 -1
@@ -18,7 +18,7 @@#include <linux/module.h> #include <linux/slab.h> -#include <linux/uuid.h> +#include <linux/mei.h> #include <linux/mei_cl_bus.h> #include <linux/component.h> #include <drm/drm_connector.h>
drivers/misc/mei/hw.h +1 -1
@@ -7,7 +7,7 @@#ifndef _MEI_HW_TYPES_H_#define _MEI_HW_TYPES_H_ -#include <linux/uuid.h> +#include <linux/mei.h> /* * Timeouts in Seconds
drivers/misc/mei/main.c +0 -1
@@ -18,7 +18,6 @@#include <linux/ioctl.h> #include <linux/cdev.h> #include <linux/sched/signal.h> -#include <linux/uuid.h> #include <linux/compat.h> #include <linux/jiffies.h> #include <linux/interrupt.h>
drivers/misc/mei/pxp/mei_pxp.c +1 -1
@@ -13,7 +13,7 @@#include <linux/module.h> #include <linux/slab.h> -#include <linux/uuid.h> +#include <linux/mei.h> #include <linux/mei_cl_bus.h> #include <linux/component.h> #include <drm/drm_connector.h>
include/linux/mod_devicetable.h +1 -0
@@ -9,6 +9,7 @@#define LINUX_MOD_DEVICETABLE_H #ifdef __KERNEL__ +#include <linux/mei.h> #include <linux/types.h> #include <linux/uuid.h> typedef unsigned long kernel_ulong_t ;
include/linux/uuid.h +0 -3
@@ -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 <uapi/linux/uuid.h> -#endif
include/uapi/linux/mei.h +1 -1
@@ -7,7 +7,7 @@#ifndef _LINUX_MEI_H#define _LINUX_MEI_H -#include <linux/uuid.h> +#include <linux/mei_uuid.h> /* * This IOCTL is used to associate the current file descriptor with a
include/uapi/linux/mei_uuid.h renamed from include/uapi/linux/uuid.h +3 -4
@@ -1,5 +1,4 @@/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* DO NOT USE in new code! This is solely for MEI due to legacy reasons */ /* * MEI UUID definition *
@@ -7,8 +6,8 @@* Huang Ying <[email protected]> */ -#ifndef _UAPI_LINUX_UUID_H_ -#define _UAPI_LINUX_UUID_H_ +#ifndef _UAPI_LINUX_MEI_UUID_H_ +#define _UAPI_LINUX_MEI_UUID_H_#include <linux/types.h>
@@ -27,4 +26,4 @@ typedef struct {UUID_LE (0x00000000 ,0x0000 ,0x0000 ,0x00 ,0x00 ,0x00 ,0x00 , \ 0x00, 0x00, 0x00, 0x00) -#endif /* _UAPI_LINUX_UUID_H_ */ +#endif /* _UAPI_LINUX_MEI_UUID_H_ */
include/uapi/linux/uuid.h +1 -30
@@ -1,30 +1 @@ -/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ -/* DO NOT USE in new code! This is solely for MEI due to legacy reasons */ -/* -* MEI UUID definition -* -* Copyright (C) 2010, Intel Corp. -* Huang Ying <[email protected]> -*/ - -#ifndef _UAPI_LINUX_UUID_H_ -#define _UAPI_LINUX_UUID_H_ - -#include <linux/types.h> - -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_ */ +#include <linux/mei_uuid.h>
Signature · 1 line
2.39.1
Greg Kroah-Hartman
maintainerQuoted 9 lines · Andy Shevchenko
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.
When will that happen?
And why the churn, what's the problem with keeping this as uuid.h?
thanks,
greg k-h
Andy Shevchenko
reviewerQuoted 4 lines · Greg Kroah-Hartman
Quoted 3 lines · Andy Shevchenko
There is only a single user of the UUID uAPI, let's make it part of that user.
Quoted 8 lines
Quoted 6 lines
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.When will that happen?
I don't know
Quoted 1 line
And why the churn, what's the problem with keeping this as
uuid.h?
The problem here is a possible confusion with uAPI and internal headers with the same name.
Signature · 2 lines
With Best Regards, Andy Shevchenko