Re: [PATCH 1/3] staging: wilc1000: code style: fix macro with multiple statements

2015-08-17 Thread Dan Carpenter
On Sun, Aug 16, 2015 at 01:30:12AM -0400, Raphaël Beamonte wrote: #define MALLOC_WILC_BUFFER(name, size) \ - exported_ ## name = kmalloc(size, GFP_KERNEL);\ - if (!exported_ ## name) { \ - printk(fail to alloc: %s memory\n, exported_ ## name); \ -

Re: [PATCH 1/3] staging: wilc1000: code style: fix macro with multiple statements

2015-08-17 Thread Raphaël Beamonte
2015-08-17 5:08 GMT-04:00 Dan Carpenter dan.carpen...@oracle.com: Pull it in one indent level... But actually this macro has a return in the middle of it, so it just introduces bugs all over the place like eating cookies in bed. We should just delete it instead. You're right! I'll clean

[PATCH 1/3] staging: wilc1000: code style: fix macro with multiple statements

2015-08-15 Thread Raphaël Beamonte
Macros with multiple statements should be enclosed in a do - while loop Signed-off-by: Raphaël Beamonte raphael.beamo...@gmail.com --- drivers/staging/wilc1000/wilc_exported_buf.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git