lkml.org 
[lkml]   [2011]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 8/8] amd64_edac: Fix decode_syndrome types
    Date
    From: Borislav Petkov <borislav.petkov@amd.com>

    Those should all be unsigned.

    Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
    ---
    drivers/edac/amd64_edac.c | 8 ++++----
    1 files changed, 4 insertions(+), 4 deletions(-)

    diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
    index cc4f887..0be30e9 100644
    --- a/drivers/edac/amd64_edac.c
    +++ b/drivers/edac/amd64_edac.c
    @@ -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) {
    --
    1.7.4.rc2


    \
     
     \ /
      Last update: 2011-03-01 16:29    [W:0.023 / U:30.260 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site