Re: [PATCH 32/56] microblaze_v2: definitions of types

From: Arnd Bergmann
Date: Sun May 04 2008 - 17:29:28 EST


On Sunday 04 May 2008, monstr@xxxxxxxxx wrote:
> include/asm-microblaze/posix_types.h

It would be good to have this as asm-generic/posix_types_32.h.
Unfortunately, __kernel_size_t and friends need to match the
compiler and are sometimes defined as 'unsigned int' and
sometimes as 'unsigned long', otherwise we could even use
the same header for 32 and 64 bit.

> +typedef unsigned short __kernel_mode_t;
> +typedef unsigned short __kernel_nlink_t;
> +typedef unsigned short __kernel_ipc_pid_t;

Some architectures define these as 'unsigned int', which
seems reasonable, though there is no real requirement behind it,
afaict.

> +typedef long __kernel_off_t;

I suppose this should become 'typedef long long __kernel_off_t;'
It won't work on pre-C99 compilers, but I don't think we need
to care about those for a new architecture.

> +typedef unsigned short __kernel_uid_t;
> +typedef unsigned short __kernel_gid_t;

this should certainly be unsigned int.

> +typedef unsigned short __kernel_uid16_t;
> +typedef unsigned short __kernel_gid16_t;
> +typedef unsigned int __kernel_uid32_t;
> +typedef unsigned int __kernel_gid32_t;
> +
> +typedef unsigned short __kernel_old_uid_t;
> +typedef unsigned short __kernel_old_gid_t;
> +typedef unsigned short __kernel_old_dev_t;

try not defining these at all and see if something breaks.
If it does, that's probably a bug.

Arnd <><
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/