[Skiboot] [PATCH 1/7] llvm-scan-build: fix dead assignment in fsp-leds.c

Stewart Smith stewart at linux.vnet.ibm.com
Tue Nov 10 18:44:07 AEDT 2015


Simple fix as bytes_sent is assigned in the following line.

hw/fsp/fsp-leds.c:817:3: warning: Value stored to 'bytes_sent' is never read
                bytes_sent = 0;
                ^            ~
hw/fsp/fsp-leds.c:830:4: warning: Value stored to 'bytes_sent' is never read
                        bytes_sent = 0;
                        ^            ~

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

diff --git a/hw/fsp/fsp-leds.c b/hw/fsp/fsp-leds.c
index 4933dfac22a1..9ba588b7c0e1 100644
--- a/hw/fsp/fsp-leds.c
+++ b/hw/fsp/fsp-leds.c
@@ -814,7 +814,6 @@ static void fsp_ret_loc_code_list(u16 req_type, char *loc_code)
 		}
 
 		/* Push the data into TCE buffer */
-		bytes_sent = 0;
 		bytes_sent = fsp_push_data_to_tce(led, out_data, total_size);
 
 		/* Advance the TCE pointer */
@@ -827,7 +826,6 @@ static void fsp_ret_loc_code_list(u16 req_type, char *loc_code)
 		list_for_each_safe(&encl_ledq, led, next, link) {
 
 			/* Push the data into TCE buffer */
-			bytes_sent = 0;
 			bytes_sent = fsp_push_data_to_tce(led,
 							  out_data, total_size);
 
-- 
2.1.4



More information about the Skiboot mailing list