• S
    Convert (ffs(val) - 1) to ctz32(val) · 786a4ea8
    Stefan Hajnoczi 提交于
    This commit was generated mechanically by coccinelle from the following
    semantic patch:
    
    @@
    expression val;
    @@
    - (ffs(val) - 1)
    + ctz32(val)
    
    The call sites have been audited to ensure the ffs(0) - 1 == -1 case
    never occurs (due to input validation, asserts, etc).  Therefore we
    don't need to worry about the fact that ctz32(0) == 32.
    Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
    Message-id: 1427124571-28598-5-git-send-email-stefanha@redhat.com
    Signed-off-by: NKevin Wolf <kwolf@redhat.com>
    786a4ea8
sheepdog.c 76.3 KB