Return-Path: Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: [PATCH] bluetooth: LLVMLinux: Remove VLAIS from bluetooth/amp.c From: Marcel Holtmann In-Reply-To: <1409958214-5651-1-git-send-email-behanw@converseincode.com> Date: Fri, 5 Sep 2014 16:22:16 -0700 Cc: "David S. Miller" , "Gustavo F. Padovan" , Johan Hedberg , BlueZ development , kernel list , netdev@vger.kernel.org, Linus Torvalds , Mark Charlebois , =?iso-8859-1?Q?Jan-Simon_M=F6ller?= Message-Id: References: <1409958214-5651-1-git-send-email-behanw@converseincode.com> To: behanw@converseincode.com Sender: linux-bluetooth-owner@vger.kernel.org List-ID: Hi Behan, > Replaced the use of a Variable Length Array In Struct (VLAIS) with a C99 > compliant equivalent. This patch allocates the appropriate amount of memory > using an char array. > > The new code can be compiled with both gcc and clang. > > struct shash_desc contains a flexible array member member ctx declared with > CRYPTO_MINALIGN_ATTR, so sizeof(struct shash_desc) aligns the beginning > of the array declared after struct shash_desc with long long. > > No trailing padding is required because it is not a struct type that can > be used in an array. > > The CRYPTO_MINALIGN_ATTR is required so that desc is aligned with long long > as would be the case for a struct containing a member with > CRYPTO_MINALIGN_ATTR. > > Signed-off-by: Behan Webster > Signed-off-by: Mark Charlebois > Signed-off-by: Jan-Simon M?ller > --- > net/bluetooth/amp.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) patch has been applied to bluetooth-next tree. Regards Marcel