Skip to content

Commit

Permalink
modify astyle
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeryou committed Sep 28, 2022
1 parent 18b8f4f commit 0c5050c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions storage/blockdevice/COMPONENT_SPINAND/source/bch.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ void bch_encode(struct bch_code *bch, unsigned char *data, unsigned int *ecc)

t[0] = bch->mod_tab;
for (i = 1; i < 16; i++) {
t[i] = t[i-1] + 4 * (bch->ecc_words);
t[i] = t[i - 1] + 4 * (bch->ecc_words);
}

memset(bch->ecc, 0, bch->ecc_words * sizeof(*bch->ecc));
Expand Down Expand Up @@ -116,8 +116,8 @@ static void build_syndrome(struct bch_code *bch)
ecc_bits = i;
while (*ecc) {
if (*ecc & (unsigned int)1) {
for (j = 0; j < 2*bch->t; j++) {
bch->syn[j] ^= bch->a_pow[mod(bch, (j+1)*i)];
for (j = 0; j < 2 * bch->t; j++) {
bch->syn[j] ^= bch->a_pow[mod(bch, (j + 1) * i)];
}
}
*ecc >>= 1;
Expand Down Expand Up @@ -187,7 +187,7 @@ static int chien_search(struct bch_code *bch, unsigned int deg)
unsigned int syn, syn0;
int *rep = (int *)bch->buf;
int *root = (int *)bch->buf2;

k = bch->n - bch->a_log[bch->elp[deg]];
for (i = 0; i < deg; i++) {
rep[i] = bch->elp[i] ? mod(bch, bch->a_log[ bch->elp[i] ] + k) : -1;
Expand Down

0 comments on commit 0c5050c

Please sign in to comment.