aboutsummaryrefslogtreecommitdiff
path: root/libflash
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2019-10-03 15:23:41 +0930
committerOliver O'Halloran <oohall@gmail.com>2019-10-14 16:27:10 +1100
commita950fd789c1ce0fbdc4f5486ccdd8301d6258ba7 (patch)
tree3e6562aabc3f2ee2f187040e7cf65274b583195f /libflash
parentaa52f9439b91db5949c04acb8e1d2d21c37ddba5 (diff)
downloadskiboot-a950fd789c1ce0fbdc4f5486ccdd8301d6258ba7.zip
skiboot-a950fd789c1ce0fbdc4f5486ccdd8301d6258ba7.tar.gz
skiboot-a950fd789c1ce0fbdc4f5486ccdd8301d6258ba7.tar.bz2
blocklevel: smart_write: Tidy local variable declarations
Group them by use (and name). It's not reverse christmas tree, but it's a bit easier on the eye. Signed-off-by: Andrew Jeffery <andrew@aj.id.au> Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Diffstat (limited to 'libflash')
-rw-r--r--libflash/blocklevel.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libflash/blocklevel.c b/libflash/blocklevel.c
index 07d3399..6cc4a81 100644
--- a/libflash/blocklevel.c
+++ b/libflash/blocklevel.c
@@ -506,15 +506,18 @@ out:
int blocklevel_smart_write(struct blocklevel_device *bl, uint64_t pos, const void *buf, uint64_t len)
{
+ void *ecc_buf = NULL;
+ uint64_t ecc_start;
+ int ecc_protection;
+
+ void *erase_buf = NULL;
uint32_t erase_size;
+
const void *write_buf = buf;
uint64_t write_len;
uint64_t write_pos;
- void *ecc_buf = NULL;
- uint64_t ecc_start;
- void *erase_buf;
+
int rc = 0;
- int ecc_protection;
if (!buf || !bl) {
errno = EINVAL;