[lkml]   [2018]   [Mar]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] cxgb3: remove VLA
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.


 \ /
  Last update: 2018-03-07 18:26    [W:0.033 / U:11.008 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site