Re: [PATCH] Staging: vt6655: staticfy variable

2014-07-30 Thread Guillaume Clement
Hello, > Add static to variable. > Signed-off-by: Fernando Apesteguia > --- > drivers/staging/vt6655/ioctl.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/vt6655/ioctl.c > b/drivers/staging/vt6655/ioctl.c > index 65e5933..cc6e47b 100644 > --- a/drive

[PATCH] staging: vt6655: fix direct dereferencing of user pointer

2014-07-25 Thread Guillaume Clement
Sparse reported that the data from tagSCmdRequest is given by userspace, so it should be tagged as such. Later, we were memcomparing and dereferencing it without first copying it, fix that as well. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/iocmd.h | 2 +- drivers/staging

[PATCH 07/14] staging: vt6655: Use pr_* functions instead of printk

2014-07-24 Thread Guillaume Clement
Lots of printk are used in vt6655, replace them with the pr_* equivalent. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/card.c| 12 +++--- drivers/staging/vt6655/device_cfg.h | 2 +- drivers/staging/vt6655/device_main.c | 71 ++-- drivers

[PATCH 08/14] staging: vt6655: break single line if statements

2014-07-24 Thread Guillaume Clement
This fixes the "trailing statements should be on next line" checkpatch warning. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/card.c| 6 -- drivers/staging/vt6655/device_main.c | 6 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drive

[PATCH 03/14] staging: vt6655: Remove spaces before quoted newlines

2014-07-24 Thread Guillaume Clement
This fixes several spaces added just before a newline in debug strings, reported by checkpatch. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/card.c| 2 +- drivers/staging/vt6655/device_main.c | 53 - drivers/staging/vt6655/dpc.c | 13

[PATCH 11/14] staging: vt6655: remove braces for single statements if

2014-07-24 Thread Guillaume Clement
This fixes several "braces {} are not necessary for single statement blocks" checkpatch warnings. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/power.c | 3 +-- drivers/staging/vt6655/vntwifi.c | 3 +-- drivers/staging/vt6655/wmgr.c| 3 +-- 3 files changed, 3

[PATCH] staging: vt6655: tag data as __user in struct tagSCmdRequest

2014-07-24 Thread Guillaume Clement
Sparse reported that the data from tagSCmdRequest is given by userspace, so it should be tagged as such. Later, we were memcomparing and dereferencing it without first copying it, fix that as well. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/iocmd.h | 2 +- drivers/staging

[PATCH 10/14] staging: vt6655: add missing whitespace

2014-07-24 Thread Guillaume Clement
Some whitespace were missing, causing checkpatch warnings and altering readability. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/device_main.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging

[PATCH 14/14] staging: vt6655: Remove NULL pointer sparse warning

2014-07-24 Thread Guillaume Clement
We were using 0 instead of NULL to initialize a pointer, which caused a sparse warning. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/device_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655

[PATCH 09/14] staging: vt6655: Remove unreachable break statements

2014-07-24 Thread Guillaume Clement
This fixes break "break is not useful after a goto or return" checkpatch warnings. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/rf.c | 2 -- drivers/staging/vt6655/wpa.c | 1 - 2 files changed, 3 deletions(-) diff --git a/drivers/staging/vt6655/rf.c b/drivers/stag

[PATCH 04/14] staging: vt6655: fix function braces not on the proper line

2014-07-24 Thread Guillaume Clement
Function braces should be on a separate line. Reported by checkpatch. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/device_main.c | 90 drivers/staging/vt6655/rxtx.c| 6 ++- 2 files changed, 64 insertions(+), 32 deletions(-) diff

[PATCH 13/14] staging: vt6655: remove unused macro

2014-07-24 Thread Guillaume Clement
The MAC_MAX_CONTEXT_SIZE macro was not enclosed into parenthesis, which might have caused hard to debug errors, and caused a sparse warning. Since it is unused, we might as well remove it. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/mac.h | 1 - 1 file changed, 1 deletion

[PATCH 12/14] staging: vt6655: fix braces at newline in if statements

2014-07-24 Thread Guillaume Clement
Braces should not be in a separate line for multi-line if statements. This fixes warnings reported by checkpatch. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/wcmd.c | 5 +++-- drivers/staging/vt6655/wpa.c | 8 2 files changed, 7 insertions(+), 6 deletions(-) diff

[PATCH 02/14] staging: vt6655: Add missing blank lines after declarations

2014-07-24 Thread Guillaume Clement
This patch fixes the missing blank lines after declarations in vt6655 reported by checkpatch. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/80211mgr.c| 1 + drivers/staging/vt6655/baseband.c| 1 + drivers/staging/vt6655/bssdb.c | 7 +++ drivers/staging/vt6655

[PATCH 00/14] staging: vt6655: Sparse and checkpatch fixes

2014-07-24 Thread Guillaume Clement
This patchset fixes a lot of minor checkpatch and sparse warnings. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 06/14] staging: vt6655: fix static position in inline function

2014-07-24 Thread Guillaume Clement
This should be "static inline", not "inline static". Reported by checkpatch. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/device.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/v

[PATCH 05/14] staging: vt6655: fix braces at newline for structs

2014-07-24 Thread Guillaume Clement
For structs definitions, the braces should be at the end of the line. Reported by checkpatch. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/bssdb.h | 3 +-- drivers/staging/vt6655/device.h | 15 +-- drivers/staging/vt6655/key.h| 9 +++-- drivers/staging

[PATCH 01/14] staging: vt6655: remove useless return statements

2014-07-24 Thread Guillaume Clement
Many return statements in void function were present at the end of functions, with no effect. They now are removed. This fixes a bunch of checkpatch warnings. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/80211mgr.c| 36 --- drivers/staging/vt6655

[PATCH 3/5] staging: vt6655: statify some variables

2014-07-22 Thread Guillaume Clement
Some variables are used only in the context of their .c file, which gives warnings with sparse. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/baseband.c| 14 +++--- drivers/staging/vt6655/bssdb.c | 4 ++-- drivers/staging/vt6655/card.c| 6

[PATCH 1/5] staging: vt6655: change type of PortOffset to void __iomem *

2014-07-22 Thread Guillaume Clement
: Guillaume Clement --- drivers/staging/vt6655/baseband.c| 30 +- drivers/staging/vt6655/baseband.h| 24 drivers/staging/vt6655/card.c| 8 +-- drivers/staging/vt6655/card.h| 8 +-- drivers/staging/vt6655/device.h | 2 +- drivers/staging/vt6655

[PATCH 4/5] staging: vt6655: remove unused functions

2014-07-22 Thread Guillaume Clement
The IEEE11hbMgrRxAction is not exported and never used. Deleting it allows to delete other functions that were only used by IEEE11hbMgrRxAction. This allows to fix several warnings reported by sparse. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/IEEE11h.c | 175

[PATCH 2/5] staging: vt6655:fix warning for unexported non-static functions

2014-07-22 Thread Guillaume Clement
There is one function in aes_ccmp.c which is exported, but sparse sees it unexported because it doesn't include the header that exports it. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/aes_ccmp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/v

[PATCH 5/5] staging: vt6655: Fix unused function warning

2014-07-22 Thread Guillaume Clement
Sparse reports that MimeThread is not used. Actually, it can be used if THREAD is defined. By enclosing the MimeThread function into the same #ifdef as the caller of MimeThread, this fixes the sparse warnings. Signed-off-by: Guillaume Clement --- drivers/staging/vt6655/device_main.c | 6

[PATCH 0/5] staging: vt6655: fix sparse issues

2014-07-22 Thread Guillaume Clement
Those patches fix warnings reported by sparse on the vt6655 driver. This will allow to more easily find real errors with sparse later if one appears. Note that checkpatch does return an error for patch 1 and 2 (line over 80 characters) but the line length was not increased by this patch. If neede

[PATCH] staging:nvec: Fix several coding style warnings

2014-07-07 Thread Guillaume Clement
This fixes several warnings in the nvec staging driver. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

[PATCH 1/5] staging:nvec: Fix "unnecessary else" coding style warning.

2014-07-07 Thread Guillaume Clement
The last else is unnessary as all the if statements end with a return. Signed-off-by: Guillaume Clément --- drivers/staging/nvec/nvec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/nvec/nvec.c b/drivers/staging/nvec/nvec.c index 90f1c4d..8a3dd47 100644 --

[PATCH 4/5] staging:nvec: Add missing blank line after declarations.

2014-07-07 Thread Guillaume Clement
Signed-off-by: Guillaume Clément --- drivers/staging/nvec/nvec_power.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/nvec/nvec_power.c b/drivers/staging/nvec/nvec_power.c index aacfcd6..6446e15 100644 --- a/drivers/staging/nvec/nvec_power.c +++ b/drivers/staging/nvec/nvec_p

[PATCH 5/5] staging:nvec: Add missing blank line after declarations.

2014-07-07 Thread Guillaume Clement
Signed-off-by: Guillaume Clément --- drivers/staging/nvec/nvec_ps2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/nvec/nvec_ps2.c b/drivers/staging/nvec/nvec_ps2.c index 45b2f13..f56f1db 100644 --- a/drivers/staging/nvec/nvec_ps2.c +++ b/drivers/staging/nvec/nvec_ps2.c @@

[PATCH 2/5] staging:nvec: Remove unnessary out of memory message.

2014-07-07 Thread Guillaume Clement
Logging messages that show some type of "out of memory" error are generally unnecessary as there is a generic message and a stack dump done by the memory subsystem. Signed-off-by: Guillaume Clément --- drivers/staging/nvec/nvec.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff -

[PATCH 3/5] staging:nvec: Add missing blank line after declarations.

2014-07-07 Thread Guillaume Clement
Signed-off-by: Guillaume Clément --- drivers/staging/nvec/nvec_paz00.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/nvec/nvec_paz00.c b/drivers/staging/nvec/nvec_paz00.c index 934b796..e2e675a 100644 --- a/drivers/staging/nvec/nvec_paz00.c +++ b/drivers/staging/nvec/nvec_p