]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
i7core_edac: fix misuse of logical operation in place of bitop
authorDavid Sterba <dsterba@suse.cz>
Mon, 27 Dec 2010 15:39:12 +0000 (15:39 +0000)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 4 Aug 2011 15:41:14 +0000 (12:41 -0300)
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/edac/i7core_edac.c

index 04f1e7ce02b196868d42253243d79d1044d9b7cc..35a0ff5273578716f45dc0c9e25f971d5e82f19d 100644 (file)
@@ -731,7 +731,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci)
                        debugf1("\t\t%#x\t%#x\t%#x\n",
                                (value[j] >> 27) & 0x1,
                                (value[j] >> 24) & 0x7,
-                               (value[j] && ((1 << 24) - 1)));
+                               (value[j] & ((1 << 24) - 1)));
        }
 
        return 0;
@@ -1670,7 +1670,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
        char *type, *optype, *err, *msg;
        unsigned long error = m->status & 0x1ff0000l;
        u32 optypenum = (m->status >> 4) & 0x07;
-       u32 core_err_cnt = (m->status >> 38) && 0x7fff;
+       u32 core_err_cnt = (m->status >> 38) & 0x7fff;
        u32 dimm = (m->misc >> 16) & 0x3;
        u32 channel = (m->misc >> 18) & 0x3;
        u32 syndrome = m->misc >> 32;