Re: [PATCHv4 1/2] staging: wilc1000: remove FREE_WILC_BUFFER()

2015-09-05 Thread Raphaël Beamonte
Oh well. Actually you did it. I answered while pulling the git... Sorry for that unuseful mail! :) 2015-09-05 12:25 GMT-04:00 Raphaël Beamonte : > 2015-09-02 21:19 GMT-04:00 Greg Kroah-Hartman : >> Turns out this file is never even built, you should just remove it :) > > You'r

Re: [PATCHv4 1/2] staging: wilc1000: remove FREE_WILC_BUFFER()

2015-09-05 Thread Raphaël Beamonte
2015-09-02 21:19 GMT-04:00 Greg Kroah-Hartman : > Turns out this file is never even built, you should just remove it :) You're right, although it seems that is one of the "To-dos" of that module, as the references I find about the config variable to allow the compiling of that file is the followin

[PATCHv4 0/2] staging: wilc1000: code improvements

2015-08-18 Thread Raphaël Beamonte
Hi, As requested, here are the two remaining ready patches of this patchset. I pulled and rebased against staging-testing just now. They should thus be usable without problem! Thanks, Raphaël Raphaël Beamonte (2): staging: wilc1000: remove FREE_WILC_BUFFER() staging: wilc1000: replace

[PATCHv4 2/2] staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak

2015-08-18 Thread Raphaël Beamonte
The MALLOC_WILC_BUFFER() macro was using a return statement, and didn't take care of possible memory leaks and subsequent bugs when it was failing after succeeding some allocations. This patch corrects this behavior. Signed-off-by: Raphaël Beamonte --- drivers/staging/wil

[PATCHv4 1/2] staging: wilc1000: remove FREE_WILC_BUFFER()

2015-08-18 Thread Raphaël Beamonte
It was just a wrapper around kfree(), so call that instead. Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/wilc_exported_buf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_exported_buf.c b/drivers/staging/wilc1000

Re: [PATCHv3] staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak

2015-08-18 Thread Raphaël Beamonte
2015-08-18 5:15 GMT-04:00 Dan Carpenter : > To be honest, I have lost track of this patchset. If you are planning > to redo the other patches can you send it in a new thread? Actually, Greg already included the "return statement" and "DECLARE_WILC_BUFFER" ones. The replacement of printk by netdev

Re: [PATCHv3] staging: wilc1000: use netdev_* instead of printk

2015-08-17 Thread Raphaël Beamonte
2015-08-18 0:24 GMT-04:00 Sudip Mukherjee : >> + netdev_err("[Sendconfigpkt]Get Timed out\n"); > This will not compile. you can not just replace printk with > netdev_*, you need to mention a net_device. You're right! I'm making a lot of mistakes. It seems I called the m

Re: [PATCHv2 5/5] staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak

2015-08-17 Thread Raphaël Beamonte
2015-08-17 15:41 GMT-04:00 Arend van Spriel : > Probable MACRO_WILC_BUFFER should be MALLOC_WILC_BUFFER here. Good catch! > There is really no need to print an error message here. kmalloc will blurb > enough info when it fails. Ok! > So these buffers are globals? So does this driver support mul

[PATCHv3] staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak

2015-08-17 Thread Raphaël Beamonte
The MALLOC_WILC_BUFFER() macro was using a return statement, and didn't take care of possible memory leaks and subsequent bugs when it was failing after succeeding some allocations. This patch corrects this behavior. Signed-off-by: Raphaël Beamonte --- drivers/staging/wil

[PATCHv3] staging: wilc1000: use netdev_* instead of printk

2015-08-17 Thread Raphaël Beamonte
Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/coreconfigurator.c | 4 ++-- drivers/staging/wilc1000/linux_wlan.c| 8 drivers/staging/wilc1000/linux_wlan_common.h | 28 ++-- drivers/staging/wilc1000/linux_wlan_sdio.c | 2 +- drivers

[PATCHv2 0/5] staging: wilc1000: code improvements

2015-08-17 Thread Raphaël Beamonte
Hi, Following comments from Dan Carpenter, please find the following revised patches. Raphaël Raphaël Beamonte (5): staging: wilc1000: remove void function return statements that are not useful staging: wilc1000: use pr_* instead of printk staging: wilc1000: remove

[PATCHv2 3/5] staging: wilc1000: remove DECLARE_WILC_BUFFER()

2015-08-17 Thread Raphaël Beamonte
It was just a wrapper to initialize a variable. Initialize it directly instead. Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/wilc_exported_buf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_exported_buf.c b/drivers

[PATCHv2 2/5] staging: wilc1000: use pr_* instead of printk

2015-08-17 Thread Raphaël Beamonte
Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/coreconfigurator.c | 4 ++-- drivers/staging/wilc1000/linux_wlan.c| 8 drivers/staging/wilc1000/linux_wlan_common.h | 28 ++-- drivers/staging/wilc1000/linux_wlan_sdio.c | 2 +- drivers

