On Nov 18, 2013, at 2:40 PM, Ben Pfaff <b...@nicira.com> wrote: > On Mon, Nov 18, 2013 at 02:38:50PM -0800, Jarno Rajahalme wrote: >> One question still: >> >> On Nov 18, 2013, at 1:19 PM, Ben Pfaff <b...@nicira.com> wrote: >>> return popcount(n) + popcount(n >> 32); >>> @@ -341,7 +332,7 @@ ctz(uint32_t n) >>> static inline int >>> ctz64(uint64_t n) >>> { >>> - return n ? raw_ctz64(n) : 64; >>> + return n ? raw_ctz(n) : 64; >>> } >>> >> >> Did you intend to define ctz(uint64_t) and not define ctz64() at all? > > I got the commit message wrong, sorry. This commit is intended to be > entirely about raw_ctz() and raw_ctz64(), specifically getting rid of > the latter. It looks like I got the code right but the commit message > totally wrong. Here's what I've now edited the commit message to: > > util: Make raw_ctz() accept 64-bit integers. > > Having a single function that can do raw_ctz() on any integer type is > easier for callers to get right, and there is no real downside in the > implementation. > > Signed-off-by: Ben Pfaff <b...@nicira.com> > Acked-by: Jarno Rajahalme <jrajaha...@nicira.com> > > I think I got confused because originally I did want to get rid of > ctz64(). However that's not possible with the current definition of > ctz() and ctz64(), since the return value for n==0 differs in each > case. > > Does the commit make sense with the correct log message? >
Yes it does, thanks. Jarno _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev