Loading fs/xfs/linux-2.6/kmem.c +12 −11 Original line number Diff line number Diff line Loading @@ -45,10 +45,10 @@ void * kmem_alloc(size_t size, int flags) kmem_alloc(size_t size, unsigned int __nocast flags) { int retries = 0; int lflags = kmem_flags_convert(flags); unsigned int lflags = kmem_flags_convert(flags); void *ptr; do { Loading @@ -67,7 +67,7 @@ kmem_alloc(size_t size, int flags) } void * kmem_zalloc(size_t size, int flags) kmem_zalloc(size_t size, unsigned int __nocast flags) { void *ptr; Loading @@ -89,7 +89,8 @@ kmem_free(void *ptr, size_t size) } void * kmem_realloc(void *ptr, size_t newsize, size_t oldsize, int flags) kmem_realloc(void *ptr, size_t newsize, size_t oldsize, unsigned int __nocast flags) { void *new; Loading @@ -104,10 +105,10 @@ kmem_realloc(void *ptr, size_t newsize, size_t oldsize, int flags) } void * kmem_zone_alloc(kmem_zone_t *zone, int flags) kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags) { int retries = 0; int lflags = kmem_flags_convert(flags); unsigned int lflags = kmem_flags_convert(flags); void *ptr; do { Loading @@ -123,7 +124,7 @@ kmem_zone_alloc(kmem_zone_t *zone, int flags) } void * kmem_zone_zalloc(kmem_zone_t *zone, int flags) kmem_zone_zalloc(kmem_zone_t *zone, unsigned int __nocast flags) { void *ptr; Loading fs/xfs/linux-2.6/kmem.h +12 −11 Original line number Diff line number Diff line Loading @@ -39,10 +39,10 @@ /* * memory management routines */ #define KM_SLEEP 0x0001 #define KM_NOSLEEP 0x0002 #define KM_NOFS 0x0004 #define KM_MAYFAIL 0x0008 #define KM_SLEEP 0x0001u #define KM_NOSLEEP 0x0002u #define KM_NOFS 0x0004u #define KM_MAYFAIL 0x0008u #define kmem_zone kmem_cache_s #define kmem_zone_t kmem_cache_t Loading Loading @@ -81,9 +81,9 @@ typedef unsigned long xfs_pflags_t; *(NSTATEP) = *(OSTATEP); \ } while (0) static __inline unsigned int kmem_flags_convert(int flags) static __inline unsigned int kmem_flags_convert(unsigned int __nocast flags) { int lflags = __GFP_NOWARN; /* we'll report problems, if need be */ unsigned int lflags = __GFP_NOWARN; /* we'll report problems, if need be */ #ifdef DEBUG if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) { Loading Loading @@ -125,12 +125,13 @@ kmem_zone_destroy(kmem_zone_t *zone) BUG(); } extern void *kmem_zone_zalloc(kmem_zone_t *, int); extern void *kmem_zone_alloc(kmem_zone_t *, int); extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); extern void *kmem_alloc(size_t, int); extern void *kmem_realloc(void *, size_t, size_t, int); extern void *kmem_zalloc(size_t, int); extern void *kmem_alloc(size_t, unsigned int __nocast); extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); extern void *kmem_zalloc(size_t, unsigned int __nocast); extern void kmem_free(void *, size_t); typedef struct shrinker *kmem_shaker_t; Loading fs/xfs/xfs_log_recover.c +1 −1 Original line number Diff line number Diff line Loading @@ -1387,7 +1387,7 @@ xlog_recover_add_to_cont_trans( old_ptr = item->ri_buf[item->ri_cnt-1].i_addr; old_len = item->ri_buf[item->ri_cnt-1].i_len; ptr = kmem_realloc(old_ptr, len+old_len, old_len, 0); ptr = kmem_realloc(old_ptr, len+old_len, old_len, 0u); memcpy(&ptr[old_len], dp, len); /* d, s, l */ item->ri_buf[item->ri_cnt-1].i_len += len; item->ri_buf[item->ri_cnt-1].i_addr = ptr; Loading Loading
fs/xfs/linux-2.6/kmem.c +12 −11 Original line number Diff line number Diff line Loading @@ -45,10 +45,10 @@ void * kmem_alloc(size_t size, int flags) kmem_alloc(size_t size, unsigned int __nocast flags) { int retries = 0; int lflags = kmem_flags_convert(flags); unsigned int lflags = kmem_flags_convert(flags); void *ptr; do { Loading @@ -67,7 +67,7 @@ kmem_alloc(size_t size, int flags) } void * kmem_zalloc(size_t size, int flags) kmem_zalloc(size_t size, unsigned int __nocast flags) { void *ptr; Loading @@ -89,7 +89,8 @@ kmem_free(void *ptr, size_t size) } void * kmem_realloc(void *ptr, size_t newsize, size_t oldsize, int flags) kmem_realloc(void *ptr, size_t newsize, size_t oldsize, unsigned int __nocast flags) { void *new; Loading @@ -104,10 +105,10 @@ kmem_realloc(void *ptr, size_t newsize, size_t oldsize, int flags) } void * kmem_zone_alloc(kmem_zone_t *zone, int flags) kmem_zone_alloc(kmem_zone_t *zone, unsigned int __nocast flags) { int retries = 0; int lflags = kmem_flags_convert(flags); unsigned int lflags = kmem_flags_convert(flags); void *ptr; do { Loading @@ -123,7 +124,7 @@ kmem_zone_alloc(kmem_zone_t *zone, int flags) } void * kmem_zone_zalloc(kmem_zone_t *zone, int flags) kmem_zone_zalloc(kmem_zone_t *zone, unsigned int __nocast flags) { void *ptr; Loading
fs/xfs/linux-2.6/kmem.h +12 −11 Original line number Diff line number Diff line Loading @@ -39,10 +39,10 @@ /* * memory management routines */ #define KM_SLEEP 0x0001 #define KM_NOSLEEP 0x0002 #define KM_NOFS 0x0004 #define KM_MAYFAIL 0x0008 #define KM_SLEEP 0x0001u #define KM_NOSLEEP 0x0002u #define KM_NOFS 0x0004u #define KM_MAYFAIL 0x0008u #define kmem_zone kmem_cache_s #define kmem_zone_t kmem_cache_t Loading Loading @@ -81,9 +81,9 @@ typedef unsigned long xfs_pflags_t; *(NSTATEP) = *(OSTATEP); \ } while (0) static __inline unsigned int kmem_flags_convert(int flags) static __inline unsigned int kmem_flags_convert(unsigned int __nocast flags) { int lflags = __GFP_NOWARN; /* we'll report problems, if need be */ unsigned int lflags = __GFP_NOWARN; /* we'll report problems, if need be */ #ifdef DEBUG if (unlikely(flags & ~(KM_SLEEP|KM_NOSLEEP|KM_NOFS|KM_MAYFAIL))) { Loading Loading @@ -125,12 +125,13 @@ kmem_zone_destroy(kmem_zone_t *zone) BUG(); } extern void *kmem_zone_zalloc(kmem_zone_t *, int); extern void *kmem_zone_alloc(kmem_zone_t *, int); extern void *kmem_zone_zalloc(kmem_zone_t *, unsigned int __nocast); extern void *kmem_zone_alloc(kmem_zone_t *, unsigned int __nocast); extern void *kmem_alloc(size_t, int); extern void *kmem_realloc(void *, size_t, size_t, int); extern void *kmem_zalloc(size_t, int); extern void *kmem_alloc(size_t, unsigned int __nocast); extern void *kmem_realloc(void *, size_t, size_t, unsigned int __nocast); extern void *kmem_zalloc(size_t, unsigned int __nocast); extern void kmem_free(void *, size_t); typedef struct shrinker *kmem_shaker_t; Loading
fs/xfs/xfs_log_recover.c +1 −1 Original line number Diff line number Diff line Loading @@ -1387,7 +1387,7 @@ xlog_recover_add_to_cont_trans( old_ptr = item->ri_buf[item->ri_cnt-1].i_addr; old_len = item->ri_buf[item->ri_cnt-1].i_len; ptr = kmem_realloc(old_ptr, len+old_len, old_len, 0); ptr = kmem_realloc(old_ptr, len+old_len, old_len, 0u); memcpy(&ptr[old_len], dp, len); /* d, s, l */ item->ri_buf[item->ri_cnt-1].i_len += len; item->ri_buf[item->ri_cnt-1].i_addr = ptr; Loading