diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2011-05-26 06:16:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-26 12:20:31 -0400 |
commit | ca16d140af91febe25daeb9e032bf8bd46b8c31f (patch) | |
tree | a093c3f244a1bdfc2a50e271a7e6df3324df0f05 /include/linux/mm.h | |
parent | 4db70f73e56961b9bcdfd0c36c62847a18b7dbb5 (diff) |
mm: don't access vm_flags as 'int'
The type of vma->vm_flags is 'unsigned long'. Neither 'int' nor
'unsigned int'. This patch fixes such misuse.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
[ Changed to use a typedef - we'll extend it to cover more cases
later, since there has been discussion about making it a 64-bit
type.. - Linus ]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 8eb969ebf904..fb8e814f78dc 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -165,12 +165,12 @@ extern pgprot_t protection_map[16]; | |||
165 | */ | 165 | */ |
166 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) | 166 | static inline int is_linear_pfn_mapping(struct vm_area_struct *vma) |
167 | { | 167 | { |
168 | return (vma->vm_flags & VM_PFN_AT_MMAP); | 168 | return !!(vma->vm_flags & VM_PFN_AT_MMAP); |
169 | } | 169 | } |
170 | 170 | ||
171 | static inline int is_pfn_mapping(struct vm_area_struct *vma) | 171 | static inline int is_pfn_mapping(struct vm_area_struct *vma) |
172 | { | 172 | { |
173 | return (vma->vm_flags & VM_PFNMAP); | 173 | return !!(vma->vm_flags & VM_PFNMAP); |
174 | } | 174 | } |
175 | 175 | ||
176 | /* | 176 | /* |
@@ -1432,7 +1432,7 @@ extern unsigned long do_mmap_pgoff(struct file *file, unsigned long addr, | |||
1432 | unsigned long flag, unsigned long pgoff); | 1432 | unsigned long flag, unsigned long pgoff); |
1433 | extern unsigned long mmap_region(struct file *file, unsigned long addr, | 1433 | extern unsigned long mmap_region(struct file *file, unsigned long addr, |
1434 | unsigned long len, unsigned long flags, | 1434 | unsigned long len, unsigned long flags, |
1435 | unsigned int vm_flags, unsigned long pgoff); | 1435 | vm_flags_t vm_flags, unsigned long pgoff); |
1436 | 1436 | ||
1437 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, | 1437 | static inline unsigned long do_mmap(struct file *file, unsigned long addr, |
1438 | unsigned long len, unsigned long prot, | 1438 | unsigned long len, unsigned long prot, |