diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-08-22 20:26:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-23 00:56:03 +0300 |
commit | b32c5cb84fd0c4539227b5973d378111e35bd9c5 (patch) | |
tree | be8c4167091ae343df6ac44c71298edfc699b8dd /drivers/staging/unisys/include | |
parent | ab61097c7664b108cada2a734a5abfea0883a2ad (diff) | |
download | linux-b32c5cb84fd0c4539227b5973d378111e35bd9c5.tar.xz |
staging: unisys: Switch to use new generic UUID API
There are new types and helpers that are supposed to be used in new code.
As a preparation to get rid of legacy types and API functions do
the conversion here.
While here, re-indent couple of lines to increase readability.
Cc: David Kershner <david.kershner@unisys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: sparmaintainer@unisys.com
Cc: devel@driverdev.osuosl.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/include')
-rw-r--r-- | drivers/staging/unisys/include/channel.h | 29 | ||||
-rw-r--r-- | drivers/staging/unisys/include/iochannel.h | 2 | ||||
-rw-r--r-- | drivers/staging/unisys/include/visorbus.h | 14 |
3 files changed, 21 insertions, 24 deletions
diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h index d6d99cc33a33..2dac0e51d107 100644 --- a/drivers/staging/unisys/include/channel.h +++ b/drivers/staging/unisys/include/channel.h @@ -128,13 +128,13 @@ struct channel_header { u32 header_size; u64 size; u64 features; - uuid_le chtype; + guid_t chtype; u64 partition_handle; u64 handle; u64 ch_space_offset; u32 version_id; u32 partition_index; - uuid_le zone_uuid; + guid_t zone_guid; u32 cli_str_offset; u32 cli_state_boot; u32 cmd_state_cli; @@ -204,23 +204,20 @@ struct signal_queue_header { /* CHANNEL Guids */ /* {414815ed-c58c-11da-95a9-00e08161165f} */ -#define VISOR_VHBA_CHANNEL_UUID \ - UUID_LE(0x414815ed, 0xc58c, 0x11da, \ - 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) -static const uuid_le visor_vhba_channel_uuid = VISOR_VHBA_CHANNEL_UUID; -#define VISOR_VHBA_CHANNEL_UUID_STR \ +#define VISOR_VHBA_CHANNEL_GUID \ + GUID_INIT(0x414815ed, 0xc58c, 0x11da, \ + 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) +#define VISOR_VHBA_CHANNEL_GUID_STR \ "414815ed-c58c-11da-95a9-00e08161165f" /* {8cd5994d-c58e-11da-95a9-00e08161165f} */ -#define VISOR_VNIC_CHANNEL_UUID \ - UUID_LE(0x8cd5994d, 0xc58e, 0x11da, \ - 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) -static const uuid_le visor_vnic_channel_uuid = VISOR_VNIC_CHANNEL_UUID; -#define VISOR_VNIC_CHANNEL_UUID_STR \ +#define VISOR_VNIC_CHANNEL_GUID \ + GUID_INIT(0x8cd5994d, 0xc58e, 0x11da, \ + 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) +#define VISOR_VNIC_CHANNEL_GUID_STR \ "8cd5994d-c58e-11da-95a9-00e08161165f" /* {72120008-4AAB-11DC-8530-444553544200} */ -#define VISOR_SIOVM_UUID \ - UUID_LE(0x72120008, 0x4AAB, 0x11DC, \ - 0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00) -static const uuid_le visor_siovm_uuid = VISOR_SIOVM_UUID; +#define VISOR_SIOVM_GUID \ + GUID_INIT(0x72120008, 0x4AAB, 0x11DC, \ + 0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00) #endif diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h index 40eb7d559bf7..d2ef70549fab 100644 --- a/drivers/staging/unisys/include/iochannel.h +++ b/drivers/staging/unisys/include/iochannel.h @@ -562,7 +562,7 @@ struct iochannel_vnic { /* 4 bytes */ u32 mtu; /* 16 bytes */ - uuid_le zone_uuid; + guid_t zone_guid; } __packed; /* diff --git a/drivers/staging/unisys/include/visorbus.h b/drivers/staging/unisys/include/visorbus.h index 17c92294b4d1..354de7fdf4c0 100644 --- a/drivers/staging/unisys/include/visorbus.h +++ b/drivers/staging/unisys/include/visorbus.h @@ -58,7 +58,7 @@ struct visorchipset_state { * GUID, name, and sizes. */ struct visor_channeltype_descriptor { - const uuid_le guid; + const guid_t guid; const char *name; }; @@ -141,14 +141,14 @@ struct visor_driver { * hypervisor requests. * @vbus_hdr_info: A pointer to header info. Private use by bus * driver. - * @partition_uuid: Indicates client partion id. This should be the + * @partition_guid: Indicates client partion id. This should be the * same across all visor_devices in the current * guest. Private use by bus driver only. */ struct visor_device { struct visorchannel *visorchannel; - uuid_le channel_type_guid; + guid_t channel_type_guid; /* These fields are for private use by the bus driver only. */ struct device device; struct list_head list_all; @@ -161,18 +161,18 @@ struct visor_device { u32 chipset_bus_no; u32 chipset_dev_no; struct visorchipset_state state; - uuid_le inst; + guid_t inst; u8 *name; struct controlvm_message_header *pending_msg_hdr; void *vbus_hdr_info; - uuid_le partition_uuid; + guid_t partition_guid; struct dentry *debugfs_dir; struct dentry *debugfs_client_bus_info; }; #define to_visor_device(x) container_of(x, struct visor_device, device) -int visor_check_channel(struct channel_header *ch, uuid_le expected_uuid, +int visor_check_channel(struct channel_header *ch, const guid_t *expected_guid, char *chname, u64 expected_min_bytes, u32 expected_version, u64 expected_signature); @@ -211,7 +211,7 @@ int visorchannel_signalremove(struct visorchannel *channel, u32 queue, int visorchannel_signalinsert(struct visorchannel *channel, u32 queue, void *msg); bool visorchannel_signalempty(struct visorchannel *channel, u32 queue); -uuid_le visorchannel_get_uuid(struct visorchannel *channel); +const guid_t *visorchannel_get_guid(struct visorchannel *channel); #define BUS_ROOT_DEVICE UINT_MAX struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no, |