[PATCH v2] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
The kernel would like to have all stack VLA usage removed[1]. We already have a pre-processor constant defined MAX_SGLEN. We can use this instead of the variable param-sglen. [1]: https://lkml.org/lkml/2018/3/7/621 Signed-off-by: Tobin C. Harding <m...@tobin.cc> --- drivers/usb/misc/usb

Re: [PATCH 3/4] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
On Fri, Mar 09, 2018 at 04:55:35PM +1100, Tobin C. Harding wrote: > Signed-off-by: Tobin C. Harding <m...@tobin.cc> > --- Please drop this. To much on github not writing proper commit logs :( v2 to come. thanks, Tobin. -- To unsubscribe from this list: send the line "unsu

[PATCH 3/4] usb: Remove stack VLA usage

2018-03-08 Thread Tobin C. Harding
Signed-off-by: Tobin C. Harding <m...@tobin.cc> --- drivers/usb/misc/usbtest.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/usb/misc/usbtest.c b/drivers/usb/misc/usbtest.c index 90028ef541e3..9e1142b8b91b 100644 --- a/drivers/usb/misc/usbtest.c +++ b/drive

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-01 Thread Tobin C. Harding
On Sun, Oct 01, 2017 at 03:30:38PM -0400, Jérémy Lefaure wrote: > Hi everyone, > Using ARRAY_SIZE improves the code readability. I used coccinelle (I > made a change to the array_size.cocci file [1]) to find several places > where ARRAY_SIZE could be used instead of other macros or sizeof >