Commit e8f954a756a825130d11b9c8fca70101dd8b3ac5

Authored by Aneesh Bansal
Committed by York Sun
1 parent 70f959c3c4

include/linux: move typdef for uintptr_t

uintptr_t which is a typdef for unsigned long is needed for creating
pointers (32 or 64 bit depending on Core) from 32 bit variables
storing the address.
If a 32 bit variable (u32) is typecasted to a pointer (void *),
compiler gives a warning in case size of pointer on the core is 64 bit.

The typdef has been moved from include/compiler.h to include/linux/types.h

Signed-off-by: Aneesh Bansal <aneesh.bansal@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>

Showing 2 changed files with 1 additions and 3 deletions Side-by-side Diff

... ... @@ -115,9 +115,6 @@
115 115 #ifdef CONFIG_USE_STDINT
116 116 /* Provided by gcc. */
117 117 #include <stdint.h>
118   -#else
119   -/* Type for `void *' pointers. */
120   -typedef unsigned long int uintptr_t;
121 118 #endif
122 119  
123 120 #include <linux/string.h>
include/linux/types.h
... ... @@ -124,6 +124,7 @@
124 124 typedef __INT64_TYPE__ int64_t;
125 125 #endif
126 126  
  127 +typedef unsigned long uintptr_t;
127 128 /*
128 129 * Below are truly Linux-specific types that should never collide with
129 130 * any application/library that wants linux/types.h.