aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/mm/cerr-sb1.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2010-01-18 09:56:22 +1100
committerJames Morris <jmorris@namei.org>2010-01-18 09:56:22 +1100
commit2457552d1e6f3183cd93f81c49a8da5fe8bb0e42 (patch)
tree7ca46caa910012d75617700e4083b3657053cb31 /arch/mips/mm/cerr-sb1.c
parentselinux: change the handling of unknown classes (diff)
parentpage allocator: update NR_FREE_PAGES only when necessary (diff)
downloadlinux-dev-2457552d1e6f3183cd93f81c49a8da5fe8bb0e42.tar.xz
linux-dev-2457552d1e6f3183cd93f81c49a8da5fe8bb0e42.zip
Merge branch 'master' into next
Diffstat (limited to 'arch/mips/mm/cerr-sb1.c')
-rw-r--r--arch/mips/mm/cerr-sb1.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/mips/mm/cerr-sb1.c b/arch/mips/mm/cerr-sb1.c
index 1bd1f18ac23c..3571090ba178 100644
--- a/arch/mips/mm/cerr-sb1.c
+++ b/arch/mips/mm/cerr-sb1.c
@@ -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);