[Skiboot] [PATCH 1/2] Fix scan-build warning of value stored to event is never used

Stewart Smith stewart at linux.vnet.ibm.com
Mon Aug 31 18:06:18 AEST 2015


In send_pending_events() we set event to the type of event received
yet did nothing with it.

This seems to be a left over bit of code, as what does happen is on
consuming the message (prd_msg_consumed) we'll clear the event bit
and then send the next event:

120		if (event)
121			events[proc] &= ~event;
122		prd_msg_inuse = false;
123		send_pending_events();
124		unlock(&events_lock);

Signed-off-by: Stewart Smith <stewart at linux.vnet.ibm.com>
---
 hw/prd.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/hw/prd.c b/hw/prd.c
index 5487be5..b4ed198 100644
--- a/hw/prd.c
+++ b/hw/prd.c
@@ -176,18 +176,12 @@ static void send_pending_events(void)
 	if (event & EVENT_ATTN) {
 		prd_msg.hdr.type = OPAL_PRD_MSG_TYPE_ATTN;
 		populate_ipoll_msg(&prd_msg, proc);
-		event = EVENT_ATTN;
-
 	} else if (event & EVENT_OCC_ERROR) {
 		prd_msg.hdr.type = OPAL_PRD_MSG_TYPE_OCC_ERROR;
 		prd_msg.occ_error.chip = proc;
-		event = EVENT_OCC_ERROR;
-
 	} else if (event & EVENT_OCC_RESET) {
 		prd_msg.hdr.type = OPAL_PRD_MSG_TYPE_OCC_RESET;
 		prd_msg.occ_reset.chip = proc;
-		event = EVENT_OCC_RESET;
-
 	}
 
 	queue_prd_msg(&prd_msg, prd_msg_consumed);
-- 
2.1.4



More information about the Skiboot mailing list