dsp: bios_table: Rename pldm_bios_table_attr_entry_string_encode_check()

Introduce pldm_bios_table_attr_entry_string_encode(), deprecate
pldm_bios_table_attr_entry_string_encode_check(), add the rename
configuration and apply it.

Change-Id: I7c2b70784dd91757723857ca9544d9462937a8a7
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 88f1199..ae1ec68 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -50,6 +50,7 @@
    - `pldm_bios_table_attr_entry_enum_decode_pv_hdls_check()`
    - `pldm_bios_table_attr_entry_enum_decode_pv_num_check()`
    - `pldm_bios_table_attr_entry_enum_encode_check()`
+   - `pldm_bios_table_attr_entry_string_encode_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 09ea622..750caf5 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -1598,7 +1598,7 @@
     },
     '17275' => {
       'Header' => 'bios_table.h',
-      'Line' => '648',
+      'Line' => '651',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1618,7 +1618,7 @@
     },
     '17420' => {
       'Header' => 'bios_table.h',
-      'Line' => '639',
+      'Line' => '642',
       'Param' => {
         '0' => {
           'name' => 'src_table',
@@ -1654,7 +1654,7 @@
     },
     '18108' => {
       'Header' => 'bios_table.h',
-      'Line' => '605',
+      'Line' => '608',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1847,7 +1847,7 @@
     },
     '20598' => {
       'Header' => 'bios_table.h',
-      'Line' => '624',
+      'Line' => '627',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1872,7 +1872,7 @@
     },
     '20898' => {
       'Header' => 'bios_table.h',
-      'Line' => '612',
+      'Line' => '615',
       'Param' => {
         '0' => {
           'name' => 'size_without_pad',
@@ -1884,7 +1884,7 @@
     },
     '21253' => {
       'Header' => 'bios_table.h',
-      'Line' => '587',
+      'Line' => '590',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1899,7 +1899,7 @@
     },
     '21302' => {
       'Header' => 'bios_table.h',
-      'Line' => '594',
+      'Line' => '597',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1911,7 +1911,7 @@
     },
     '21786' => {
       'Header' => 'bios_table.h',
-      'Line' => '561',
+      'Line' => '564',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1926,7 +1926,7 @@
     },
     '21926' => {
       'Header' => 'bios_table.h',
-      'Line' => '577',
+      'Line' => '580',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1961,13 +1961,13 @@
     },
     '22195' => {
       'Header' => 'bios_table.h',
-      'Line' => '555',
+      'Line' => '558',
       'Return' => '1145',
       'ShortName' => 'pldm_bios_table_attr_value_entry_encode_integer_length'
     },
     '22357' => {
       'Header' => 'bios_table.h',
-      'Line' => '548',
+      'Line' => '551',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2007,7 +2007,7 @@
     },
     '22757' => {
       'Header' => 'bios_table.h',
-      'Line' => '529',
+      'Line' => '532',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2023,7 +2023,7 @@
     },
     '22852' => {
       'Header' => 'bios_table.h',
-      'Line' => '519',
+      'Line' => '522',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2038,7 +2038,7 @@
     },
     '22993' => {
       'Header' => 'bios_table.h',
-      'Line' => '513',
+      'Line' => '516',
       'Param' => {
         '0' => {
           'name' => 'string_length',
@@ -2053,7 +2053,7 @@
     },
     '23175' => {
       'Header' => 'bios_table.h',
-      'Line' => '503',
+      'Line' => '506',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2090,7 +2090,7 @@
     },
     '23494' => {
       'Header' => 'bios_table.h',
-      'Line' => '484',
+      'Line' => '487',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2110,7 +2110,7 @@
     },
     '23741' => {
       'Header' => 'bios_table.h',
-      'Line' => '474',
+      'Line' => '477',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2125,7 +2125,7 @@
     },
     '23790' => {
       'Header' => 'bios_table.h',
-      'Line' => '468',
+      'Line' => '471',
       'Param' => {
         '0' => {
           'name' => 'count',
@@ -2140,7 +2140,7 @@
     },
     '23839' => {
       'Header' => 'bios_table.h',
-      'Line' => '461',
+      'Line' => '464',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2155,7 +2155,7 @@
     },
     '23888' => {
       'Header' => 'bios_table.h',
-      'Line' => '454',
+      'Line' => '457',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2170,7 +2170,7 @@
     },
     '24435' => {
       'Header' => 'bios_table.h',
-      'Line' => '446',
+      'Line' => '449',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2205,7 +2205,7 @@
     },
     '24571' => {
       'Header' => 'bios_table.h',
-      'Line' => '434',
+      'Line' => '437',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2230,7 +2230,7 @@
     },
     '24843' => {
       'Header' => 'bios_table.h',
-      'Line' => '415',
+      'Line' => '418',
       'Param' => {
         '0' => {
           'name' => 'info',
@@ -2246,13 +2246,13 @@
     },
     '25147' => {
       'Header' => 'bios_table.h',
-      'Line' => '422',
+      'Line' => '425',
       'Return' => '1145',
       'ShortName' => 'pldm_bios_table_attr_entry_integer_encode_length'
     },
     '25309' => {
       'Header' => 'bios_table.h',
-      'Line' => '389',
+      'Line' => '392',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2272,7 +2272,7 @@
     },
     '25578' => {
       'Header' => 'bios_table.h',
-      'Line' => '381',
+      'Line' => '384',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2287,7 +2287,7 @@
     },
     '25647' => {
       'Header' => 'bios_table.h',
-      'Line' => '373',
+      'Line' => '376',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2302,7 +2302,7 @@
     },
     '25716' => {
       'Header' => 'bios_table.h',
-      'Line' => '365',
+      'Line' => '368',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2317,7 +2317,7 @@
     },
     '25785' => {
       'Header' => 'bios_table.h',
-      'Line' => '357',
+      'Line' => '360',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -2357,7 +2357,7 @@
         '2' => 'rbx'
       },
       'Return' => '100',
-      'ShortName' => 'pldm_bios_table_attr_entry_string_encode_check'
+      'ShortName' => 'pldm_bios_table_attr_entry_string_encode'
     },
     '26319' => {
       'Header' => 'bios_table.h',
@@ -9473,6 +9473,7 @@
       'pldm_bios_table_attr_entry_string_decode_max_length' => 1,
       'pldm_bios_table_attr_entry_string_decode_min_length' => 1,
       'pldm_bios_table_attr_entry_string_decode_string_type' => 1,
+      'pldm_bios_table_attr_entry_string_encode' => 1,
       'pldm_bios_table_attr_entry_string_encode_check' => 1,
       'pldm_bios_table_attr_entry_string_encode_length' => 1,
       'pldm_bios_table_attr_entry_string_info_check' => 1,
@@ -10446,7 +10447,7 @@
     },
     '16507' => {
       'Header' => 'bios_table.h',
-      'Line' => '399',
+      'Line' => '402',
       'Memb' => {
         '0' => {
           'name' => 'name_handle',
diff --git a/evolutions/current/pldm_bios_table_attr_entry_string_encode_check.yaml b/evolutions/current/pldm_bios_table_attr_entry_string_encode_check.yaml
new file mode 100644
index 0000000..337553a
--- /dev/null
+++ b/evolutions/current/pldm_bios_table_attr_entry_string_encode_check.yaml
@@ -0,0 +1,2 @@
+- QualifiedName: pldm_bios_table_attr_entry_string_encode_check
+  NewName: pldm_bios_table_attr_entry_string_encode
diff --git a/include/libpldm/bios_table.h b/include/libpldm/bios_table.h
index a0c86e3..51afc6f 100644
--- a/include/libpldm/bios_table.h
+++ b/include/libpldm/bios_table.h
@@ -343,6 +343,9 @@
  *          not sufficient to encode info. An appropriate value for entry_length can be determined
  *          using @ref pldm_bios_table_attr_entry_string_encode_length
  */
+int pldm_bios_table_attr_entry_string_encode(
+	void *entry, size_t entry_length,
+	const struct pldm_bios_table_attr_entry_string_info *info);
 int pldm_bios_table_attr_entry_string_encode_check(
 	void *entry, size_t entry_length,
 	const struct pldm_bios_table_attr_entry_string_info *info);
diff --git a/meson.build b/meson.build
index 6d09983..7a6e7a6 100644
--- a/meson.build
+++ b/meson.build
@@ -38,6 +38,7 @@
     ['pldm_bios_table_attr_entry_enum_decode_pv_hdls_check', 'pldm_bios_table_attr_entry_enum_decode_pv_hdls'],
     ['pldm_bios_table_attr_entry_enum_decode_pv_num_check', 'pldm_bios_table_attr_entry_enum_decode_pv_num'],
     ['pldm_bios_table_attr_entry_enum_encode_check', 'pldm_bios_table_attr_entry_enum_encode'],
+    ['pldm_bios_table_attr_entry_string_encode_check', 'pldm_bios_table_attr_entry_string_encode'],
     ['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 3f170f9..8e70c15 100644
--- a/src/dsp/bios_table.c
+++ b/src/dsp/bios_table.c
@@ -369,7 +369,7 @@
 }
 
 LIBPLDM_ABI_STABLE
-int pldm_bios_table_attr_entry_string_encode_check(
+int pldm_bios_table_attr_entry_string_encode(
 	void *entry, size_t entry_length,
 	const struct pldm_bios_table_attr_entry_string_info *info)
 {
diff --git a/tests/dsp/bios_table.cpp b/tests/dsp/bios_table.cpp
index 9d7aea5..70ad1ae 100644
--- a/tests/dsp/bios_table.cpp
+++ b/tests/dsp/bios_table.cpp
@@ -273,7 +273,7 @@
     EXPECT_EQ(encodeLength, stringEntry.size());
 
     std::vector<uint8_t> encodeEntry(encodeLength, 0);
-    ASSERT_EQ(pldm_bios_table_attr_entry_string_encode_check(
+    ASSERT_EQ(pldm_bios_table_attr_entry_string_encode(
                   encodeEntry.data(), encodeEntry.size(), &info),
               PLDM_SUCCESS);
     // set attr handle = 0
@@ -282,10 +282,10 @@
 
     EXPECT_EQ(stringEntry, encodeEntry);
 
-    EXPECT_NE(pldm_bios_table_attr_entry_string_encode_check(
+    EXPECT_NE(pldm_bios_table_attr_entry_string_encode(
                   encodeEntry.data(), encodeEntry.size() - 1, &info),
               PLDM_SUCCESS);
-    auto rc = pldm_bios_table_attr_entry_string_encode_check(
+    auto rc = pldm_bios_table_attr_entry_string_encode(
         encodeEntry.data(), encodeEntry.size(), &info);
     EXPECT_EQ(rc, PLDM_SUCCESS);
     // set attr handle = 0
@@ -293,7 +293,7 @@
     encodeEntry[1] = 0;
 
     EXPECT_EQ(stringEntry, encodeEntry);
-    rc = pldm_bios_table_attr_entry_string_encode_check(
+    rc = pldm_bios_table_attr_entry_string_encode(
         encodeEntry.data(), encodeEntry.size() - 1, &info);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);
     std::swap(info.max_length, info.min_length);
@@ -303,8 +303,8 @@
     EXPECT_STREQ(
         "MinimumStingLength should not be greater than MaximumStringLength",
         errmsg);
-    rc = pldm_bios_table_attr_entry_string_encode_check(
-        encodeEntry.data(), encodeEntry.size(), &info);
+    rc = pldm_bios_table_attr_entry_string_encode(encodeEntry.data(),
+                                                  encodeEntry.size(), &info);
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
     std::swap(info.max_length, info.min_length);
 
@@ -326,7 +326,7 @@
     EXPECT_EQ(encodeLength, stringEntryLength0.size());
 
     encodeEntry.resize(encodeLength);
-    ASSERT_EQ(pldm_bios_table_attr_entry_string_encode_check(
+    ASSERT_EQ(pldm_bios_table_attr_entry_string_encode(
                   encodeEntry.data(), encodeEntry.size(), &info),
               PLDM_SUCCESS);
     // set attr handle = 0