diff options
author | Geert Uytterhoeven <geert@linux-m68k.org> | 2012-08-12 06:01:34 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2012-08-21 09:23:04 -0400 |
commit | cbe05685c1859e655c663b6ff2d0f71093ee834d (patch) | |
tree | 2acfb97d06de9dd98abd97f14fe8baf10a076cd1 /arch/s390 | |
parent | 9160338de92c0305329be5163a76f849806e83de (diff) |
s390: Always use "long" for ssize_t to match size_t
On s390x-linux-gcc, __SIZE_TYPE__ expands to "long unsigned int" for both
32-bit s390 and 64-bit s390x, as
gcc-4.6.3-nolibc/s390x-linux/lib/gcc/s390x-linux/4.6.3/plugin/include/config/s390/linux.h
has
#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "long unsigned int")
To match this, __kernel_size_t is always set to "long unsigned int".
But while __kernel_ssize_t is "long" on 64-bit s390x, it is "int" on 32-bit
s390, 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 "long", irrespective of word size.
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r-- | arch/s390/include/asm/posix_types.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/arch/s390/include/asm/posix_types.h b/arch/s390/include/asm/posix_types.h index 7bcc14e395f0..bf2a2ad2f800 100644 --- a/arch/s390/include/asm/posix_types.h +++ b/arch/s390/include/asm/posix_types.h | |||
@@ -13,6 +13,7 @@ | |||
13 | */ | 13 | */ |
14 | 14 | ||
15 | typedef unsigned long __kernel_size_t; | 15 | typedef unsigned long __kernel_size_t; |
16 | typedef long __kernel_ssize_t; | ||
16 | #define __kernel_size_t __kernel_size_t | 17 | #define __kernel_size_t __kernel_size_t |
17 | 18 | ||
18 | typedef unsigned short __kernel_old_dev_t; | 19 | typedef unsigned short __kernel_old_dev_t; |
@@ -25,7 +26,6 @@ typedef unsigned short __kernel_mode_t; | |||
25 | typedef unsigned short __kernel_ipc_pid_t; | 26 | typedef unsigned short __kernel_ipc_pid_t; |
26 | typedef unsigned short __kernel_uid_t; | 27 | typedef unsigned short __kernel_uid_t; |
27 | typedef unsigned short __kernel_gid_t; | 28 | typedef unsigned short __kernel_gid_t; |
28 | typedef int __kernel_ssize_t; | ||
29 | typedef int __kernel_ptrdiff_t; | 29 | typedef int __kernel_ptrdiff_t; |
30 | 30 | ||
31 | #else /* __s390x__ */ | 31 | #else /* __s390x__ */ |
@@ -35,7 +35,6 @@ typedef unsigned int __kernel_mode_t; | |||
35 | typedef int __kernel_ipc_pid_t; | 35 | typedef int __kernel_ipc_pid_t; |
36 | typedef unsigned int __kernel_uid_t; | 36 | typedef unsigned int __kernel_uid_t; |
37 | typedef unsigned int __kernel_gid_t; | 37 | typedef unsigned int __kernel_gid_t; |
38 | typedef long __kernel_ssize_t; | ||
39 | typedef long __kernel_ptrdiff_t; | 38 | typedef long __kernel_ptrdiff_t; |
40 | typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ | 39 | typedef unsigned long __kernel_sigset_t; /* at least 32 bits */ |
41 | 40 | ||