All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: linux-acpi@vger.kernel.org, devel@linuxdriverproject.org,
	sparmaintainer@unisys.com, devel@driverdev.osuosl.org,
	linux-wireless@vger.kernel.org, linux-watchdog@vger.kernel.org,
	linux-efi@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	linux-kernel@vger.kernel.org, Lukas Wunner <lukas@wunner.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 5/6] uuid: Kill uapi/uuid.h
Date: Wed, 19 Jul 2017 21:28:56 +0300	[thread overview]
Message-ID: <20170719182857.73693-6-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20170719182857.73693-1-andriy.shevchenko@linux.intel.com>

There is no more users for uapi/uuid.h. Remove it for good.

Anyone needs it in user space better to use libuuid.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 include/linux/uuid.h      | 20 +++++++++++++++++++-
 include/uapi/linux/uuid.h | 42 ------------------------------------------
 scripts/mod/file2alias.c  |  4 ++--
 3 files changed, 21 insertions(+), 45 deletions(-)
 delete mode 100644 include/uapi/linux/uuid.h

diff --git a/include/linux/uuid.h b/include/linux/uuid.h
index 2251e1925ea4..3bc3e88c9fbd 100644
--- a/include/linux/uuid.h
+++ b/include/linux/uuid.h
@@ -16,7 +16,19 @@
 #ifndef _LINUX_UUID_H_
 #define _LINUX_UUID_H_
 
-#include <uapi/linux/uuid.h>
+#include <linux/types.h>
+#include <linux/string.h>
+
+typedef struct {
+	__u8 b[16];
+} guid_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_SIZE 16
 
@@ -84,12 +96,18 @@ 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 */
+typedef guid_t uuid_le;
 typedef uuid_t uuid_be;
 #define UUID_BE(a, _b, c, d0, d1, d2, d3, d4, d5, d6, d7) \
 	UUID_INIT(a, _b, c, d0, d1, d2, d3, d4, d5, d6, d7)
+#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_BE 							\
 	UUID_BE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00,	\
 	     0x00, 0x00, 0x00, 0x00)
+#define NULL_UUID_LE							\
+	UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00,	\
+	     0x00, 0x00, 0x00, 0x00)
 
 #define uuid_le_gen(u)		guid_gen(u)
 #define uuid_be_gen(u)		uuid_gen(u)
diff --git a/include/uapi/linux/uuid.h b/include/uapi/linux/uuid.h
deleted file mode 100644
index 8ef82f433877..000000000000
--- a/include/uapi/linux/uuid.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * UUID/GUID definition
- *
- * Copyright (C) 2010, Intel Corp.
- *	Huang Ying <ying.huang@intel.com>
- *
- * 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 <linux/types.h>
-#include <linux/string.h>
-
-typedef struct {
-	__u8 b[16];
-} guid_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) }})
-
-/* 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)
-
-#endif /* _UAPI_LINUX_UUID_H_ */
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 29d6699d5a06..1c68709123aa 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -36,7 +36,7 @@ typedef uint16_t	__u16;
 typedef unsigned char	__u8;
 typedef struct {
 	__u8 b[16];
-} uuid_le;
+} guid_t;
 
 /* Big exception to the "don't include kernel headers into userspace, which
  * even potentially has different endianness and word sizes, since
@@ -134,7 +134,7 @@ static inline void add_wildcard(char *str)
 		strcat(str + len, "*");
 }
 
-static inline void add_uuid(char *str, uuid_le uuid)
+static inline void add_uuid(char *str, guid_t uuid)
 {
 	int len = strlen(str);
 
-- 
2.11.0

  parent reply	other threads:[~2017-07-19 18:28 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-19 18:28 [PATCH v1 0/6] uuid: Convert rest users to new API Andy Shevchenko
2017-07-19 18:28 ` Andy Shevchenko
2017-07-19 18:28 ` [PATCH v1 1/6] efi: Switch to use new generic UUID API Andy Shevchenko
2017-07-19 18:28   ` Andy Shevchenko
2017-07-20 12:18   ` Ard Biesheuvel
2017-07-25 10:40     ` Andy Shevchenko
2017-07-25 10:40       ` Andy Shevchenko
2017-07-25 10:40       ` Andy Shevchenko
     [not found]       ` <1500979206.29303.228.camel-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-26  7:52         ` Christoph Hellwig
2017-07-26  7:52           ` Christoph Hellwig
     [not found]           ` <20170726075212.GB10959-jcswGhMUV9g@public.gmane.org>
2017-07-26  8:36             ` Ard Biesheuvel
2017-07-26  8:36               ` Ard Biesheuvel
2017-08-30 12:41   ` Christoph Hellwig
2017-07-19 18:28 ` [PATCH v1 3/6] staging: unisys: " Andy Shevchenko
2017-07-26 10:01   ` Andy Shevchenko
2017-07-26 10:01     ` Andy Shevchenko
2017-07-30 15:32     ` Greg Kroah-Hartman
2017-07-30 17:26       ` Andy Shevchenko
     [not found]         ` <CAHp75Vf+Us5n2_u94sVGs7xuvfF-qoaG4tvmixvqRARo68TT7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-07-30 17:37           ` Greg Kroah-Hartman
2017-07-30 17:37             ` Greg Kroah-Hartman
2017-07-31 17:20             ` Andy Shevchenko
2017-08-30 12:38               ` Christoph Hellwig
2017-08-30 13:09                 ` Andy Shevchenko
     [not found]                 ` <20170830123845.lw4vkjbcvivi5hpi-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2017-08-30 13:11                   ` Greg Kroah-Hartman
2017-08-30 13:11                     ` Greg Kroah-Hartman
2017-07-19 18:28 ` [PATCH v1 4/6] vmbus: " Andy Shevchenko
2017-07-19 20:18   ` Haiyang Zhang
2017-07-19 20:18     ` Haiyang Zhang
2017-07-19 21:54     ` Andy Shevchenko
2017-07-22 18:46   ` kbuild test robot
2017-07-22 18:46     ` kbuild test robot
     [not found]   ` <20170719182857.73693-5-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-24 15:54     ` Christoph Hellwig
2017-07-24 15:54       ` Christoph Hellwig
2017-07-19 18:28 ` Andy Shevchenko [this message]
     [not found]   ` <20170719182857.73693-6-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-22 18:48     ` [PATCH v1 5/6] uuid: Kill uapi/uuid.h kbuild test robot
2017-07-22 18:48       ` kbuild test robot
2017-07-24 15:54     ` Christoph Hellwig
2017-07-24 15:54       ` Christoph Hellwig
     [not found] ` <20170719182857.73693-1-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-19 18:28   ` [PATCH v1 2/6] mei: Switch to use new generic UUID API Andy Shevchenko
2017-07-19 18:28     ` Andy Shevchenko
     [not found]     ` <20170719182857.73693-3-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-22 18:45       ` kbuild test robot
2017-07-22 18:45         ` kbuild test robot
2017-07-19 18:28   ` [PATCH v1 6/6] device property: " Andy Shevchenko
2017-07-19 18:28     ` Andy Shevchenko
     [not found]     ` <20170719182857.73693-7-andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2017-07-19 19:27       ` Rafael J. Wysocki
2017-07-19 19:27         ` Rafael J. Wysocki
2017-07-25 14:12     ` Mika Westerberg
2017-07-25 14:12       ` Mika Westerberg
2017-07-26  0:21       ` Rafael J. Wysocki
2017-07-26  0:35         ` Andy Shevchenko
2017-07-26  0:35           ` Andy Shevchenko
2017-07-26  0:27           ` Rafael J. Wysocki
2017-07-26  0:27             ` Rafael J. Wysocki
2017-07-26 10:03             ` Andy Shevchenko
2017-07-26 18:58               ` Rafael J. Wysocki
2017-08-30 12:41             ` Christoph Hellwig
2017-08-30 12:41               ` Christoph Hellwig
2017-08-30 13:46               ` Rafael J. Wysocki
2017-08-30 13:57                 ` Christoph Hellwig
2017-08-30 13:57                   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170719182857.73693-6-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devel@linuxdriverproject.org \
    --cc=hch@lst.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-efi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=lukas@wunner.de \
    --cc=sparmaintainer@unisys.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.