• Fengguang Wu's avatar
    convert ill defined log2() to ilog2() · e57aa839
    Fengguang Wu authored
    It's *wrong* to have
    			#define log2(n) ffz(~(n))
    It should be *reversed*:
    			#define log2(n) flz(~(n))
    or
    			#define log2(n) fls(n)
    or just use
    			ilog2(n) defined in linux/log2.h.
    
    This patch follows the last solution, recommended by Andrew Morton.
    
    Cc: <linux-ext4@vger.kernel.org>
    Cc: Mingming Cao <cmm@us.ibm.com>
    Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
    Cc: Chris Ahna <christopher.j.ahna@intel.com>
    Cc: David Mosberger-Tang <davidm@hpl.hp.com>
    Cc: Kyle McMartin <kyle@parisc-linux.org>
    Cc: Dave Airlie <airlied@linux.ie>
    Cc: Dave Jones <davej@codemonkey.org.uk>
    Signed-off-by: default avatarFengguang Wu <wfg@mail.ustc.edu.cn>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e57aa839
i460-agp.c 18.3 KB