From ea8e5c05c9950820605b57f781c49c1930f3e707 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Fri, 13 Nov 2009 16:04:53 +0900 Subject: [PATCH] --- yaml --- r: 177889 b: refs/heads/master c: 13e79b462212ac46a046932af06117eaf7a9f77b h: refs/heads/master i: 177887: 0ae557082266ec709d1e93a29a3675a19b166ac1 v: v3 --- [refs] | 2 +- trunk/arch/mips/mm/cerr-sb1.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 355d927cecd1..ba7c8776a8d8 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9e8641f4c252f93875cf30cb28c0f333539f0bf +refs/heads/master: 13e79b462212ac46a046932af06117eaf7a9f77b diff --git a/trunk/arch/mips/mm/cerr-sb1.c b/trunk/arch/mips/mm/cerr-sb1.c index 1bd1f18ac23c..3571090ba178 100644 --- a/trunk/arch/mips/mm/cerr-sb1.c +++ b/trunk/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);