diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2019-10-03 15:23:41 +0930 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2019-10-23 16:23:30 +0530 |
commit | cc364a7330d700095113cdab3a33c18f68e02bdf (patch) | |
tree | b6d60d44bdc8aa21386b112504a9055f4ad5da9f /libflash | |
parent | 3cf44ca2bdc3604c6a4f3a3d2030b18a1d705fd9 (diff) | |
download | skiboot-cc364a7330d700095113cdab3a33c18f68e02bdf.zip skiboot-cc364a7330d700095113cdab3a33c18f68e02bdf.tar.gz skiboot-cc364a7330d700095113cdab3a33c18f68e02bdf.tar.bz2 |
blocklevel: smart_write: Tidy local variable declarations
[ Upstream commit a950fd789c1ce0fbdc4f5486ccdd8301d6258ba7 ]
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>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'libflash')
-rw-r--r-- | libflash/blocklevel.c | 11 |
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; |