lkml.org 
[lkml]   [2008]   [Jun]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateThu, 12 Jun 2008 11:43:47 +0530
FromBalbir Singh <>
SubjectRe: [-mm][PATCH 2/4] Setup the memrlimit controller (v5)
Andrew Morton wrote:
> 
> #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE)
> 
> ?
> 
> afaict ALIGN() tries to do the right thing, and if it doesn't, we
> should fix ALIGN().
> 

That should do the right thing, provided there are no duplicate ALIGN defintions
elsewhere

kernel.h has


#define ALIGN(x,a)              __ALIGN_MASK(x,(typeof(x))(a)-1)
#define __ALIGN_MASK(x,mask)    (((x)+(mask))&~(mask))

Which seems like the correct thing, since we use typeof(x) for (a) - 1.



-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL


\
 
 \ /
  Last update: 2008-06-12 08:17    [from the cache]
©2003-2008