[PATCH] drivers: staging: lustre: lustre: include: add "__attribute__((packed))" for the related union
Dan Carpenter
dan.carpenter at oracle.com
Sat Jan 18 10:05:48 UTC 2014
On Sat, Jan 18, 2014 at 05:50:34PM +0800, Chen Gang wrote:
> Unfortunately, not all compilers assumes the structures within a pack
> region also need be packed (e.g. metag), so need add a pack explicitly
> to satisfy all compilers.
>
> The related error (under metag with allmodconfig):
>
> CC [M] drivers/staging/lustre/lustre/lov/lov_pack.o
> drivers/staging/lustre/lustre/lov/lov_pack.c: In function 'lov_getstripe':
> drivers/staging/lustre/lustre/lov/lov_pack.c:630: error: duplicate case value
> drivers/staging/lustre/lustre/lov/lov_pack.c:630: error: previously used here
>
> And originally, all related code used "__attribute__((packed))", so
> still use it instead of '__packed'.
Use __packed. Then at least one line will be correct which is better
than nothing.
regards,
dan carpenter
More information about the devel
mailing list