[Skiboot] [PATCH V5 05/10] opal/errorlog : Gives function'fsp_elog_write_set_head_state' a more meaningful name

Mukesh Ojha mukesh02 at linux.vnet.ibm.com
Sun Aug 21 18:47:23 AEST 2016


fsp_elog_write_set_head_state => opal_elog_write_set_head_state

As this name 'fsp_elog_write_set_head_state' has nothing to do with FSP.
And while we make write to PowerNV host path as generic interface , this
variable becomes OPAL specific. So, better to rename it as
'opal_elog_write_set_head_state'.

Signed-off-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
---
Changes in V5:
 - Patch V4 3/6 becomes V5 05/10.
 - Added more description about this patch.

Changes in V4:
 - New patch.

 core/errorlog.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/core/errorlog.c b/core/errorlog.c
index 4b0784f..5666f7a 100644
--- a/core/errorlog.c
+++ b/core/errorlog.c
@@ -231,7 +231,7 @@ void log_simple_error(struct opal_err_info *e_info, const char *fmt, ...)
 }
 
 /* This should be called with elog_write_to_host_lock lock */
-static inline void fsp_elog_write_set_head_state(enum elog_head_state state)
+static inline void opal_elog_write_set_head_state(enum elog_head_state state)
 {
 	elog_set_head_state(true, state);
 	elog_write_to_host_head_state = state;
@@ -255,11 +255,11 @@ bool opal_elog_info(uint64_t *opal_elog_id, uint64_t *opal_elog_size)
 			 */
 			prlog(PR_ERR, "%s:Inconsistent internal list state !\n",
 					__func__);
-			fsp_elog_write_set_head_state(ELOG_STATE_NONE);
+			opal_elog_write_set_head_state(ELOG_STATE_NONE);
 		} else {
 			*opal_elog_id = head->plid;
 			*opal_elog_size = head->log_size;
-			fsp_elog_write_set_head_state(ELOG_STATE_FETCHED_INFO);
+			opal_elog_write_set_head_state(ELOG_STATE_FETCHED_INFO);
 			rc = true;
 		}
 	}
@@ -280,7 +280,7 @@ static void opal_commit_elog_in_host(void)
 		buf->log_size = create_pel_log(buf,
 				(char *)elog_write_to_host_buffer,
 				ELOG_WRITE_TO_HOST_BUFFER_SIZE);
-		fsp_elog_write_set_head_state(ELOG_STATE_FETCHED_DATA);
+		opal_elog_write_set_head_state(ELOG_STATE_FETCHED_DATA);
 	}
 
 	unlock(&elog_write_to_host_lock);
@@ -297,7 +297,7 @@ bool opal_elog_read(uint64_t *buffer, uint64_t opal_elog_size,
 		log_data = list_top(&elog_write_to_host_pending,
 				struct errorlog, link);
 		if (!log_data) {
-			fsp_elog_write_set_head_state(ELOG_STATE_NONE);
+			opal_elog_write_set_head_state(ELOG_STATE_NONE);
 			unlock(&elog_write_to_host_lock);
 			return rc;
 		}
@@ -312,7 +312,7 @@ bool opal_elog_read(uint64_t *buffer, uint64_t opal_elog_size,
 				opal_elog_size);
 		list_del(&log_data->link);
 		list_add(&elog_write_to_host_processed, &log_data->link);
-		fsp_elog_write_set_head_state(ELOG_STATE_NONE);
+		opal_elog_write_set_head_state(ELOG_STATE_NONE);
 		rc = true;
 	}
 
@@ -344,7 +344,7 @@ bool opal_elog_ack(uint64_t ack_id)
 		log_data = list_top(&elog_write_to_host_pending,
 				struct errorlog, link);
 		if (ack_id == log_data->plid)
-			fsp_elog_write_set_head_state(ELOG_STATE_NONE);
+			opal_elog_write_set_head_state(ELOG_STATE_NONE);
 
 		list_for_each_safe(&elog_write_to_host_pending, record,
 				next_record, link) {
@@ -375,7 +375,7 @@ void opal_resend_pending_logs(void)
 		list_add_tail(&elog_write_to_host_pending, &record->link);
 	}
 
-	fsp_elog_write_set_head_state(ELOG_STATE_NONE);
+	opal_elog_write_set_head_state(ELOG_STATE_NONE);
 	unlock(&elog_write_to_host_lock);
 	opal_commit_elog_in_host();
 }
-- 
2.7.4



More information about the Skiboot mailing list