Skip to content

Commit

Permalink
amd64_edac: Fix decode_syndrome types
Browse files Browse the repository at this point in the history
Those should all be unsigned.

Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
  • Loading branch information
Borislav Petkov committed Mar 17, 2011
1 parent 8c67175 commit d34a6ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1700,15 +1700,15 @@ static u16 x8_vectors[] = {
0x0100, 0x0200, 0x0400, 0x0800, 0x1000, 0x2000, 0x4000, 0x8000,
};

static int decode_syndrome(u16 syndrome, u16 *vectors, int num_vecs,
int v_dim)
static int decode_syndrome(u16 syndrome, u16 *vectors, unsigned num_vecs,
unsigned v_dim)
{
unsigned int i, err_sym;

for (err_sym = 0; err_sym < num_vecs / v_dim; err_sym++) {
u16 s = syndrome;
int v_idx = err_sym * v_dim;
int v_end = (err_sym + 1) * v_dim;
unsigned v_idx = err_sym * v_dim;
unsigned v_end = (err_sym + 1) * v_dim;

/* walk over all 16 bits of the syndrome */
for (i = 1; i < (1U << 16); i <<= 1) {
Expand Down

0 comments on commit d34a6ec

Please sign in to comment.