summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
authorCyril Bur <cyril.bur@au1.ibm.com>2015-06-23 13:22:08 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-06-23 13:38:42 +1000
commit69b152cab30aae6188b590b2df9a6f55932c4408 (patch)
tree3f8f375a5d80131dd4c0a1955b25a3e6b669d8d0 /external
parent6c458a0369494a7f0ae2e6352850502c5e393f8f (diff)
downloadtalos-skiboot-69b152cab30aae6188b590b2df9a6f55932c4408.tar.gz
talos-skiboot-69b152cab30aae6188b590b2df9a6f55932c4408.zip
libflash/ecc: Simplify and cleanup ecc code.
The ecc 'memcpy' style functions return success or fail in terms of the ECC enum. This doesn't really make sense, use true or false. As the result the ecc enum doesn't need to be exposed anymore, which makes more sense, not clear why it was exposed in the first place. Convert some of the ecc #defines to static inlines, shouldn't make any difference but feels safer. Fix minor stylistic and typo issues. Reviewed-By: Alistair Popple <alistair@popple.id.au> Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/gard/gard.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/external/gard/gard.c b/external/gard/gard.c
index 93a1c07a..bfcd0ddb 100644
--- a/external/gard/gard.c
+++ b/external/gard/gard.c
@@ -63,7 +63,7 @@ struct gard_ctx {
*/
static inline size_t sizeof_gard(struct gard_ctx *ctx)
{
- return ctx->ecc ? ECC_BUFFER_SIZE(sizeof(struct gard_record)) : sizeof(struct gard_record);
+ return ctx->ecc ? ecc_buffer_size(sizeof(struct gard_record)) : sizeof(struct gard_record);
}
static void show_flash_err(int rc)
OpenPOWER on IntegriCloud