dsp: pdr: Rename pldm_entity_association_pdr_add_check()

Introduce pldm_entity_association_pdr_add(), deprecate
pldm_entity_association_pdr_add_check(), add the rename configuration
and then apply it.

One quirk this time around is that we had forgotten to remove the
declaration of pldm_entity_association_pdr_add() from the header when we
removed its implementation. Clean this issue up as well, as it's
necessary to avoid the type conflict.

Change-Id: Id8e61c817017dd7caefa9fd7b2bc59ee0f1f6721
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 97ba8e4..bfbc7fe 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -46,6 +46,7 @@
    The deprecated functions:
 
    - `get_fru_record_by_option_check()`
+   - `pldm_entity_association_pdr_add_check()`
    - `pldm_pdr_add_check()`
    - `pldm_pdr_add_fru_record_set_check()`
 
diff --git a/abi/x86_64/gcc.dump b/abi/x86_64/gcc.dump
index a8adda1..efd7a2f 100644
--- a/abi/x86_64/gcc.dump
+++ b/abi/x86_64/gcc.dump
@@ -4351,7 +4351,7 @@
     },
     '76434' => {
       'Header' => 'pdr.h',
-      'Line' => '646',
+      'Line' => '636',
       'Param' => {
         '0' => {
           'name' => 'pdr',
@@ -4379,7 +4379,7 @@
     },
     '76762' => {
       'Header' => 'pdr.h',
-      'Line' => '634',
+      'Line' => '624',
       'Param' => {
         '0' => {
           'name' => 'tree',
@@ -4394,7 +4394,7 @@
     },
     '76816' => {
       'Header' => 'pdr.h',
-      'Line' => '624',
+      'Line' => '614',
       'Param' => {
         '0' => {
           'name' => 'tree',
@@ -4409,7 +4409,7 @@
     },
     '76879' => {
       'Header' => 'pdr.h',
-      'Line' => '614',
+      'Line' => '604',
       'Param' => {
         '0' => {
           'name' => 'org_tree',
@@ -4425,7 +4425,7 @@
     },
     '77263' => {
       'Header' => 'pdr.h',
-      'Line' => '588',
+      'Line' => '578',
       'Param' => {
         '0' => {
           'name' => 'tree',
@@ -4441,7 +4441,7 @@
     },
     '77543' => {
       'Header' => 'pdr.h',
-      'Line' => '602',
+      'Line' => '592',
       'Param' => {
         '0' => {
           'name' => 'tree',
@@ -4520,7 +4520,7 @@
     },
     '78568' => {
       'Header' => 'pdr.h',
-      'Line' => '549',
+      'Line' => '539',
       'Param' => {
         '0' => {
           'name' => 'tree',
@@ -4540,7 +4540,7 @@
     },
     '78855' => {
       'Header' => 'pdr.h',
-      'Line' => '538',
+      'Line' => '528',
       'Param' => {
         '0' => {
           'name' => 'node',
@@ -4585,7 +4585,7 @@
     },
     '79088' => {
       'Header' => 'pdr.h',
-      'Line' => '521',
+      'Line' => '511',
       'Param' => {
         '0' => {
           'name' => 'node',
@@ -4617,7 +4617,7 @@
     },
     '79306' => {
       'Header' => 'pdr.h',
-      'Line' => '472',
+      'Line' => '459',
       'Param' => {
         '0' => {
           'name' => 'tree',
@@ -4637,11 +4637,11 @@
         }
       },
       'Return' => '100',
-      'ShortName' => 'pldm_entity_association_pdr_add_check'
+      'ShortName' => 'pldm_entity_association_pdr_add'
     },
     '80829' => {
       'Header' => 'pdr.h',
-      'Line' => '575',
+      'Line' => '565',
       'Param' => {
         '0' => {
           'name' => 'parent',
@@ -4661,7 +4661,7 @@
     },
     '80918' => {
       'Header' => 'pdr.h',
-      'Line' => '561',
+      'Line' => '551',
       'Param' => {
         '0' => {
           'name' => 'node',
@@ -9502,6 +9502,7 @@
       'pldm_bios_table_string_find_by_handle' => 1,
       'pldm_bios_table_string_find_by_string' => 1,
       'pldm_close' => 1,
+      'pldm_entity_association_pdr_add' => 1,
       'pldm_entity_association_pdr_add_check' => 1,
       'pldm_entity_association_pdr_add_from_node_check' => 1,
       'pldm_entity_association_pdr_add_from_node_with_record_handle' => 1,
diff --git a/evolutions/current/pldm_entity_association_pdr_add_check.yaml b/evolutions/current/pldm_entity_association_pdr_add_check.yaml
new file mode 100644
index 0000000..8f5ac23
--- /dev/null
+++ b/evolutions/current/pldm_entity_association_pdr_add_check.yaml
@@ -0,0 +1,2 @@
+- QualifiedName: pldm_entity_association_pdr_add_check
+  NewName: pldm_entity_association_pdr_add
diff --git a/include/libpldm/pdr.h b/include/libpldm/pdr.h
index da8e853..7befcad 100644
--- a/include/libpldm/pdr.h
+++ b/include/libpldm/pdr.h
@@ -442,19 +442,6 @@
  */
 bool pldm_entity_is_exist_parent(pldm_entity_node *node);
 
-/** @brief Convert entity association tree to PDR
- *
- *  No conversion takes place if one or both of tree or repo are NULL.
- *
- *  @param[in] tree - opaque pointer to entity association tree
- *  @param[in] repo - PDR repo where entity association records should be added
- *  @param[in] is_remote - if true, then the PDR is not from this terminus
- *  @param[in] terminus_handle - terminus handle of the terminus
- */
-void pldm_entity_association_pdr_add(pldm_entity_association_tree *tree,
-				     pldm_pdr *repo, bool is_remote,
-				     uint16_t terminus_handle);
-
 /** @brief Convert entity association tree to PDR, or return an error
  *
  *  No conversion takes place if one or both of tree or repo are NULL.
@@ -469,6 +456,9 @@
  *  @return 0 on success, -EINVAL if the arguments are invalid, -ENOMEM if an internal memory
  *  allocation fails, or -EOVERFLOW if a record handle could not be allocated
  */
+int pldm_entity_association_pdr_add(pldm_entity_association_tree *tree,
+				    pldm_pdr *repo, bool is_remote,
+				    uint16_t terminus_handle);
 int pldm_entity_association_pdr_add_check(pldm_entity_association_tree *tree,
 					  pldm_pdr *repo, bool is_remote,
 					  uint16_t terminus_handle);
diff --git a/meson.build b/meson.build
index a9d290a..52a114d 100644
--- a/meson.build
+++ b/meson.build
@@ -34,6 +34,7 @@
   add_project_arguments('-DLIBPLDM_API_DEPRECATED', language: ['c', 'cpp'])
   libpldm_deprecated_aliases += [
     ['get_fru_record_by_option_check', 'get_fru_record_by_option'],
+    ['pldm_entity_association_pdr_add_check', 'pldm_entity_association_pdr_add'],
     ['pldm_pdr_add_check', 'pldm_pdr_add'],
     ['pldm_pdr_add_fru_record_set_check', 'pldm_pdr_add_fru_record_set'],
   ]
diff --git a/src/dsp/pdr.c b/src/dsp/pdr.c
index bf63ecf..b592340 100644
--- a/src/dsp/pdr.c
+++ b/src/dsp/pdr.c
@@ -933,9 +933,9 @@
 }
 
 LIBPLDM_ABI_STABLE
-int pldm_entity_association_pdr_add_check(pldm_entity_association_tree *tree,
-					  pldm_pdr *repo, bool is_remote,
-					  uint16_t terminus_handle)
+int pldm_entity_association_pdr_add(pldm_entity_association_tree *tree,
+				    pldm_pdr *repo, bool is_remote,
+				    uint16_t terminus_handle)
 {
 	if (!tree || !repo) {
 		return 0;
diff --git a/tests/dsp/pdr.cpp b/tests/dsp/pdr.cpp
index 9ef8b14..f2d2470 100644
--- a/tests/dsp/pdr.cpp
+++ b/tests/dsp/pdr.cpp
@@ -1162,7 +1162,7 @@
               1);
 
     auto repo = pldm_pdr_init();
-    int rc = pldm_entity_association_pdr_add_check(tree, repo, false, 1);
+    int rc = pldm_entity_association_pdr_add(tree, repo, false, 1);
     ASSERT_EQ(rc, 0);
 
     EXPECT_EQ(pldm_pdr_get_record_count(repo), 6u);
@@ -1794,7 +1794,7 @@
               2);
 
     auto repo = pldm_pdr_init();
-    int rc = pldm_entity_association_pdr_add_check(tree, repo, false, 1);
+    int rc = pldm_entity_association_pdr_add(tree, repo, false, 1);
     ASSERT_EQ(rc, 0);
 
     EXPECT_EQ(pldm_pdr_get_record_count(repo), 1u);