lkml.org 
[lkml]   [2014]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: roundup_pow_of_two() may not handle 64-bit integers
Date
Brian Norris <computersforpeace@gmail.com> wrote:

> I'm looking to use roundup_pow_of_two() (actually, order_base_2())
> from <linux/log2.h>, but it seems that it only supports 64-bit integers
> if your toolchain uses a 64-bit 'unsigned long' type. This is strange,
> considering that ilog2() is explicitly designed for 32-bit or 64-bit
> compatibility.

ilog2() was explicitly designed for use with 'unsigned long'. See the commit
description (f0d1b0b30d250a07627ad8b9fbbb5c7cc08422e8). It may work with
unsigned long long, however...

David




\
 
 \ /
  Last update: 2014-05-15 17:41    [W:0.909 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site