Commit 6f9c104b authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Rafael J. Wysocki

APEI / ERST: 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.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarBorislav Petkov <bp@suse.de>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 1c7fc5cb
...@@ -938,16 +938,16 @@ static struct pstore_info erst_info = { ...@@ -938,16 +938,16 @@ static struct pstore_info erst_info = {
}; };
#define CPER_CREATOR_PSTORE \ #define CPER_CREATOR_PSTORE \
UUID_LE(0x75a574e3, 0x5052, 0x4b29, 0x8a, 0x8e, 0xbe, 0x2c, \ GUID_INIT(0x75a574e3, 0x5052, 0x4b29, 0x8a, 0x8e, 0xbe, 0x2c, \
0x64, 0x90, 0xb8, 0x9d) 0x64, 0x90, 0xb8, 0x9d)
#define CPER_SECTION_TYPE_DMESG \ #define CPER_SECTION_TYPE_DMESG \
UUID_LE(0xc197e04e, 0xd545, 0x4a70, 0x9c, 0x17, 0xa5, 0x54, \ GUID_INIT(0xc197e04e, 0xd545, 0x4a70, 0x9c, 0x17, 0xa5, 0x54, \
0x94, 0x19, 0xeb, 0x12) 0x94, 0x19, 0xeb, 0x12)
#define CPER_SECTION_TYPE_DMESG_Z \ #define CPER_SECTION_TYPE_DMESG_Z \
UUID_LE(0x4f118707, 0x04dd, 0x4055, 0xb5, 0xdd, 0x95, 0x6d, \ GUID_INIT(0x4f118707, 0x04dd, 0x4055, 0xb5, 0xdd, 0x95, 0x6d, \
0x34, 0xdd, 0xfa, 0xc6) 0x34, 0xdd, 0xfa, 0xc6)
#define CPER_SECTION_TYPE_MCE \ #define CPER_SECTION_TYPE_MCE \
UUID_LE(0xfe08ffbe, 0x95e4, 0x4be7, 0xbc, 0x73, 0x40, 0x96, \ GUID_INIT(0xfe08ffbe, 0x95e4, 0x4be7, 0xbc, 0x73, 0x40, 0x96, \
0x04, 0x4a, 0x38, 0xfc) 0x04, 0x4a, 0x38, 0xfc)
struct cper_pstore_record { struct cper_pstore_record {
...@@ -1012,7 +1012,7 @@ static ssize_t erst_reader(struct pstore_record *record) ...@@ -1012,7 +1012,7 @@ static ssize_t erst_reader(struct pstore_record *record)
rc = -EIO; rc = -EIO;
goto out; goto out;
} }
if (uuid_le_cmp(rcd->hdr.creator_id, CPER_CREATOR_PSTORE) != 0) if (!guid_equal(&rcd->hdr.creator_id, &CPER_CREATOR_PSTORE))
goto skip; goto skip;
record->buf = kmalloc(len, GFP_KERNEL); record->buf = kmalloc(len, GFP_KERNEL);
...@@ -1024,15 +1024,12 @@ static ssize_t erst_reader(struct pstore_record *record) ...@@ -1024,15 +1024,12 @@ static ssize_t erst_reader(struct pstore_record *record)
record->id = record_id; record->id = record_id;
record->compressed = false; record->compressed = false;
record->ecc_notice_size = 0; record->ecc_notice_size = 0;
if (uuid_le_cmp(rcd->sec_hdr.section_type, if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG_Z)) {
CPER_SECTION_TYPE_DMESG_Z) == 0) {
record->type = PSTORE_TYPE_DMESG; record->type = PSTORE_TYPE_DMESG;
record->compressed = true; record->compressed = true;
} else if (uuid_le_cmp(rcd->sec_hdr.section_type, } else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_DMESG))
CPER_SECTION_TYPE_DMESG) == 0)
record->type = PSTORE_TYPE_DMESG; record->type = PSTORE_TYPE_DMESG;
else if (uuid_le_cmp(rcd->sec_hdr.section_type, else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SECTION_TYPE_MCE))
CPER_SECTION_TYPE_MCE) == 0)
record->type = PSTORE_TYPE_MCE; record->type = PSTORE_TYPE_MCE;
else else
record->type = PSTORE_TYPE_MAX; record->type = PSTORE_TYPE_MAX;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment