dsp: bios_table: Rename pldm_bios_table_attr_value_entry_encode_string_check()

Introduce pldm_bios_table_attr_value_entry_encode_string(), deprecate
pldm_bios_table_attr_value_entry_encode_string_check, add rename
configuration and apply it.

gitlint-ignore: T1
Change-Id: I7f785aca80a8115bc5e6c60be40ac23ac3e322f1
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e0c0de2..d7da18a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -54,6 +54,7 @@
    - `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_attr_value_entry_encode_string_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 68ad89d..efb6f69 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -1598,7 +1598,7 @@
     },
     '17275' => {
       'Header' => 'bios_table.h',
-      'Line' => '660',
+      'Line' => '663',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1618,7 +1618,7 @@
     },
     '17420' => {
       'Header' => 'bios_table.h',
-      'Line' => '651',
+      'Line' => '654',
       'Param' => {
         '0' => {
           'name' => 'src_table',
@@ -1654,7 +1654,7 @@
     },
     '18108' => {
       'Header' => 'bios_table.h',
-      'Line' => '617',
+      'Line' => '620',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1847,7 +1847,7 @@
     },
     '20598' => {
       'Header' => 'bios_table.h',
-      'Line' => '636',
+      'Line' => '639',
       'Param' => {
         '0' => {
           'name' => 'table',
@@ -1872,7 +1872,7 @@
     },
     '20898' => {
       'Header' => 'bios_table.h',
-      'Line' => '624',
+      'Line' => '627',
       'Param' => {
         '0' => {
           'name' => 'size_without_pad',
@@ -1884,7 +1884,7 @@
     },
     '21253' => {
       'Header' => 'bios_table.h',
-      'Line' => '599',
+      'Line' => '602',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1899,7 +1899,7 @@
     },
     '21302' => {
       'Header' => 'bios_table.h',
-      'Line' => '606',
+      'Line' => '609',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1911,7 +1911,7 @@
     },
     '21786' => {
       'Header' => 'bios_table.h',
-      'Line' => '573',
+      'Line' => '576',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1926,7 +1926,7 @@
     },
     '21926' => {
       'Header' => 'bios_table.h',
-      'Line' => '589',
+      'Line' => '592',
       'Param' => {
         '0' => {
           'name' => 'entry',
@@ -1961,7 +1961,7 @@
     },
     '22195' => {
       'Header' => 'bios_table.h',
-      'Line' => '567',
+      'Line' => '570',
       'Return' => '1145',
       'ShortName' => 'pldm_bios_table_attr_value_entry_encode_integer_length'
     },
@@ -2003,7 +2003,7 @@
         '5' => 'r12'
       },
       'Return' => '100',
-      'ShortName' => 'pldm_bios_table_attr_value_entry_encode_string_check'
+      'ShortName' => 'pldm_bios_table_attr_value_entry_encode_string'
     },
     '22757' => {
       'Header' => 'bios_table.h',
@@ -9493,6 +9493,7 @@
       'pldm_bios_table_attr_value_entry_encode_enum_length' => 1,
       'pldm_bios_table_attr_value_entry_encode_integer_check' => 1,
       'pldm_bios_table_attr_value_entry_encode_integer_length' => 1,
+      'pldm_bios_table_attr_value_entry_encode_string' => 1,
       'pldm_bios_table_attr_value_entry_encode_string_check' => 1,
       'pldm_bios_table_attr_value_entry_encode_string_length' => 1,
       'pldm_bios_table_attr_value_entry_enum_decode_handles' => 1,
diff --git a/evolutions/current/pldm_bios_table_attr_value_entry_encode_string_check.yaml b/evolutions/current/pldm_bios_table_attr_value_entry_encode_string_check.yaml
new file mode 100644
index 0000000..80c7c43
--- /dev/null
+++ b/evolutions/current/pldm_bios_table_attr_value_entry_encode_string_check.yaml
@@ -0,0 +1,2 @@
+- QualifiedName: pldm_bios_table_attr_value_entry_encode_string_check
+  NewName: pldm_bios_table_attr_value_entry_encode_string
diff --git a/include/libpldm/bios_table.h b/include/libpldm/bios_table.h
index 570bb69..140b2b8 100644
--- a/include/libpldm/bios_table.h
+++ b/include/libpldm/bios_table.h
@@ -557,6 +557,9 @@
  *  	    str_length is non-zero, or attr_type is not PLDM_BIOS_STRING. PLDM_ERROR_INVALID_LENGTH
  *  	    if entry_length lacks capacity to encode str into entry.
  */
+int pldm_bios_table_attr_value_entry_encode_string(
+	void *entry, size_t entry_length, uint16_t attr_handle,
+	uint8_t attr_type, uint16_t str_length, const char *string);
 int pldm_bios_table_attr_value_entry_encode_string_check(
 	void *entry, size_t entry_length, uint16_t attr_handle,
 	uint8_t attr_type, uint16_t str_length, const char *string);
diff --git a/meson.build b/meson.build
index 2da7200..3c44229 100644
--- a/meson.build
+++ b/meson.build
@@ -42,6 +42,7 @@
     ['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_attr_value_entry_encode_string_check', 'pldm_bios_table_attr_value_entry_encode_string'],
     ['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 49a7e3c..71c6eca 100644
--- a/src/dsp/bios_table.c
+++ b/src/dsp/bios_table.c
@@ -754,7 +754,7 @@
 }
 
 LIBPLDM_ABI_STABLE
-int pldm_bios_table_attr_value_entry_encode_string_check(
+int pldm_bios_table_attr_value_entry_encode_string(
 	void *entry, size_t entry_length, uint16_t attr_handle,
 	uint8_t attr_type, uint16_t str_length, const char *str)
 {
diff --git a/tests/dsp/bios_table.cpp b/tests/dsp/bios_table.cpp
index 9393586..8d915c4 100644
--- a/tests/dsp/bios_table.cpp
+++ b/tests/dsp/bios_table.cpp
@@ -658,32 +658,32 @@
     auto length = pldm_bios_table_attr_value_entry_encode_string_length(3);
     EXPECT_EQ(length, stringEntry.size());
     std::vector<uint8_t> encodeEntry(length, 0);
-    ASSERT_EQ(pldm_bios_table_attr_value_entry_encode_string_check(
+    ASSERT_EQ(pldm_bios_table_attr_value_entry_encode_string(
                   encodeEntry.data(), encodeEntry.size(), 0, 1, 3, "abc"),
               PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, stringEntry);
 
-    EXPECT_NE(pldm_bios_table_attr_value_entry_encode_string_check(
+    EXPECT_NE(pldm_bios_table_attr_value_entry_encode_string(
                   encodeEntry.data(), encodeEntry.size() - 1, 0, 1, 3, "abc"),
               PLDM_SUCCESS);
 
-    auto rc = pldm_bios_table_attr_value_entry_encode_string_check(
+    auto rc = pldm_bios_table_attr_value_entry_encode_string(
         encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_STRING, 3, "abc");
     EXPECT_EQ(rc, PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, stringEntry);
     auto entry = reinterpret_cast<struct pldm_bios_attr_val_table_entry*>(
         stringEntry.data());
     entry->attr_type = PLDM_BIOS_STRING_READ_ONLY;
-    rc = pldm_bios_table_attr_value_entry_encode_string_check(
+    rc = pldm_bios_table_attr_value_entry_encode_string(
         encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_STRING_READ_ONLY,
         3, "abc");
     EXPECT_EQ(rc, PLDM_SUCCESS);
     EXPECT_EQ(encodeEntry, stringEntry);
-    rc = pldm_bios_table_attr_value_entry_encode_string_check(
+    rc = pldm_bios_table_attr_value_entry_encode_string(
         encodeEntry.data(), encodeEntry.size(), 0, PLDM_BIOS_PASSWORD, 3,
         "abc");
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_DATA);
-    rc = pldm_bios_table_attr_value_entry_encode_string_check(
+    rc = pldm_bios_table_attr_value_entry_encode_string(
         encodeEntry.data(), encodeEntry.size() - 1, 0, PLDM_BIOS_STRING, 3,
         "abc");
     EXPECT_EQ(rc, PLDM_ERROR_INVALID_LENGTH);