On 17 March 2015 at 11:56, Stefan Hajnoczi <stefa...@redhat.com> wrote: > This commit was generated mechanically by coccinelle from the following > semantic patch: > > @@ > expression val; > @@ > - (ffs(val) - 1) > + ctz32(val)
Did you check all these callsites to make sure that the value passed in can never be zero? (ffs(0) - 1) is -1 whereas ctz32(0) is 32... -- PMM