dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_enum_check()

Introduce pldm_bios_table_attr_value_entry_encode_enum(), deprecate
pldm_bios_table_attr_value_entry_encode_enum_check(), add rename
configuration and apply it.

gitlint-ignore: T1
Change-Id: I8fe0da169b9acc919d01ba024503e72fd2792d4e
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 47f9486..e0c0de2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -53,6 +53,7 @@
    - `pldm_bios_table_attr_entry_integer_encode_check()`
    - `pldm_bios_table_attr_entry_string_decode_def_string_length_check()`
    - `pldm_bios_table_attr_entry_string_encode_check()`
+   - `pldm_bios_table_attr_value_entry_encode_enum_check()`
    - `pldm_bios_table_string_entry_decode_string_check()`
    - `pldm_bios_table_string_entry_encode_check()`
    - `pldm_entity_association_pdr_add_check()`
diff --git a/abi/x86_64/gcc.dump b/abi/x86_64/gcc.dump
index e7f6277..68ad89d 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -1598,7 +1598,7 @@
     },
     '17275' => {
       'Header' => 'bios_table.h',
-      'Line' => '657',
+      'Line' => '660',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1618,7 +1618,7 @@
     },
     '17420' => {
       'Header' => 'bios_table.h',
-      'Line' => '648',
+      'Line' => '651',
       'Param' => {
         '0' => {
           'name' => 'src_table',
@@ -1654,7 +1654,7 @@
     },
     '18108' => {
       'Header' => 'bios_table.h',
-      'Line' => '614',
+      'Line' => '617',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1847,7 +1847,7 @@
     },
     '20598' => {
       'Header' => 'bios_table.h',
-      'Line' => '633',
+      'Line' => '636',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1872,7 +1872,7 @@
     },
     '20898' => {
       'Header' => 'bios_table.h',
-      'Line' => '621',
+      'Line' => '624',
       'Param' => {
         '0' => {
           'name' => 'size_without_pad',
@@ -1884,7 +1884,7 @@
     },
     '21253' => {
       'Header' => 'bios_table.h',
-      'Line' => '596',
+      'Line' => '599',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1899,7 +1899,7 @@
     },
     '21302' => {
       'Header' => 'bios_table.h',
-      'Line' => '603',
+      'Line' => '606',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1911,7 +1911,7 @@
     },
     '21786' => {
       'Header' => 'bios_table.h',
-      'Line' => '570',
+      'Line' => '573',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1926,7 +1926,7 @@
     },
     '21926' => {
       'Header' => 'bios_table.h',
-      'Line' => '586',
+      'Line' => '589',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1961,13 +1961,13 @@
     },
     '22195' => {
       'Header' => 'bios_table.h',
-      'Line' => '564',
+      'Line' => '567',
       'Return' => '1145',
       'ShortName' => 'pldm_bios_table_attr_value_entry_encode_integer_length'
     },
     '22357' => {
       'Header' => 'bios_table.h',
-      'Line' => '557',
+      'Line' => '560',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2007,7 +2007,7 @@
     },
     '22757' => {
       'Header' => 'bios_table.h',
-      'Line' => '538',
+      'Line' => '541',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2023,7 +2023,7 @@
     },
     '22852' => {
       'Header' => 'bios_table.h',
-      'Line' => '528',
+      'Line' => '531',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2038,7 +2038,7 @@
     },
     '22993' => {
       'Header' => 'bios_table.h',
-      'Line' => '522',
+      'Line' => '525',
       'Param' => {
         '0' => {
           'name' => 'string_length',
@@ -2086,7 +2086,7 @@
         '5' => 'r13'
       },
       'Return' => '100',
-      'ShortName' => 'pldm_bios_table_attr_value_entry_encode_enum_check'
+      'ShortName' => 'pldm_bios_table_attr_value_entry_encode_enum'
     },
     '23494' => {
       'Header' => 'bios_table.h',
@@ -9488,6 +9488,7 @@
       'pldm_bios_table_attr_value_entry_decode_attribute_handle' => 1,
       'pldm_bios_table_attr_value_entry_decode_attribute_type' => 1,
       'pldm_bios_table_attr_value_entry_decode_handle' => 1,
+      'pldm_bios_table_attr_value_entry_encode_enum' => 1,
       'pldm_bios_table_attr_value_entry_encode_enum_check' => 1,
       'pldm_bios_table_attr_value_entry_encode_enum_length' => 1,
       'pldm_bios_table_attr_value_entry_encode_integer_check' => 1,
diff --git a/evolutions/current/pldm_bios_table_attr_value_entry_encode_enum_check.yaml b/evolutions/current/pldm_bios_table_attr_value_entry_encode_enum_check.yaml
new file mode 100644
index 0000000..cbf2d0b
--- /dev/null
+++ b/evolutions/current/pldm_bios_table_attr_value_entry_encode_enum_check.yaml
@@ -0,0 +1,2 @@
+- QualifiedName: pldm_bios_table_attr_value_entry_encode_enum_check
+  NewName: pldm_bios_table_attr_value_entry_encode_enum
diff --git a/include/libpldm/bios_table.h b/include/libpldm/bios_table.h
index f5975d8..570bb69 100644
--- a/include/libpldm/bios_table.h
+++ b/include/libpldm/bios_table.h
@@ -509,6 +509,9 @@
  *          attr_type is not a PLDM_BIOS_ENUMERATION. PLDM_ERROR_INVALID_LENGTH if entry_length
  *          lacks capacity to encode handles into entry.
  */
+int pldm_bios_table_attr_value_entry_encode_enum(
+	void *entry, size_t entry_length, uint16_t attr_handle,
+	uint8_t attr_type, uint8_t count, const uint8_t *handles);
 int pldm_bios_table_attr_value_entry_encode_enum_check(
 	void *entry, size_t entry_length, uint16_t attr_handle,
 	uint8_t attr_type, uint8_t count, const uint8_t *handles);
diff --git a/meson.build b/meson.build
index 300191e..2da7200 100644
--- a/meson.build
+++ b/meson.build
@@ -41,6 +41,7 @@
     ['pldm_bios_table_attr_entry_integer_encode_check', 'pldm_bios_table_attr_entry_integer_encode'],
     ['pldm_bios_table_attr_entry_string_decode_def_string_length_check', 'pldm_bios_table_attr_entry_string_decode_def_string_length'],
     ['pldm_bios_table_attr_entry_string_encode_check', 'pldm_bios_table_attr_entry_string_encode'],
+    ['pldm_bios_table_attr_value_entry_encode_enum_check', 'pldm_bios_table_attr_value_entry_encode_enum'],
     ['pldm_bios_table_string_entry_decode_string_check', 'pldm_bios_table_string_entry_decode_string'],
     ['pldm_bios_table_string_entry_encode_check', 'pldm_bios_table_string_entry_encode'],
     ['pldm_entity_association_pdr_add_check', 'pldm_entity_association_pdr_add'],
diff --git a/src/dsp/bios_table.c b/src/dsp/bios_table.c
index 0aeee9a..49a7e3c 100644
--- a/src/dsp/bios_table.c
+++ b/src/dsp/bios_table.c
@@ -690,7 +690,7 @@
 }
 
 LIBPLDM_ABI_STABLE
-int pldm_bios_table_attr_value_entry_encode_enum_check(
+int pldm_bios_table_attr_value_entry_encode_enum(
 	void *entry, size_t entry_length, uint16_t attr_handle,
 	uint8_t attr_type, uint8_t count, const uint8_t *handles)
 {
diff --git a/tests/dsp/bios_table.cpp b/tests/dsp/bios_table.cpp
index c9631af..9393586 100644
--- a/tests/dsp/bios_table.cpp
+++ b/tests/dsp/bios_table.cpp
@@ -576,16 +576,16 @@
     EXPECT_EQ(length, enumEntry.size());
     std::vector<uint8_t> encodeEntry(length, 0);
     uint8_t handles[] = {0, 1};
-    ASSERT_EQ(pldm_bios_table_attr_value_entry_encode_enum_check(
+    ASSERT_EQ(pldm_bios_table_attr_value_entry_encode_enum(
                   encodeEntry.data(), encodeEntry.size(), 0, 0, 2, handles),
               PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, enumEntry);
 
-    EXPECT_NE(pldm_bios_table_attr_value_entry_encode_enum_check(
+    EXPECT_NE(pldm_bios_table_attr_value_entry_encode_enum(
                   encodeEntry.data(), encodeEntry.size() - 1, 0, 0, 2, handles),
               PLDM_SUCCESS);
 
-    auto rc = pldm_bios_table_attr_value_entry_encode_enum_check(
+    auto rc = pldm_bios_table_attr_value_entry_encode_enum(
         encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_ENUMERATION, 2,
         handles);
     EXPECT_EQ(rc, PLDM_SUCCESS);
@@ -593,16 +593,16 @@
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         enumEntry.data());
     entry->attr_type = PLDM_BIOS_ENUMERATION_READ_ONLY;
-    rc = pldm_bios_table_attr_value_entry_encode_enum_check(
+    rc = pldm_bios_table_attr_value_entry_encode_enum(
         encodeEntry.data(), encodeEntry.size(), 0,
         PLDM_BIOS_ENUMERATION_READ_ONLY, 2, handles);
     EXPECT_EQ(rc, PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, enumEntry);
-    rc = pldm_bios_table_attr_value_entry_encode_enum_check(
+    rc = pldm_bios_table_attr_value_entry_encode_enum(
         encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_PASSWORD, 2,
         handles);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
-    rc = pldm_bios_table_attr_value_entry_encode_enum_check(
+    rc = pldm_bios_table_attr_value_entry_encode_enum(
         encodeEntry.data(), encodeEntry.size() - 1, 0, PLDM_BIOS_ENUMERATION, 2,
         handles);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);