]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
s390: Always use "long" for ssize_t to match size_t
authorGeert Uytterhoeven <geert@linux-m68k.org>
Sun, 12 Aug 2012 10:01:34 +0000 (12:01 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Tue, 21 Aug 2012 13:23:04 +0000 (15:23 +0200)
commitcbe05685c1859e655c663b6ff2d0f71093ee834d
tree2acfb97d06de9dd98abd97f14fe8baf10a076cd1
parent9160338de92c0305329be5163a76f849806e83de
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>
arch/s390/include/asm/posix_types.h