[Skiboot] [PATCH] ipmi: Simplify the sync message function

Neelesh Gupta neelegup at linux.vnet.ibm.com
Thu Jun 25 03:08:59 AEST 2015


Signed-off-by: Neelesh Gupta <neelegup at linux.vnet.ibm.com>
---
 core/ipmi.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/core/ipmi.c b/core/ipmi.c
index 9d91c26..bee2987 100644
--- a/core/ipmi.c
+++ b/core/ipmi.c
@@ -160,13 +160,11 @@ void ipmi_queue_msg_sync(struct ipmi_msg *msg)
 	}
 
 	lock(&sync_lock);
-	while (sync_msg);
 	sync_msg = msg;
 	ipmi_queue_msg(msg);
-	unlock(&sync_lock);
-
-	while (sync_msg == msg)
+	while (sync_msg)
 		time_wait_ms(100);
+	unlock(&sync_lock);
 }
 
 static void ipmi_read_event_complete(struct ipmi_msg *msg)



More information about the Skiboot mailing list