]> git.karo-electronics.de Git - karo-tx-linux.git/commit
cris: Use "int" for ssize_t to match size_t
authorGeert Uytterhoeven <geert@linux-m68k.org>
Wed, 20 Feb 2013 02:13:35 +0000 (13:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:03 +0000 (16:52 +1100)
commit3da21110c4be24a25413b02016777f1aeef6e46e
tree057f3ee9f3dbe5b8a40872288cd911593c49e273
parentaa757cddfbbe5520c5872c9a12e5fb0562f36571
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>
arch/cris/include/uapi/asm/posix_types.h