[PATCH v2] staging: lustre: Fix variable type declaration after refactoring

2016-12-08 Thread Quentin Lambert
eanup lustre_lib.h") Signed-off-by: Quentin Lambert --- v2: fixes the referenced sha drivers/staging/lustre/lustre/include/obd.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -88

[PATCH] staging: lustre: Fix variable type declaration after refactoring

2016-12-08 Thread Quentin Lambert
eanup lustre_lib.h") Signed-off-by: Quentin Lambert --- drivers/staging/lustre/lustre/include/obd.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -889,7 +889,7 @@ struct obd_cli

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Quentin Lambert
On 12/07/2016 04:33 PM, Dan Carpenter wrote: Lustre is kind of a mess with regards to keeping user and kernel pointers separate. It's not going to be easy to fix. Fair enough. I am trying to make a contribution to drivers/staging using sparse. With that in mind, do you still fill I should kee

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-07 Thread Quentin Lambert
Hi all, I am looking at the drivers/staging/lustre/lustre/llite/dir.c: 1469 /* Call mdc_iocontrol */ 1470 rc = obd_iocontrol(LL_IOC_FID2MDTIDX, exp, sizeof(fid), &fid, 1471&index); 1472 if (rc) and sparse says

Re: [lustre-devel] [PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-06 Thread Quentin Lambert
On 12/05/2016 11:58 PM, Oleg Drokin wrote: I guess it's a false positive? Yes, probably. Thank you for the explanation though, I don't fully understand all this yet, I am still learning. Sorry for the noise. Quentin ___ devel mailing list de...@li

[PATCH] staging: lustre: Fix a spatch warning due to an assignment from kernel to user space

2016-12-02 Thread Quentin Lambert
lnet_ipif_enumerate was assigning a pointer from kernel space to user space. This patch uses copy_to_user to properly do that assignment. Signed-off-by: Quentin Lambert --- shouldn't we be using ifc_req instead of ifc_buf? drivers/staging/lustre/lnet/lnet/lib-socket.c |8 +++- 1

[PATCH v2] greybus: manifest: style fix missing space before '('

2016-09-27 Thread Quentin Lambert
Checkpatch printed a style ERROR concerning a missing space before '('. This patch fixes this issue. Signed-off-by: Quentin Lambert Acked-by: Viresh Kumar --- v2: fixes typos in commit message drivers/staging/greybus/manifest.c |2 +- 1 file changed, 1 insertion(+), 1 deletion

Re: [PATCH] greybus: manifest: style fix missing space before '('

2016-09-27 Thread Quentin Lambert
On 27/09/2016 11:31, Viresh Kumar wrote: On Tue, Sep 27, 2016 at 2:50 PM, Quentin Lambert wrote: Checkpatch printed a style ERROR concerning a missing space befire '('. This patch fix this issue. Signed-off-by: Quentin Lambert --- drivers/staging/greybus/manifest.c |2 +

[PATCH] greybus: manifest: style fix missing space before '('

2016-09-27 Thread Quentin Lambert
Checkpatch printed a style ERROR concerning a missing space befire '('. This patch fix this issue. Signed-off-by: Quentin Lambert --- drivers/staging/greybus/manifest.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/staging/greybus/manifest.c +++ b/drive

[PATCH v2 1/2] staging: rts5208/ms.c: change the label name to respect the coding style

2016-08-12 Thread Quentin Lambert
This patch changes label names using camel case to snake case as well as giving a new name representing what will be done after the label. Signed-off-by: Quentin Lambert --- v2: add a commit message drivers/staging/rts5208/ms.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions

[PATCH v2 2/2] staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV

2016-08-12 Thread Quentin Lambert
mg_get_local_EKB and mg_get_ICV used to return with an error code before releasing all resources. This patch add a jump to the appropriate label ensuring that the resources are properly released before returning. This issue was found with Hector. Signed-off-by: Quentin Lambert --- drivers

[PATCH v2 0/2] add missing calls to kfree

2016-08-12 Thread Quentin Lambert
The first patch is a style fix, the second add calls to kfree. The reason for me thinking that they are necessary is that every other branches leading to an error return are jumping to the same destination. v2: add a commit message to the first patch --- drivers/staging/rts5208/ms.c | 18 +

[PATCH 1/2] staging: rts5208/ms.c: change the label name to respect the coding style

2016-08-12 Thread Quentin Lambert
Signed-off-by: Quentin Lambert --- drivers/staging/rts5208/ms.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) --- a/drivers/staging/rts5208/ms.c +++ b/drivers/staging/rts5208/ms.c @@ -4313,7 +4313,7 @@ int mg_get_local_EKB(struct scsi_cmnd *s if (retval

[PATCH 2/2] staging: rts5208/ms.c: add missing releases in mg_get_local_EKB and mg_get_ICV

2016-08-12 Thread Quentin Lambert
mg_get_local_EKB and mg_get_ICV used to return with an error code before releasing all resources. This patch add a jump to the appropriate label ensuring that the resources are properly released before returning. This issue was found with Hector. Signed-off-by: Quentin Lambert --- drivers

[PATCH 0/2] add missing calls to kfree

2016-08-12 Thread Quentin Lambert
The first patch is a style fix, the second add calls to kfree. The reason for me thinking that they are necessary is that every other branches leading to an error return are jumping to the same destination. --- drivers/staging/rts5208/ms.c | 18 ++ 1 file changed, 10 insertions(

[PATCH v2] staging: vt6655: remove deprecated use of pci api

2015-03-20 Thread Quentin Lambert
osition deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert --- Changes since v1: - Replaces GFP_ATOMIC by GFP_KERNEL s

[PATCH] staging: vt6655: remove deprecated use of pci api

2015-03-19 Thread Quentin Lambert
osition deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert --- drivers/staging/vt66

Re: [PATCH v2] Staging: dgnc: release the lock before testing for nullity

2015-03-18 Thread Quentin Lambert
On 18/03/2015 14:54, Dan Carpenter wrote: On Wed, Mar 18, 2015 at 02:43:01PM +0100, Quentin Lambert wrote: On 18/03/2015 14:36, Dan Carpenter wrote: This changelog still doesn't make sense so I took a look at the code. tty_ldisc_deref() is an unlock function. So this is a lock ord

Re: [PATCH v2] Staging: dgnc: release the lock before testing for nullity

2015-03-18 Thread Quentin Lambert
On 18/03/2015 14:36, Dan Carpenter wrote: This changelog still doesn't make sense so I took a look at the code. tty_ldisc_deref() is an unlock function. So this is a lock ordering bug. What makes you think the original ordering was correct? Who reported this bug? What are the effects of th

[PATCH v2] Staging: dgnc: release the lock before testing for nullity

2015-03-18 Thread Quentin Lambert
release before return") Signed-off-by: Quentin Lambert --- Changes since v1: - the commit message details the point of the patch - remove a blank line between the Fixes line and the signed-off line. drivers/staging/dgnc/dgnc_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] Staging: dgnc: release the lock before testing for nullity

2015-03-18 Thread Quentin Lambert
Fixes: c84a083b995b ("Staging: dgnc: Use goto for spinlock release before return") Signed-off-by: Quentin Lambert --- drivers/staging/dgnc/dgnc_tty.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/dgnc/dgnc_tty.c b/drivers/staging/dgnc/dgnc_t

Re: [PATCH 2/3] Staging: dgnc: Use goto for error handling

2015-03-12 Thread Quentin Lambert
On 12/03/2015 10:27, Dan Carpenter wrote: On Wed, Mar 11, 2015 at 06:37:30PM +0200, Giedrius Statkevičius wrote: It's still not in staging-testing for some reason :( It can take several weeks to get merged. Relax. regards, dan carpenter What should i do concerning that ? I need to send a

[PATCH 1/3] Staging: dgnc: dgnc_driver: Add a missing call to dgnc_tty_uninit

2015-03-12 Thread Quentin Lambert
This function is called on the previous and the next failure branches. This patch adds the call on the branch where it seems to be missing. Signed-off-by: Quentin Lambert --- drivers/staging/dgnc/dgnc_driver.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/dgnc

[PATCH 3/3] Staging: dgnc: Use goto for spinlock release before return

2015-03-11 Thread Quentin Lambert
spin_unlock_irqrestore() is called at several different places before exiting. This patch uses a goto statement to factorize these calls. Coccinelle was used to generate this patch. Signed-off-by: Quentin Lambert --- drivers/staging/dgnc/dgnc_tty.c | 48

[PATCH 2/3] Staging: dgnc: Use goto for error handling

2015-03-11 Thread Quentin Lambert
s return ...; } ...when any if@p2(...) {...} ...when any } @depends on good1@ identifier candidates.f, candidates.label; position candidates.p1, candidates.p3; @@ f@p1(...) { ...when any * return@p3 ...; } Signed-off-by: Quentin Lambert --- drivers/staging

[PATCH 0/3] Introducing goto for error and lock handling

2015-03-11 Thread Quentin Lambert
important or the changes felt more complex. Quentin Lambert (3): Staging: dgnc: dgnc_driver: Add a missing call to dgnc_tty_uninit Staging: dgnc: Use goto for error handling Staging: dgnc: Use goto for spinlock release before return drivers/staging/dgnc/dgnc_cls.c| 19

[PATCH 1/1] staging: rtl8723au: Remove unnecessary OOM message

2015-03-06 Thread Quentin Lambert
\|devm_kzalloc\|devm_kmalloc\)(...); if (e == NULL) { <+... - print(...,c,...); ... when any ( goto l; | return ...; ) ...+> } Signed-off-by: Quentin Lambert --- drivers/staging/rtl8723au/hal/rtl8723a_cmd.c | 8 ++-- drivers/staging/rtl8723au/hal/rtl8723a_hal_init

[PATCH 1/1] staging: rtl8192e: Remove unnecessary OOM message

2015-03-05 Thread Quentin Lambert
\|devm_kzalloc\|devm_kmalloc\)(...); if (e == NULL) { <+... - print(...,c,...); ... when any ( goto l; | return ...; ) ...+> } Signed-off-by: Quentin Lambert --- drivers/staging/rtl8192e/rtllib_module.c | 10 +++--- drivers/staging/rtl8192e/rtllib_rx.c | 11 --- 2

Re: [PATCH 1/1] staging: io: Remove unnecessary OOM message

2015-03-05 Thread Quentin Lambert
On 05/03/2015 11:28, Julia Lawall wrote: It's i2o, not io, and it is on the way out of the kernel. sorry about that, since it is on its way out I guess there is no need for me to submit a correct version of this patch? Are there resources to know whether or not a driver will be dropped or

[PATCH 1/1] staging: io: Remove unnecessary OOM message

2015-03-05 Thread Quentin Lambert
This patch reduces the kernel size by removing error messages that duplicate the normal OOM message. Signed-off-by: Quentin Lambert --- drivers/staging/i2o/i2o_block.c | 1 - drivers/staging/i2o/i2o_config.c | 7 +-- drivers/staging/i2o/iop.c| 10 ++ 3 files changed, 3

Re:

2015-03-04 Thread Quentin Lambert
Ignore this I made a mistake. My apologies, Quentin On 04/03/2015 11:29, Quentin Lambert wrote: Bcc: Subject: [PATCH 1/2] staging: rts5208: Convert non-returned local variable to boolean when relevant Reply-To: This patch was produced using Coccinelle. A simplified version of the semantic

[PATCH 2/2] staging: rts5208: Convert variable from int to bool and propagate the change to function parameters

2015-03-04 Thread Quentin Lambert
This patch convert local variables declared as int into booleans. It also propagates the conversion when these variables were used as function parameters. Coccinelle was used to generate this patch. Signed-off-by: Quentin Lambert --- drivers/staging/rts5208/ms.c| 9 drivers

[PATCH 1/2] staging: rts5208: Convert non-returned local variable to boolean when relevant

2015-03-04 Thread Quentin Lambert
expression e1 != {0, 1}, e2; @@ f(...) { ...when any ( x = e1; | x + e2 ) ...when any } @depends on !bad@ identifier r.f; local idexpression u8 r.x; identifier r.xname; @@ f(...) { ... ++ bool xname; - int xname; <... ( x = - 1 + true | x = - -1 + false ) ...> } Signed-off-by: Quentin L

[no subject]

2015-03-04 Thread Quentin Lambert
(...) { ... ++ bool xname; - int xname; <... ( x = - 1 + true | x = - -1 + false ) ...> } Signed-off-by: Quentin Lambert --- drivers/staging/rts5208/ms.c| 14 +++--- drivers/staging/rts5208/rtsx_chip.c | 56 --- drivers/staging/rts5208/rtsx_scsi.

[PATCH 0/2] int to bool conversion

2015-03-04 Thread Quentin Lambert
. It therefore propagates the conversion to the concerned parameters. Quentin Lambert (2): staging: rts5208: Convert non-returned local variable to boolean when relevant staging: rts5208: Convert variable from int to bool and propagate the change to function parameters drivers/staging

[PATCH 1/1] staging: unisys: Remove unnecessary OOM message

