include: sbi_bitops: Remove dead shift assignment in ffs/fls

The value assigned to x by the shift assignment in the last if block of
ffs/fls is never read. Remove it.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Reviewed-by: Anup Patel <anup.patel@wdc.com>
This commit is contained in:
Tobias Klauser 2020-07-07 11:56:55 +02:00 committed by Anup Patel
parent a5f9104330
commit ec1abf6657
1 changed files with 2 additions and 6 deletions

View File

@ -66,10 +66,8 @@ static inline int ffs(int x)
x >>= 2; x >>= 2;
r += 2; r += 2;
} }
if (!(x & 1)) { if (!(x & 1))
x >>= 1;
r += 1; r += 1;
}
return r; return r;
} }
@ -148,10 +146,8 @@ static inline int fls(int x)
x <<= 2; x <<= 2;
r -= 2; r -= 2;
} }
if (!(x & 0x80000000u)) { if (!(x & 0x80000000u))
x <<= 1;
r -= 1; r -= 1;
}
return r; return r;
} }