[PATCH 1/3] mm: add __nocast attribute to vm_flags

From: KOSAKI Motohiro
Date: Tue Apr 12 2011 - 20:26:37 EST


Now, We are converting vm_flags to 64bit. so nocast attribute help to
find hidden wrong vm_flags usage.

Suggested-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
---
include/linux/mm_types.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 4b0b990..ca01ab2 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -109,7 +109,7 @@ struct page {
*/
struct vm_region {
struct rb_node vm_rb; /* link in global region tree */
- unsigned long long vm_flags; /* VMA vm_flags */
+ unsigned long long __nocast vm_flags; /* VMA vm_flags */
unsigned long vm_start; /* start address of region */
unsigned long vm_end; /* region initialised to here */
unsigned long vm_top; /* region allocated to here */
@@ -137,7 +137,7 @@ struct vm_area_struct {
struct vm_area_struct *vm_next, *vm_prev;

pgprot_t vm_page_prot; /* Access permissions of this VMA. */
- unsigned long long vm_flags; /* Flags, see mm.h. */
+ unsigned long long __nocast vm_flags; /* Flags, see mm.h. */

struct rb_node vm_rb;

--
1.7.3.1



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/