From 4f7caa36ee8191c6950f6a688776f23fc24a07b4 Mon Sep 17 00:00:00 2001 From: "Richard J. Knight" Date: Wed, 6 Sep 2017 11:59:01 -0500 Subject: Add prototype for releasing platform data pointer storage function Change-Id: I94dbc2125a2c8e0a75f35df067f14c4ca01463d0 CQ:SW401034 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/45718 Tested-by: FSP CI Jenkins Tested-by: Jenkins Server Tested-by: HWSV CI Tested-by: PPE CI Tested-by: Hostboot CI Reviewed-by: Sachin Gupta Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/45726 --- src/import/hwpf/fapi2/include/ffdc.H | 10 +++++++--- src/import/hwpf/fapi2/include/utils.H | 8 +++++++- 2 files changed, 14 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/import/hwpf/fapi2/include/ffdc.H b/src/import/hwpf/fapi2/include/ffdc.H index 107f5741..c715e464 100644 --- a/src/import/hwpf/fapi2/include/ffdc.H +++ b/src/import/hwpf/fapi2/include/ffdc.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -142,7 +142,7 @@ class FirstFailureData inline void* releaseData(void) { void* l_pData = iv_info; - iv_info = NULL; + iv_info = nullptr; return l_pData; } @@ -213,7 +213,11 @@ class FirstFailureData /// inline void* getPlatDataPtr() { - return iv_platDataPtr; + void* l_platDataPtr = iv_platDataPtr; + + iv_platDataPtr = nullptr; + + return l_platDataPtr; }; /// diff --git a/src/import/hwpf/fapi2/include/utils.H b/src/import/hwpf/fapi2/include/utils.H index 1d08cb6f..fcbde482 100644 --- a/src/import/hwpf/fapi2/include/utils.H +++ b/src/import/hwpf/fapi2/include/utils.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER sbe Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2017 */ +/* Contributors Listed Below - COPYRIGHT 2015,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -129,6 +129,12 @@ void createPlatLog( fapi2::errlSeverity_t i_sev = fapi2::FAPI2_ERRL_SEV_UNRECOVERABLE ); +/// +/// @brief delete platform data ptr - free platform data from the +// passed in RC. +/// +void deletePlatformDataPointer(fapi2::ReturnCode& io_rc); + /// /// @brief Associate an error to PRD PLID /// -- cgit v1.2.1