[PATCH] gfp_t: infrastructure

Beginning of gfp_t annotations:

 - -Wbitwise added to CHECKFLAGS
 - old __bitwise renamed to __bitwise__
 - __bitwise defined to either __bitwise__ or nothing, depending on
   __CHECK_ENDIAN__ being defined
 - gfp_t switched from __nocast to __bitwise__
 - force cast to gfp_t added to __GFP_... constants
 - new helper - gfp_zone(); extracts zone bits out of gfp_t value and casts
   the result to int

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Al Viro
2005-10-21 02:55:38 -04:00
committed by Linus Torvalds
parent 434f1d10c1
commit af4ca457ea
6 changed files with 34 additions and 28 deletions

View File

@ -1089,7 +1089,7 @@ static unsigned int nr_free_zone_pages(int offset)
*/
unsigned int nr_free_buffer_pages(void)
{
return nr_free_zone_pages(GFP_USER & GFP_ZONEMASK);
return nr_free_zone_pages(gfp_zone(GFP_USER));
}
/*
@ -1097,7 +1097,7 @@ unsigned int nr_free_buffer_pages(void)
*/
unsigned int nr_free_pagecache_pages(void)
{
return nr_free_zone_pages(GFP_HIGHUSER & GFP_ZONEMASK);
return nr_free_zone_pages(gfp_zone(GFP_HIGHUSER));
}
#ifdef CONFIG_HIGHMEM