Re: [PATCH] scsi: eata: drop VLA in reorder()

2018-03-11 Thread Tobin C. Harding
Adding kernel newbies to CC because I pose a few noob questions :) Adding Linus to CC because I quoted him. On Sun, Mar 11, 2018 at 10:06:58PM +0100, Salvatore Mesoraca wrote: > n_ready will always be less than or equal to MAX_MAILBOXES. > So we avoid a VLA[1] and use fixed-length arrays instead.

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 > divisio

[PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE

2017-02-21 Thread Tobin C. Harding
Checkpatch emits ERROR:OPEN_BRACE: that open brace { should be on the previous line. Move open brace to new line. Also add space after if/switch statement since we introduce more checkpatch errors if not fixed at the same time. Signed-off-by: Tobin C. Harding --- drivers/block/cciss_scsi.c

[PATCH 3/3] cciss: Remove kmalloc cast

2017-02-21 Thread Tobin C. Harding
Coccinelle emits a warning about casting the return value of kmalloc(). Coccinelle suggests removing the cast as do kerneljanitors. Remove cast from kmalloc() call. Signed-off-by: Tobin C. Harding --- drivers/block/cciss_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff

[PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings.

2017-02-21 Thread Tobin C. Harding
Re-send after spell checking. :( Coccinelle warns about unnecessary cast on call to kmalloc(). Checkpatch emits various warnings when parsing file. Clean up two checkpatch warnings. Remove trailing whitespace and clean up opening brace position. Remove unnecessary cast on kmalloc(). Tobin C

[PATCH 1/3] cciss: Fix checkpatch TRAILING_WHITESPACE

2017-02-21 Thread Tobin C. Harding
Checkpatch emits 85 trailing whitespace warnings. Remove trailing whitespace. Signed-off-by: Tobin C. Harding --- drivers/block/cciss_scsi.c | 170 ++--- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/drivers/block/cciss_scsi.c b/drivers

[PATCH 0/3] cciss: Fix coccinelle/checkpatch warnings.

2017-02-21 Thread Tobin C. Harding
Coccinelle warns about unnesesary cast on call to kmalloc(). Checkpatch emits various warnings when parsing file. Clean up two checkpatch warnings. Remove trailing whitespace and clean up opending brace position. Remove unnesesary cast on kmalloc(). Tobin C. Harding (3): cciss: Fix checkpatch

[PATCH 2/3] cciss: Fix checkpatch OPEN_BRACE

2017-02-21 Thread Tobin C. Harding
Checkpatch emits ERROR:OPEN_BRACE: that open brace { should be on the previous line. Move open brace to new line. Also add space after if/switch statement since we introduce more checkpatch errors if not fixed at the same time. Signed-off-by: Tobin C. Harding --- drivers/block/cciss_scsi.c

[PATCH 1/3] cciss: Fix checkpatch TRAILING_WHITESPACE

2017-02-21 Thread Tobin C. Harding
Checkpatch emits 85 trailing whitespace warnings. Remove trailing whitespace. Signed-off-by: Tobin C. Harding --- drivers/block/cciss_scsi.c | 170 ++--- 1 file changed, 85 insertions(+), 85 deletions(-) diff --git a/drivers/block/cciss_scsi.c b/drivers

[PATCH 3/3] cciss: Remove kmalloc cast

2017-02-21 Thread Tobin C. Harding
Coccinelle emits a warning about casting the return value of kmalloc(). Coccinelle suggests removing the cast as do kerneljanitors. Remove cast from kmalloc() call. Signed-off-by: Tobin C. Harding --- drivers/block/cciss_scsi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff