From patchwork Wed Jul 19 18:28:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 9852951 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 23429602BD for ; Wed, 19 Jul 2017 18:29:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0F03A285F5 for ; Wed, 19 Jul 2017 18:29:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 03ADA28623; Wed, 19 Jul 2017 18:29:28 +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=unavailable 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 9699B285F5 for ; Wed, 19 Jul 2017 18:29:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933172AbdGSS3J (ORCPT ); Wed, 19 Jul 2017 14:29:09 -0400 Received: from mga14.intel.com ([192.55.52.115]:65446 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932250AbdGSS3G (ORCPT ); Wed, 19 Jul 2017 14:29:06 -0400 Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Jul 2017 11:29:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,381,1496127600"; d="scan'208";a="113195740" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga002.jf.intel.com with ESMTP; 19 Jul 2017 11:29:03 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 29D38248; Wed, 19 Jul 2017 21:28:58 +0300 (EEST) From: Andy Shevchenko 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 , linux-kernel@vger.kernel.org, Lukas Wunner Cc: Andy Shevchenko Subject: [PATCH v1 5/6] uuid: Kill uapi/uuid.h Date: Wed, 19 Jul 2017 21:28:56 +0300 Message-Id: <20170719182857.73693-6-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170719182857.73693-1-andriy.shevchenko@linux.intel.com> References: <20170719182857.73693-1-andriy.shevchenko@linux.intel.com> Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 +#include +#include + +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 - * - * 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 -#include - -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);