S390/sysinfo: use uuid_is_null instead of opencoding it
authorChristoph Hellwig <hch@lst.de>
Thu, 11 May 2017 12:00:57 +0000 (14:00 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 5 Jun 2017 14:59:06 +0000 (16:59 +0200)
And switch to use uuid_t instead of the old uuid_be type.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
arch/s390/include/asm/sysinfo.h
arch/s390/kernel/sysinfo.c

index e784bed6ed7ffb24cabb02eb92a1d90494e3b7e1..2b498e58b91424b30d1f832aaf9eb1bda2fdf60a 100644 (file)
@@ -109,7 +109,7 @@ struct sysinfo_2_2_2 {
        unsigned short cpus_shared;
        char reserved_4[3];
        unsigned char vsne;
-       uuid_be uuid;
+       uuid_t uuid;
        char reserved_5[160];
        char ext_name[256];
 };
@@ -134,7 +134,7 @@ struct sysinfo_3_2_2 {
                char reserved_1[3];
                unsigned char evmne;
                unsigned int reserved_2;
-               uuid_be uuid;
+               uuid_t uuid;
        } vm[8];
        char reserved_3[1504];
        char ext_names[8][256];
index eefcb54872a59326e9178978fcff4b0814a97432..fb869b10382567d3be66c1c73e7beaa06876f942 100644 (file)
@@ -242,7 +242,7 @@ static void print_ext_name(struct seq_file *m, int lvl,
 
 static void print_uuid(struct seq_file *m, int i, struct sysinfo_3_2_2 *info)
 {
-       if (!memcmp(&info->vm[i].uuid, &NULL_UUID_BE, sizeof(uuid_be)))
+       if (uuid_is_null(&info->vm[i].uuid))
                return;
        seq_printf(m, "VM%02d UUID:            %pUb\n", i, &info->vm[i].uuid);
 }