- patches.suse/slab-handle-memoryless-nodes-v2a.patch: Refresh.
[linux-flexiantxendom0-3.2.10.git] / arch / mips / mm / cerr-sb1.c
index 1bd1f18..3571090 100644 (file)
@@ -567,13 +567,10 @@ static uint32_t extract_dc(unsigned short addr, int data)
                                datalo = ((unsigned long long)datalohi << 32) | datalolo;
                                ecc = dc_ecc(datalo);
                                if (ecc != datahi) {
-                                       int bits = 0;
+                                       int bits;
                                        bad_ecc |= 1 << (3-offset);
                                        ecc ^= datahi;
-                                       while (ecc) {
-                                               if (ecc & 1) bits++;
-                                               ecc >>= 1;
-                                       }
+                                       bits = hweight8(ecc);
                                        res |= (bits == 1) ? CP0_CERRD_DATA_SBE : CP0_CERRD_DATA_DBE;
                                }
                                printk("  %02X-%016llX", datahi, datalo);