From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932124AbdJXTrE (ORCPT ); Tue, 24 Oct 2017 15:47:04 -0400 Received: from mail-io0-f193.google.com ([209.85.223.193]:54559 "EHLO mail-io0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908AbdJXTrB (ORCPT ); Tue, 24 Oct 2017 15:47:01 -0400 X-Google-Smtp-Source: ABhQp+S1utLwr6nkiXBxwegT7qSvVdLyp+QukI/6oaohZn24ETw7cnyX5PRqRN+cgpGWQNhlPvPunw== Date: Tue, 24 Oct 2017 12:46:59 -0700 From: Matthias Kaehlcke To: Inaky Perez-Gonzalez Cc: linux-wimax@intel.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Behan Webster , Mark Charlebois , Arnd Bergmann , Guenter Roeck Subject: Re: [PATCH] wimax/i2400m: Remove VLAIS Message-ID: <20171024194659.GC96615@google.com> References: <20171009194153.30467-1-mka@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20171009194153.30467-1-mka@chromium.org> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org El Mon, Oct 09, 2017 at 12:41:53PM -0700 Matthias Kaehlcke ha dit: > From: Behan Webster > > Convert Variable Length Array in Struct (VLAIS) to valid C by converting > local struct definition to use a flexible array. The structure is only > used to define a cast of a buffer so the size of the struct is not used > to allocate storage. > > Signed-off-by: Behan Webster > Signed-off-by: Mark Charebois > Suggested-by: Arnd Bergmann > Signed-off-by: Matthias Kaehlcke > --- > drivers/net/wimax/i2400m/fw.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/net/wimax/i2400m/fw.c b/drivers/net/wimax/i2400m/fw.c > index c9c711dcd0e6..a89b5685e68b 100644 > --- a/drivers/net/wimax/i2400m/fw.c > +++ b/drivers/net/wimax/i2400m/fw.c > @@ -652,7 +652,7 @@ static int i2400m_download_chunk(struct i2400m *i2400m, const void *chunk, > struct device *dev = i2400m_dev(i2400m); > struct { > struct i2400m_bootrom_header cmd; > - u8 cmd_payload[chunk_len]; > + u8 cmd_payload[]; > } __packed *buf; > struct i2400m_bootrom_header ack; ping any comments on this?