From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Gustavo A. R. Silva" Subject: Re: [PATCH] cxgb3: remove VLA Date: Wed, 7 Mar 2018 11:30:39 -0600 Message-ID: <2dbb7aba-4e12-c4df-363e-b65fcbb16d0e@embeddedor.com> References: <20180306053934.GA17162@embeddedgus> <20180307.122541.1396477885969641264.davem@davemloft.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: santosh@chelsio.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org To: David Miller , gustavo@embeddedor.com Return-path: In-Reply-To: <20180307.122541.1396477885969641264.davem@davemloft.net> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On 03/07/2018 11:25 AM, David Miller wrote: > From: "Gustavo A. R. Silva" > Date: Mon, 5 Mar 2018 23:39:34 -0600 > >> In preparation to enabling -Wvla, remove VLA and replace it >> with dynamic memory allocation. >> >> Signed-off-by: Gustavo A. R. Silva > > All of these lengths are limited by the encoding of the field in the > VPD, which is a u8, and thus 255 bytes. > > Please just change the 'len' argument to these functions to a u8 and > use a 256 byte buffer on the stack. > > Thanks. > OK. I got it. Thanks for the feedback. -- Gustavo