[PATCHv2 1/5] staging: wilc1000: remove void function return statements that are not useful

2015-08-17 Thread Raphaël Beamonte
Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/host_interface.c| 4 drivers/staging/wilc1000/linux_wlan.c| 1 - drivers/staging/wilc1000/wilc_exported_buf.c | 4 +--- drivers/staging/wilc1000/wilc_wlan.c | 3 --- drivers/staging/wilc1000/wilc_wlan_cfg.c

[PATCHv2 5/5] staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak

2015-08-17 Thread Raphaël Beamonte
The MACRO_WILC_BUFFER() macro was using a return statement, and didn't take care of possible memory leaks and subsequent bugs when it was failing after succeeding some allocations. This patch corrects this behavior. Signed-off-by: Raphaël Beamonte --- drivers/staging/wil

[PATCHv2 4/5] staging: wilc1000: remove FREE_WILC_BUFFER()

2015-08-17 Thread Raphaël Beamonte
It was just a wrapper around kfree(), so call that instead. Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/wilc_exported_buf.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_exported_buf.c b/drivers/staging/wilc1000

Re: [PATCH 4/5] staging: wilc1000: use pr_* instead of printk

2015-08-17 Thread Raphaël Beamonte
2015-08-17 13:47 GMT-04:00 Dan Carpenter : >> - printk("[Sendconfigpkt]Get Timed out\n"); >> + pr_debug("[Sendconfigpkt]Get Timed out\n"); > > > Possibly pr_err()? Yep. My mistake. I'll do the same for Set Timed Out also! >> -

[PATCH 0/5] staging: wilc1000: code improvements

2015-08-17 Thread Raphaël Beamonte
driver. Raphaël Raphaël Beamonte (5): staging: wilc1000: remove DECLARE_WILC_BUFFER() staging: wilc1000: remove FREE_WILC_BUFFER() staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak staging: wilc1000: use pr_* instead of printk staging: wilc1000: remove

[PATCH 2/5] staging: wilc1000: remove FREE_WILC_BUFFER()

2015-08-17 Thread Raphaël Beamonte
It was just a wrapper around kfree(), so call that instead. Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/wilc_exported_buf.c | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_exported_buf.c b/drivers/staging

[PATCH 4/5] staging: wilc1000: use pr_* instead of printk

2015-08-17 Thread Raphaël Beamonte
Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/coreconfigurator.c | 4 ++-- drivers/staging/wilc1000/linux_wlan.c| 8 +++ drivers/staging/wilc1000/linux_wlan_common.h | 32 ++-- drivers/staging/wilc1000/linux_wlan_sdio.c | 2 +- drivers

[PATCH 5/5] staging: wilc1000: remove void function return statements that are not useful

2015-08-17 Thread Raphaël Beamonte
Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/host_interface.c| 4 drivers/staging/wilc1000/linux_wlan.c| 1 - drivers/staging/wilc1000/wilc_exported_buf.c | 2 -- drivers/staging/wilc1000/wilc_wlan.c | 3 --- drivers/staging/wilc1000/wilc_wlan_cfg.c

[PATCH 3/5] staging: wilc1000: replace MALLOC_WILC_BUFFER() macro to avoid possible memory leak

2015-08-17 Thread Raphaël Beamonte
The MACRO_WILC_BUFFER() macro was using a return statement, and didn't take care of possible memory leaks and subsequent bugs when it was failing after succeeding some allocations. This patch corrects this behavior. Signed-off-by: Raphaël Beamonte --- drivers/staging/wil

[PATCH 1/5] staging: wilc1000: remove DECLARE_WILC_BUFFER()

2015-08-17 Thread Raphaël Beamonte
It was just a wrapper to initialize a variable. Initialize it directly instead. Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/wilc_exported_buf.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_exported_buf.c b

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 : > 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 those macro up and send a

[PATCH 3/3] staging: wilc1000: code style: fix open brace { on wrong line

2015-08-15 Thread Raphaël Beamonte
Open braces should be on the same line as if and for statements. Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/linux_wlan.c | 3 +-- drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers

[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 --- drivers/staging/wilc1000/wilc_exported_buf.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_exported_buf.c b/drivers

[PATCH 0/3] staging: wilc1000: code style patches

2015-08-15 Thread Raphaël Beamonte
Hello, Please find in following emails code style patches for the driver wilc1000 in staging. Raphaël Raphaël Beamonte (3): staging: wilc1000: code style: fix macro with multiple statements staging: wilc1000: code style: fix globals initialized to false staging: wilc1000: code style: fix

[PATCH 2/3] staging: wilc1000: code style: fix globals initialized to false

2015-08-15 Thread Raphaël Beamonte
Globals should not be initialized to 0 or NULL. Signed-off-by: Raphaël Beamonte --- drivers/staging/wilc1000/host_interface.c | 4 ++-- drivers/staging/wilc1000/wilc_wlan.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/host_interface.c b