[lkml]   [2007]   [Feb]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Add "is_power_of_2" checking to log2.h.

    Robert P. J. Day <> wrote:

    > +#define is_power_of_4(x) is_power_of_2(x) && (ffs(x) & 1))

    If this is such a commonly implemented op, it should probably be implemented
    globally too.

    I also wonder if there's some better way of implementing it than this, but I
    can't think of one offhand.

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2007-02-01 11:47    [W:0.044 / U:38.992 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site