lg2: use direct enum conversion
lg2 now allows logging an enum directly without extra casting. Remove
the `underlying_cast` to simplify the code.
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
Change-Id: I3415be5f7e9be2302c870b5499f96cda3545d0fa
diff --git a/host-transport-extensions/pldm/common/pldm_utils.cpp b/host-transport-extensions/pldm/common/pldm_utils.cpp
index 8682894..220b8f8 100644
--- a/host-transport-extensions/pldm/common/pldm_utils.cpp
+++ b/host-transport-extensions/pldm/common/pldm_utils.cpp
@@ -25,10 +25,8 @@
if (fd < 0)
{
auto e = errno;
- lg2::error(
- "pldm_open failed, errno: {ERRNO}, FD: FD", "ERRNO", e, "FD",
- static_cast<std::underlying_type<pldm_requester_error_codes>::type>(
- fd));
+ lg2::error("pldm_open failed, errno: {ERRNO}, FD: FD", "ERRNO", e, "FD",
+ fd);
elog<NotAllowed>(
Reason("Required host dump action via pldm is not allowed due "
"to pldm_open failed"));
diff --git a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
index 6bc2aae..26cde56 100644
--- a/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
+++ b/host-transport-extensions/pldm/oem/ibm/pldm_oem_cmds.cpp
@@ -176,10 +176,8 @@
"Failed to encode pldm FileAck to delete host dump, "
"SRC_DUMP_ID: {SRC_DUMP_ID}, PLDM_FILE_IO_TYPE: {PLDM_DUMP_TYPE}, "
"PLDM_RETURN_CODE: {RET_CODE}",
- "SRC_DUMP_ID", dumpId, "PLDM_DUMP_TYPE",
- static_cast<std::underlying_type<pldm_fileio_file_type>::type>(
- pldmDumpType),
- "RET_CODE", retCode);
+ "SRC_DUMP_ID", dumpId, "PLDM_DUMP_TYPE", pldmDumpType "RET_CODE",
+ retCode);
elog<NotAllowed>(Reason("Host dump deletion via pldm is not "
"allowed due to encode fileack failed"));
}