2015-02-19 Thread Quentin Lambert
\|devm_kzalloc\|devm_kmalloc\)(...); if (e == NULL) { <+... - print(...,c,...); ... when any ( goto l; | return ...; ) ...+> } Signed-off-by: Quentin Lambert --- drivers/staging/unisys/uislib/uislib.c | 2 -- drivers/staging/unisys/virthba/virthba.c

[PATCH 1/1] staging: lustre: llite: Remove unnecessary OOM message

2015-02-12 Thread Quentin Lambert
This patch reduces the kernel size by removing error messages that duplicate the normal OOM message. Signed-off-by: Quentin Lambert --- drivers/staging/lustre/lustre/llite/llite_close.c | 4 +--- drivers/staging/lustre/lustre/llite/xattr_cache.c | 5 + 2 files changed, 2 insertions(+), 7

Re: [PATCH 1/1] staging: unisys: Remove allocation from declaration line

2015-02-12 Thread Quentin Lambert
On 11/02/2015 11:23, Dan Carpenter wrote: On Wed, Feb 11, 2015 at 06:26:27AM +0800, Greg Kroah-Hartman wrote: On Tue, Feb 10, 2015 at 02:02:14PM +0100, Quentin Lambert wrote: This patch removes allocation from declaration line because people are known to gloss over declarations. Again, who

[PATCH v2 1/1] staging: unisys: Remove allocation from declaration line

2015-02-10 Thread Quentin Lambert
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- The second of version of this patch fix the checkpatch warning of line over 80 char by rewriting the size argument of kmalloc as suggested by Sudip

[PATCH 1/1] staging: unisys: Remove allocation from declaration line

2015-02-10 Thread Quentin Lambert
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- drivers/staging/unisys/visorchipset/visorchipset_main.c | 6 +++--- drivers/staging/unisys/visorutil/charqueue.c| 3 ++- drivers/staging/unisys

[PATCH 1/1] staging: android: Remove allocation from declaration line

2015-02-10 Thread Quentin Lambert
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- drivers/staging/android/ion/ion_page_pool.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/android/ion

Re: [PATCH 1/1] staging: ozwpan: Move code from success handling to error handling

2015-02-10 Thread Quentin Lambert
On 10/02/2015 12:04, Dan Carpenter wrote: On Tue, Feb 10, 2015 at 11:42:08AM +0100, Quentin Lambert wrote: The original version was success handling rather than error handling, therefore this patch reduces nesting. Signed-off-by: Quentin Lambert Fantastic. :) Thanks! regards, dan

[PATCH 1/1] staging: ozwpan: Move code from success handling to error handling

2015-02-10 Thread Quentin Lambert
The original version was success handling rather than error handling, therefore this patch reduces nesting. Signed-off-by: Quentin Lambert --- drivers/staging/ozwpan/ozhcd.c | 18 +++--- drivers/staging/ozwpan/ozpd.c | 53 +- 2 files changed, 37

[PATCH v2 1/1] staging: ozwpan: Remove allocation from delaration line

2015-02-10 Thread Quentin Lambert
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- Changes since v1: - Remove the blank line between allocation and NULL check drivers/staging/ozwpan/ozhcd.c | 5 +++-- drivers/staging/ozwpan/ozpd.c | 8

[PATCH 1/1] staging: ozwpan: Remove allocation from delaration line

2015-02-10 Thread Quentin Lambert
This patch removes allocation from declaration line because people are known to gloss over declarations. Signed-off-by: Quentin Lambert --- This patch was inspired by http://www.spinics.net/lists/linux-usb/msg44389.html and https://lkml.org/lkml/2015/2/7/47 but I am not sure the argument is

[PATCH] staging: slicoss: fix a blank line coding style issue

2014-08-04 Thread Quentin Lambert
Add 2 missing blank lines after declaration. Signed-off-by: Quentin Lambert --- drivers/staging/slicoss/slicoss.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/slicoss/slicoss.c b/drivers/staging/slicoss/slicoss.c index b6227fb..cbeac3e 100644 --- a/drivers/staging

[PATCH] staging: imx-drm: fix a blank line coding style issue

2014-08-04 Thread Quentin Lambert
Add missing blank lines after declaration. Signed-off-by: Quentin Lambert --- drivers/staging/imx-drm/imx-drm-core.c | 2 ++ drivers/staging/imx-drm/imx-tve.c | 2 ++ drivers/staging/imx-drm/parallel-display.c | 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/staging