lkml.org 
[lkml]   [2009]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/6] powerpc: add memory map support to Freescale RapidIO block
On Tue, 12 May 2009 16:36:00 +0800
Li Yang <leoli@freescale.com> wrote:

> + align = (size < 0x1000) ? 0x1000 : 1 << (__ilog2(size - 1) + 1);
> +
> + /* Align the size */
> + if ((lstart + size) > (_ALIGN_DOWN(lstart, align) + align)) {

__ilog2() and _ALIGN_DOWN() are powerpc-specific functions. It would
be preferable to use more general helpers if possible. ALIGN() and ilog2()
might suit here.




\
 
 \ /
  Last update: 2009-05-13 00:13    [W:0.110 / U:1.408 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site