[Skiboot] [PATCH 6/6] libflash/blocklevel.c: Remove unused store to ecc_len

Balbir singh bsingharora at gmail.com
Fri May 18 09:31:05 AEST 2018


Caught by scan-build. We rewrite ecc_len with a different
value prior to use

Signed-off-by: Balbir singh <bsingharora at gmail.com>
---
 libflash/blocklevel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libflash/blocklevel.c b/libflash/blocklevel.c
index 172f8fcc..bbcc8e61 100644
--- a/libflash/blocklevel.c
+++ b/libflash/blocklevel.c
@@ -205,7 +205,7 @@ int blocklevel_write(struct blocklevel_device *bl, uint64_t pos, const void *buf
 {
 	int rc, ecc_protection;
 	struct ecc64 *buffer;
-	uint64_t ecc_len = ecc_buffer_size(len);
+	uint64_t ecc_len;
 	uint64_t ecc_start, ecc_pos, ecc_diff;
 
 	FL_DBG("%s: 0x%" PRIx64 "\t%p\t0x%" PRIx64 "\n", __func__, pos, buf, len);
-- 
2.17.0



More information about the Skiboot mailing list