diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2013-02-21 19:42:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-02-21 20:22:16 -0500 |
commit | ddfe9b359f8a256e711430c29d7c553b1569faed (patch) | |
tree | 9e5da050247bda3f8a1bfb083d5b79d8771b19c4 /arch/cris/include | |
parent | 3b6391834d0aa87a15e2d3997537933cafe185bd (diff) |
cris: use "int" for ssize_t to match size_t
On cris-linux-gcc, __SIZE_TYPE__ expands to "unsigned int", as
gcc-4.6.3-nolibc/cris-linux/lib/gcc/cris-linux/4.6.3/plugin/include/config/cris/linux.h
has
#define SIZE_TYPE "unsigned int"
Hence __kernel_size_t is also "unsigned int". But __kernel_ssize_t is
"long", which has a different base type, causing compiler warnings like:
fs/quota/quota_tree.c:372:4: warning: format '%zd' expects argument of type 'signed size_t', but argument 4 has type 'ssize_t' [-Wformat]
To fix this, __kernel_ssize_t should be changed to "int". Hence cris can
just use the generic 32-bit versions from include/asm-generic/posix_types.h
for all size-related types.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Mikael Starvik <starvik@axis.com>
Acked-by: Jesper Nilsson <jesper.nilsson@axis.com>
Cc: Hans-Peter Nilsson <hans-peter.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/cris/include')
-rw-r--r-- | arch/cris/include/uapi/asm/posix_types.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/arch/cris/include/uapi/asm/posix_types.h b/arch/cris/include/uapi/asm/posix_types.h index ce4e51793151..0f22e6a67ea5 100644 --- a/arch/cris/include/uapi/asm/posix_types.h +++ b/arch/cris/include/uapi/asm/posix_types.h | |||
@@ -22,11 +22,6 @@ typedef unsigned short __kernel_uid_t; | |||
22 | typedef unsigned short __kernel_gid_t; | 22 | typedef unsigned short __kernel_gid_t; |
23 | #define __kernel_uid_t __kernel_uid_t | 23 | #define __kernel_uid_t __kernel_uid_t |
24 | 24 | ||
25 | typedef __SIZE_TYPE__ __kernel_size_t; | ||
26 | typedef long __kernel_ssize_t; | ||
27 | typedef int __kernel_ptrdiff_t; | ||
28 | #define __kernel_size_t __kernel_size_t | ||
29 | |||
30 | typedef unsigned short __kernel_old_dev_t; | 25 | typedef unsigned short __kernel_old_dev_t; |
31 | #define __kernel_old_dev_t __kernel_old_dev_t | 26 | #define __kernel_old_dev_t __kernel_old_dev_t |
32 | 27 | ||