diff mbox

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

Message ID 1447141453-19876-2-git-send-email-stewart@linux.vnet.ibm.com
State Accepted
Headers show

Commit Message

Stewart Smith Nov. 10, 2015, 7:44 a.m. UTC
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@linux.vnet.ibm.com>
---
 hw/fsp/fsp-leds.c | 2 --
 1 file changed, 2 deletions(-)
diff mbox

Patch

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);