[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201406171348.59329.arnd@arndb.de>
Date: Tue, 17 Jun 2014 13:48:59 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Vinod Koul <vinod.koul@...el.com>
Cc: Takashi Iwai <tiwai@...e.de>,
"Wang, Xiaoming" <xiaoming.wang@...el.com>, jeeja.kp@...el.com,
dhowells@...hat.com, tglx@...utronix.de, mtk.manpages@...il.com,
paulmck@...ux.vnet.ibm.com, davej@...hat.com,
linux-kernel@...r.kernel.org, dongxing.zhang@...el.com
Subject: Re: [PATCH] ALSA: compress: Fix the mismatch size of struc between share lib(32bit) and kernel(64bit)
On Tuesday 17 June 2014, Vinod Koul wrote:
> > Anyway, if you use the __packed attribute, best apply it only to
> > the individual __u64 member(s), not the entire struct, otherwise
> > you might change user space programs in a subtle way when the alignment
> > changes from 4 to 1 byte.
>
> then wouldn't it make sense to call out the aligned as well to ensure that it is
> aligning to what we want. Then we should add aligned (4) everywhere as mostly we
> need 4 byte aligned here
If you want to be explicit, then just mark the entire structure as
attribute((packed,aligned(4))), not each individual member.
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists