From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752513AbaIEXV4 (ORCPT ); Fri, 5 Sep 2014 19:21:56 -0400 Received: from senator.holtmann.net ([87.106.208.187]:60882 "EHLO mail.holtmann.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751187AbaIEXVy convert rfc822-to-8bit (ORCPT ); Fri, 5 Sep 2014 19:21:54 -0400 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?= Content-Transfer-Encoding: 8BIT Message-Id: References: <1409958214-5651-1-git-send-email-behanw@converseincode.com> To: behanw@converseincode.com X-Mailer: Apple Mail (2.1878.6) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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