diff options
author | Chris Metcalf <cmetcalf@tilera.com> | 2012-05-25 12:32:09 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2012-05-25 15:00:43 -0400 |
commit | 9f1d62bed7f015d11b9164078b7fea433b474114 (patch) | |
tree | 951254ba2d3ed4fef376351c4ed68b06be3b928d /drivers/tc | |
parent | acd1a19e002790dd127b3ff86f95a4d269e7f1d0 (diff) |
tile: fix bug where fls(0) was not returning 0
This is because __builtin_clz(0) returns 64 for the "undefined" case
of 0, since the builtin just does a right-shift 32 and "clz" instruction.
So, use the alpha approach of casting to u32 and using __builtin_clzll().
Cc: stable@vger.kernel.org
Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'drivers/tc')
0 files changed, 0 insertions, 0 deletions