Nowadays we can use prz->ecc_size as a flag, no need for the special
member in the prz struct.
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
int ecc_size = prz->ecc_size;
int size = prz->ecc_block_size;
- if (!prz->ecc)
+ if (!prz->ecc_size)
return;
block = buffer->data + (start & ~(ecc_block_size - 1));
{
struct persistent_ram_buffer *buffer = prz->buffer;
- if (!prz->ecc)
+ if (!prz->ecc_size)
return;
persistent_ram_encode_rs8(prz, (uint8_t *)buffer, sizeof(*buffer),
uint8_t *block;
uint8_t *par;
- if (!prz->ecc)
+ if (!prz->ecc_size)
return;
block = buffer->data;
int ecc_symsize = 8;
int ecc_poly = 0x11d;
- if (!prz->ecc)
+ if (!ecc_size)
return 0;
prz->ecc_block_size = 128;
{
int ret;
- prz->ecc = ecc_size;
-
ret = persistent_ram_init_ecc(prz, ecc_size);
if (ret)
return ret;
size_t buffer_size;
/* ECC correction */
- bool ecc;
char *par_buffer;
char *par_header;
struct rs_control *rs_decoder;