[Skiboot] [PATCH V8 2/9] errorlog: Give function 'fsp_elog_write_set_head_state' a more meaningful name

Mukesh Ojha mukesh02 at linux.vnet.ibm.com
Tue Nov 15 21:10:38 AEDT 2016


fsp_elog_write_set_head_state => opal_elog_write_set_head_state

Previous patch moved 'fsp_elog_write_set_head_state' function to generic
path (errorlog.c). Lets rename this to opal_elog_write_set_head_state to
reflect actual use of this function.

Signed-off-by: Mukesh Ojha <mukesh02 at linux.vnet.ibm.com>
Reviewed-by: Vasant Hegde <hegdevasant at linux.vnet.ibm.com>
---
Changes in V8:
 - Previous version V7 1/12 to 3/12 is already in the master.
 - Rebased on master.

Changes in V7:
 - Subject tag changed from opal/errorlog to errorlog.

Changes in V6:
 - Rebased on master.

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