[PATCH 2/2] crypto: ixp4xx - Add missing npe_c release in error branches

2016-07-22 Thread Quentin Lambert
Most error branches following the call to npe_request contain a call to npe_request. This patch add a call to npe_release to error branches following the call to npe_request that do not have it. This issue was found with Hector. Signed-off-by: Quentin Lambert --- If I am right in thinking that

[PATCH 1/2] crypto: ixp4xx - Fix a "simple if" coding style warning

2016-07-22 Thread Quentin Lambert
Signed-off-by: Quentin Lambert --- drivers/crypto/ixp4xx_crypto.c |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) --- a/drivers/crypto/ixp4xx_crypto.c +++ b/drivers/crypto/ixp4xx_crypto.c @@ -447,9 +447,8 @@ static int init_ixp_crypto(struct device if (!npe_running(npe_c

[PATCH 0/2] Fix a resource release omission in error handling code

2016-07-22 Thread Quentin Lambert
The first patch is a style fix, the second add calls to npe_release. The reason for me thinking that they are necessary is that every other branches leading to an error return are calling this function. --- drivers/crypto/ixp4xx_crypto.c |9 + 1 file changed, 5 insertions(+), 4 deleti

[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

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

Unable to boot linux-next build

2016-09-09 Thread Quentin Lambert
I have been trying to build and boot the last version available on linux-next. During the build I am being prompted with "has no CRC!" warnings for a bunch of modules. Has a result I get the following lines in the Module.symvers: [qlambert@sloth linux-next]$ grep 0x0 Module.symvers 0x00

Re: [PATCH v2 2/2] crypto: qat - fix resource release omissions

2016-09-13 Thread Quentin Lambert
On 13/09/2016 14:40, Herbert Xu wrote: On Tue, Sep 06, 2016 at 11:18:51AM +0100, Giovanni Cabiddu wrote: ---8<--- Subject: [PATCH] crypto: qat - fix leak on error path Fix a memory leak in an error path in uc loader. Signed-off-by: Giovanni Cabiddu Patch applied. Thanks. Sorry, I complet

[PATCH] crypto: ccp - add missing release in ccp_dmaengine_register

2016-09-02 Thread Quentin Lambert
ccp_dmaengine_register used to return with an error code before releasing all resource. This patch adds 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/crypto/ccp

[PATCH 0/2] add omitted release in qat_common

2016-09-02 Thread Quentin Lambert
The first patch introduces a variable to handle different error codes and be able to reuse the same clean up code. The second add an omitted release by jumping to the clean code having set the returned value to the proper error code. --- drivers/crypto/qat/qat_common/qat_uclo.c | 16 +++

[PATCH 1/2][RESEND] crypto: qat - introduces a variable to handle error codes

2016-09-02 Thread Quentin Lambert
Most error code used to jump to a label that lead to a "return -EFAULT" statement. This patch introduces a variable that stores the error code so that other error branches can use the same label to exit. Signed-off-by: Quentin Lambert --- drivers/crypto/qat/qat_common/qat_ucl

[PATCH 0/2][RESEND] add omitted release in qat_common

2016-09-02 Thread Quentin Lambert
The first patch introduces a variable to handle different error codes and be able to reuse the same clean up code. The second add an omitted release by jumping to the clean code having set the returned value to the proper error code. --- drivers/crypto/qat/qat_common/qat_uclo.c | 16 +++

[PATCH 2/2] crypto: qat - fix resource release omissions

2016-09-02 Thread Quentin Lambert
In certain cases qat_uclo_parse_uof_obj 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

[PATCH 2/2] crypto: qat - fix resource release omissions

2016-09-02 Thread Quentin Lambert
This issue was found with Hector. Signed-off-by: Quentin Lambert --- drivers/crypto/qat/qat_common/qat_uclo.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/crypto/qat/qat_common/qat_uclo.c +++ b/drivers/crypto/qat/qat_common/qat_uclo.c @@ -981,7 +981,8 @@ static int

[PATCH 1/2] crypto: qat - introduces a variable to handle error codes

2016-09-02 Thread Quentin Lambert
Most error code used to jump to a label that lead to a "return -EFAULT" statement. This patch introduces a variable that stores the error code so that other error branches can use the same label to exit. Signed-off-by: Quentin Lambert --- drivers/crypto/qat/qat_common/qat_ucl

[PATCH v2 0/2] add omitted release in qat_common

2016-09-02 Thread Quentin Lambert
The first patch introduces a variable to handle different error codes and be able to reuse the same clean up code. The second add an omitted release by jumping to the clean code having set the returned value to the proper error code. -changes since v1 I failed to send the first version properly an

[PATCH v2 1/2] crypto: qat - introduces a variable to handle error codes

2016-09-02 Thread Quentin Lambert
Most error code used to jump to a label that lead to a "return -EFAULT" statement. This patch introduces a variable that stores the error code so that other error branches can use the same label to exit. Signed-off-by: Quentin Lambert --- drivers/crypto/qat/qat_common/qat_ucl

[PATCH v2 2/2] crypto: qat - fix resource release omissions

2016-09-02 Thread Quentin Lambert
In certain cases qat_uclo_parse_uof_obj 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

Re: [PATCH 0/4] int to bool conversion

2015-01-26 Thread Quentin Lambert
Sorry for the delay in answering On 22/01/2015 17:18, Rafael J. Wysocki wrote: On Thursday, January 22, 2015 09:49:41 AM Quentin Lambert wrote: These patches convert local variables from int to bool when relevant. And what exactly is the need for that? Does that fix any functional

Re: [PATCH v2 1/1] atm: remove deprecated use of pci api

2015-01-14 Thread Quentin Lambert
On 14/01/2015 14:58, chas williams - CONTRACTOR wrote: I think I would like to go through and just fix all the usages of the older pci interface. This patch isn't very complete due to its automated nature. I will make some time this weekend. It was my original intent to produce a complete pat

[PATCH] moving from pci to dma

2015-01-12 Thread Quentin Lambert
>dev" and "pci_get_drvdata(id)" where id is the variable whose type is pci_dev. We also found "pci_enable_device(id)" to be satisfying since the call accesses other field without checking for nullity. Quentin Lambert (1): atm: remove deprecated use of pci api drivers/atm/eni.c

[PATCH] atm: remove deprecated use of pci api

2015-01-12 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/atm/eni.c | 8 +--- drivers/atm/he.c

Re: [PATCH] moving from pci to dma

2015-01-12 Thread Quentin Lambert
On 12/01/2015 16:27, chas williams - CONTRACTOR wrote: There doesn't seem to be a patch for review? I made a mistake and forgot to number the mails. I did send them though. Would you like me to send them again, with the proper subject format? Quentin Lambert -- To unsubscribe from this

[PATCH v2 1/1] atm: remove deprecated use of pci api

2015-01-12 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/atm/eni.c | 8 +--- drivers/atm/he.c

[PATCH v2 0/1] moving from pci to dma

2015-01-12 Thread Quentin Lambert
g since the call accesses other field without checking for nullity. Quentin Lambert (1): atm: remove deprecated use of pci api drivers/atm/eni.c | 8 +--- drivers/atm/he.c| 2 +- drivers/atm/lanai.c | 9 + drivers/atm/nicstar.c | 4 ++-- drivers/atm/solos-pci.

Re: [net-next PATCH v3 1/1] atm: remove deprecated use of pci api

2015-01-16 Thread Quentin Lambert
On 16/01/2015 14:57, chas williams - CONTRACTOR wrote: Signed-off-by: Chas Williams - CONTRACTOR --- drivers/atm/eni.c | 33 +++-- drivers/atm/fore200e.c | 22 + drivers/atm/he.c| 125 +--- drivers/atm/he.h

Re: [net-next PATCH v3 1/1] atm: remove deprecated use of pci api

2015-01-16 Thread Quentin Lambert
On 16/01/2015 15:52, chas williams - CONTRACTOR wrote: On Fri, 16 Jan 2015 15:10:25 +0100 Quentin Lambert wrote: -u32 dma_addr = pci_map_single((struct pci_dev*)fore200e->bus_dev, virt_addr, size, direction); +u32 dma_addr = dma_map_single(&((struct pci_dev *) fore200e-&

[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

[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] memstick: remove deprecated use of pci api

2015-04-14 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/memstick/host/jmb38x_ms.c | 12 ++-- drivers

[PATCH] ALSA: remove deprecated use of pci api

2015-04-15 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 --- sound/pci/ad1889.c |4 ++-- sound/

[PATCH] ata: remove deprecated use of pci api

2015-04-08 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/ata/acard-ahci.c| 10 +- drivers/ata/a

Re: [PATCH 2/2] ide: replace GFP_ATOMIC by GFP_KERNEL

2015-04-09 Thread Quentin Lambert
On 09/04/2015 16:50, Dan Carpenter wrote: Sorry, my last email was bad. Splitting patches into logical parts is a bit tricky. Let me try explain better. Every patch should sort of make sense on its own. In the original code it's using GFP_ATOMIC but that's because the original API was bad a

Re: [PATCH 2/2] ide: replace GFP_ATOMIC by GFP_KERNEL

2015-04-09 Thread Quentin Lambert
On 09/04/2015 14:36, Dan Carpenter wrote: Oh. They're not GFP_ATOMIC. Fold these two patches together into one patch and resend. The reason I did it that way is because I feel that the two patches really are different. The first one do not change the execution of the code but the second one

[PATCH 1/2] ide: remove deprecated use of pci api

2015-04-09 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/ide/cs5520.c|2 +- drivers/ide/pmac.c

[PATCH 0/2] pci to dma

2015-04-09 Thread Quentin Lambert
The first patch removes deprecated use of the pci api. The second patch depends on the first, it replaces uses of GFP_ATOMIC with GFP_KERNEL. I could not find evidence that the concerned functions were called from a context were sleep is not allowed. --- cs5520.c|2 +- pmac.c |

[PATCH 2/2] ide: replace GFP_ATOMIC by GFP_KERNEL

2015-04-09 Thread Quentin Lambert
Both pmac_ide_init_dma and ide_dma_sgiioc4 are stored in the init_dma field of an ide_port_info structure. This field seems to only be called from contexts where sleep is allowed. Therefore, this patch replaces uses of GFP_ATOMIC by GFP_KERNEL. Signed-off-by: Quentin Lambert --- drivers/ide

[PATCH v2] ide: remove deprecated use of pci api

2015-04-13 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: - fold the two patches into one, GFP_ATOM

[PATCH] ALSA: aoa: convert bus code to use dev_groups

2015-05-28 Thread Quentin Lambert
You should use dev_groups instead of the dev_attrs field of struct bus_type. This converts the MDIO bus code to use the correct field. These modifications were made using Coccinelle. Signed-off-by: Quentin Lambert --- sound/aoa/soundbus/core.c |3 ++- sound/aoa/soundbus/soundbus.h

Re: [PATCH] ALSA: aoa: convert bus code to use dev_groups

2015-05-28 Thread Quentin Lambert
On 28/05/2015 15:52, Takashi Iwai wrote: At Thu, 28 May 2015 14:48:27 +0200, Quentin Lambert wrote: You should use dev_groups instead of the dev_attrs field of struct bus_type. This converts the MDIO bus code to use the correct field. These modifications were made using Coccinelle. Signed

Re: [PATCH] ALSA: aoa: convert bus code to use dev_groups

2015-05-28 Thread Quentin Lambert
On 28/05/2015 15:52, Takashi Iwai wrote: At Thu, 28 May 2015 14:48:27 +0200, Quentin Lambert wrote: You should use dev_groups instead of the dev_attrs field of struct bus_type. This converts the MDIO bus code to use the correct field. These modifications were made using Coccinelle. Signed

Re: [PATCH] ALSA: aoa: convert bus code to use dev_groups

2015-05-28 Thread Quentin Lambert
On 28/05/2015 16:09, Takashi Iwai wrote: At Thu, 28 May 2015 15:59:50 +0200, Quentin Lambert wrote: On 28/05/2015 15:52, Takashi Iwai wrote: At Thu, 28 May 2015 14:48:27 +0200, Quentin Lambert wrote: You should use dev_groups instead of the dev_attrs field of struct bus_type. This converts

Re: [alsa-devel] [PATCH v2] ALSA: aoa: convert bus code to use dev_groups

2015-06-11 Thread Quentin Lambert
On 11/06/2015 12:02, Takashi Iwai wrote: At Thu, 11 Jun 2015 10:03:38 +0200, Quentin Lambert wrote: The dev_attrs field of struct bus_type is going away, use dev_groups instead. This converts the soundbus code to use the correct field. Given that all other usages of the macro define the

Re: [PATCH v2] ALSA: aoa: convert bus code to use dev_groups

2015-06-11 Thread Quentin Lambert
On 11/06/2015 13:55, walter harms wrote: Am 11.06.2015 10:03, schrieb Quentin Lambert: The dev_attrs field of struct bus_type is going away, use dev_groups instead. This converts the soundbus code to use the correct field. Given that all other usages of the macro define the struct attribute

Re: [alsa-devel] [PATCH v2] ALSA: aoa: convert bus code to use dev_groups

2015-06-12 Thread Quentin Lambert
On 11/06/2015 14:25, Takashi Iwai wrote: At Thu, 11 Jun 2015 14:04:45 +0200, Quentin Lambert wrote: On 11/06/2015 12:02, Takashi Iwai wrote: At Thu, 11 Jun 2015 10:03:38 +0200, Quentin Lambert wrote: The dev_attrs field of struct bus_type is going away, use dev_groups instead. This

[PATCH v3] ALSA: aoa: convert bus code to use dev_groups

2015-06-12 Thread Quentin Lambert
The dev_attrs field of struct bus_type is going away, sue dev_groups instead. This converts the soundbus code to use the correct field. These modifications were made using Coccinelle. Signed-off-by: Quentin Lambert --- Changes since v2: - Revert to the version of the patch where the files

[PATCH] superhyway: convert code to use dev_groups

2015-06-12 Thread Quentin Lambert
The dev_attrs field of struct bus_type is going away, use dev_groups instead. This converts the soundbus code to use the correct field. These modifications were made using Coccinelle. Signed-off-by: Quentin Lambert --- drivers/sh/superhyway/superhyway-sysfs.c | 26

Re: [PATCH v3] ALSA: aoa: convert bus code to use dev_groups

2015-06-12 Thread Quentin Lambert
On 12/06/2015 11:59, Andreas Schwab wrote: Quentin Lambert writes: The dev_attrs field of struct bus_type is going away, sue dev_groups instead. s/sue/use/ I meant use do you need to fix something else or should I resend with the typo correction ? Quentin -- To unsubscribe from this

Re: [PATCH] ALSA: aoa: convert bus code to use dev_groups

2015-05-29 Thread Quentin Lambert
On 28/05/2015 17:01, Takashi Iwai wrote: Also, it'd be better to move ATTRIBUTE_GROUPS(soundbus_dev) into soundbus/sysfs.c, and make it this global instead of soundbus_dev_attrs[]. Ok, I need to find a nice way to do that because ATTRIBUTE_GROUPS declares the structure as static. If it resul

[PATCH v2] ALSA: aoa: convert bus code to use dev_groups

2015-06-11 Thread Quentin Lambert
into core.c. These modifications were made using Coccinelle. Signed-off-by: Quentin Lambert --- Changes since v1: - Fix the commit message to actually talk about soundbus rather than MDIO - This version attempt to fix a problem resulting from the macro ATTRIBUTE_GROUPS declaring the

[PATCH v2 0/4] Extending the first version of the patch to the entire directory

2014-09-07 Thread Quentin Lambert
This being my first patch I understand that this may not be the best solution. Quentin Lambert (4): PCI: fix a missing space coding style issue PCI: fix a simple if coding style issue PCI: remove assignement from if conditions PCI: remove assignement in non straight forward if cond

[PATCH v2 1/4] PCI: fix a missing space coding style issue

2014-09-07 Thread Quentin Lambert
Modified the files in the directory so that they respect the coding style with regards to parenthesis being preceded by a space. Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/acpiphp_ibm.c| 2 +- drivers/pci/hotplug/cpcihp_generic.c | 28 ++-- drivers/pci

[PATCH v2 2/4] PCI: fix a simple if coding style issue

2014-09-07 Thread Quentin Lambert
Removing curly braces in simple if cases. Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/cpci_hotplug_core.c | 4 ++-- drivers/pci/hotplug/cpcihp_zt5550.c | 11 +-- drivers/pci/hotplug/cpqphp_core.c | 3 +-- drivers/pci/hotplug/cpqphp_ctrl.c | 15

[PATCH v2 3/4] PCI: remove assignement from if conditions

2014-09-07 Thread Quentin Lambert
The following Coccinelle semantic patch was used to find and correct cases of assignements in if conditions: @@ expression var, expr; statement S; @@ + var = expr; if( - (var = expr) + var ) S Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/acpi_pcihp.c| 3 ++- drivers/pci

[PATCH v2 4/4] PCI: remove assignement in non straight forward if condition

2014-09-07 Thread Quentin Lambert
The modifications effectively change the value of len_tmp in the case where the first condition is not met. Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/ibmphp_res.c | 13 + drivers/pci/pci.c| 6 +- drivers/pci/slot.c | 12 ++-- 3

[PATCH 0/3] Fixing checkpatch errors and warnings for PCI hotplug

2014-08-04 Thread Quentin Lambert
Patch 1 and 2 fix checkpatch coding style warnings. Patch 3 fixes chechpatch errors due to assignement in if conditions. Quentin Lambert (3): PCI hotplug: fix a missing space coding style issue PCI hotplug: fix a simple if coding style issue PCI hotplug: remove assignement from if

[PATCH 1/3] PCI hotplug: fix a missing space coding style issue

2014-08-04 Thread Quentin Lambert
Modified the file so that it respects the coding style with regards to "if"s being followed by a space. Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/cpcihp_zt5550.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/d

[PATCH 2/3] PCI hotplug: fix a simple if coding style issue

2014-08-04 Thread Quentin Lambert
Removing curly braces in simple if cases. Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/cpcihp_zt5550.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/pci/hotplug/cpcihp_zt5550.c b/drivers/pci/hotplug/cpcihp_zt5550.c index 42a61c2..2b222fc

[PATCH 3/3] PCI hotplug: remove assignement from if conditions

2014-08-04 Thread Quentin Lambert
The following Coccinelle semantic patch was used to find and correct cases of assignements in if conditions: @ifassign@ expression var, expr; statement S; @@ - if(!(var = expr)) S + var = expr; + if(!var) S Signed-off-by: Quentin Lambert --- drivers/pci/hotplug/acpi_pcihp.c| 3

[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

[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] PCI: remove an unnecessary if condition before a return statement

2014-11-06 Thread Quentin Lambert
Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Quentin Lambert --- I ran coccinelle on the whole directory and the only other match was drivers/pci/host/pci-imx6.c, but the

[PATCH v2] PCI: remove an unnecessary if condition before a return statement

2014-11-07 Thread Quentin Lambert
Simplify a trivial if-return sequence. Possibly combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci Signed-off-by: Quentin Lambert --- Changes in v2: - remove a checkpatch warning due to the a space between after the function name. drivers

[PATCH] x86: bpf_jit_comp: simplify trivial boolean return

2014-11-26 Thread Quentin Lambert
Remove if then else statements preceding boolean return. Occurences were found using Coccinelle. The semantic patch used was: @@ expression expr; @@ - if ( expr ) - return true; - else - return false; + return expr; Signed-off-by: Quentin Lambert --- arch/x86/net/bpf_jit_comp.c

[PATCH] Converting int usage to bool

2014-11-27 Thread Quentin Lambert
(...) { <... ( - return 1; + return true; | - return 0; + return false; ) ...> } Quentin Lambert (1): video: fbdev: sis: sis_main.c: converting relevant int to bool drivers/video/fbdev/sis/sis_main.c | 64 -- 1 file changed, 33 insertions(+), 31 de

[PATCH] video: fbdev: sis: sis_main.c: converting relevant int to bool

2014-11-27 Thread Quentin Lambert
(...) { ... ++ bool xname; - int xname; <... ( x = - 1; + true; | x = - -1; + false; ) ...> } Signed-off-by: Quentin Lambert --- drivers/video/fbdev/sis/sis_main.c | 64 -- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/drivers/video/fbdev/sis/sis_mai

Re: [PATCH] x86: bpf_jit_comp: simplify trivial boolean return

2014-11-27 Thread Quentin Lambert
On 27/11/2014 13:25, David Laight wrote: From: Joe Perches On Wed, 2014-11-26 at 10:34 -0800, Alexei Starovoitov wrote: On Wed, Nov 26, 2014 at 10:02 AM, Joe Perches wrote: On Wed, 2014-11-26 at 09:23 -0800, Alexei Starovoitov wrote: On Wed, Nov 26, 2014 at 8:58 AM, Joe Perches wrote: Is t

[PATCH 0/3] Minor clean up in mpt2sas

2014-12-19 Thread Quentin Lambert
of the loop. It now uses a break statement to exit it. The third patch simplifies an unnecesary complicated use of a boolean variable. Quentin Lambert (3): [SCSI] mpt2sas: Merge two similar functions [SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag [SCSI] mpt2sas: Remove

[PATCH 1/3] [SCSI] mpt2sas: Merge two similar functions

2014-12-19 Thread Quentin Lambert
mpt2sas_scsih_set_tm_flag and mpt2sas_scsih_clear_tm_flag shared a lot of code. Therefore, they are merged into one function whose behaviour is given by a new parameter named action. Signed-off-by: Quentin Lambert --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 43

[PATCH 2/3] [SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag

2014-12-19 Thread Quentin Lambert
Since skip was only used to pass through the rest of the loop, a break statment is called where skip was previously assigned 1. Signed-off-by: Quentin Lambert --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/mpt2sas

[PATCH 3/3] [SCSI] mpt2sas: Remove unnecessary use of a boolean variable

2014-12-19 Thread Quentin Lambert
Signed-off-by: Quentin Lambert --- drivers/scsi/mpt2sas/mpt2sas_base.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 58e4521..c31de9d 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b

[PATCH v2 0/3] Minor clean up in mpt2sas

2014-12-19 Thread Quentin Lambert
The version 2 of this patch fix the logic error pointed out by Joe Perches. Quentin Lambert (3): [SCSI] mpt2sas: Merge two similar functions [SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag [SCSI] mpt2sas: Remove unnecessary use of a boolean variable drivers/scsi/mpt2sas

[PATCH v2 1/3] [SCSI] mpt2sas: Merge two similar functions

2014-12-19 Thread Quentin Lambert
mpt2sas_scsih_set_tm_flag and mpt2sas_scsih_clear_tm_flag shared a lot of code. Therefore, they are merged into one function whose behaviour is given by a new parameter named action. Signed-off-by: Quentin Lambert --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 43

[PATCH v2 2/3] [SCSI] mpt2sas: Simplify the code of mpt2sas_scsih_tm_flag

2014-12-19 Thread Quentin Lambert
Since skip was only used to pass through the rest of the loop, a break statment is called where skip was previously assigned 1. Signed-off-by: Quentin Lambert --- drivers/scsi/mpt2sas/mpt2sas_scsih.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/scsi/mpt2sas

[PATCH v2 3/3] [SCSI] mpt2sas: Remove unnecessary use of a boolean variable

2014-12-19 Thread Quentin Lambert
Signed-off-by: Quentin Lambert --- drivers/scsi/mpt2sas/mpt2sas_base.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/scsi/mpt2sas/mpt2sas_base.c b/drivers/scsi/mpt2sas/mpt2sas_base.c index 58e4521..6cc0591 100644 --- a/drivers/scsi/mpt2sas/mpt2sas_base.c +++ b

[PATCH v2 0/1] int to bool conversion

2014-12-19 Thread Quentin Lambert
lists/linux-kernel-janitors/msg20627.html Quentin Lambert (1): [SCSI] mpt2sas: Convert non-returned local variable to boolean when relevant drivers/scsi/mpt2sas/mpt2sas_base.c | 12 ++-- drivers/scsi/mpt2sas/mpt2sas_config.c| 5 +++-- drivers/scsi/mpt2sas/mpt2sas_

[PATCH v2 1/1] [SCSI] mpt2sas: Convert non-returned local variable to boolean when relevant

2014-12-19 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

[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/3] Staging: dgnc: dgnc_driver: Add a missing call to dgnc_tty_uninit

2015-03-11 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

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/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: [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: 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

[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] 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

[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(-)

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

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

[PATCH v2 1/1] drivers/base: Remove unnecessary OOM message

2015-02-09 Thread Quentin Lambert
\|devm_kzalloc\|devm_kmalloc\)(...); if (e == NULL) { <+... - print(...,c,...); ... when any ( goto l; | return ...; ) ...+> } Signed-off-by: Quentin Lambert --- This post http://lwn.net/Articles/627419/ points out that the messages will not be printed anyway. That being said i

[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 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: 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

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

[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 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] IB/mthca: remove deprecated use of pci api

2015-02-04 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/infiniband/hw/mthca/mthca_eq.c | 20

Re: [Cocci] [PATCH v13 3/6] clk: Make clk API return per-user struct clk instances

2015-02-05 Thread Quentin Lambert
reference struct clk pointers. /// // Confidence: High // Copyright: (C) 2015 Quentin Lambert, INRIA/LiP6. GPLv2 // URL: http://coccinelle.lip6.fr/ // Options: --recursive-includes --relax-include-path // Opt

  1   2   >