[PATCH 4/6 v2] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res

Re: [PATCH 4/6] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
On Mon, 19 Aug 2013, Svenning Sørensen wrote: > > On 19-08-2013 13:35, Julia Lawall wrote: > > reg_base = devm_ioremap_resource(dev, r); > > if (!musb->ctrl_base) > > return -EINVAL; > > > Not really related to Julia's patch, apa

Re: [PATCH 1/7] PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource

2013-08-19 Thread Julia Lawall
On Mon, 19 Aug 2013, Thierry Reding wrote: > On Mon, Aug 19, 2013 at 01:20:35PM +0200, Julia Lawall wrote: > > From: Julia Lawall > > > > Use devm_ioremap_resource instead of devm_request_and_ioremap. > > > > This was done using the semantic

Re: [PATCH 1/7] PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource

2013-08-19 Thread Julia Lawall
On Mon, 19 Aug 2013, Thierry Reding wrote: > On Mon, Aug 19, 2013 at 02:07:54PM +0200, Julia Lawall wrote: > > > > > > On Mon, 19 Aug 2013, Thierry Reding wrote: > > > > > On Mon, Aug 19, 2013 at 01:20:35PM +0200, Julia Lawall wrote: > > &

Re: [PATCH 4/6 v2] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
On Mon, 19 Aug 2013, Sergei Shtylyov wrote: > Hello. > > On 08/19/2013 03:47 PM, Julia Lawall wrote: > > > From: Julia Lawall > > > Remove unneeded error handling on the result of a call to > > platform_get_resource_byname when the value is passed to &

[PATCH] usb: musb: dsps: fix devm_ioremap_resource error detection code

2013-08-19 Thread Julia Lawall
From: Julia Lawall devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure. Furthermore, the value returned by devm_ioremap_resource should be tested. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e

[PATCH] mmc: jz4740: fix devm_ioremap_resource error detection code

2013-08-19 Thread Julia Lawall
From: Julia Lawall devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,e1; statement S; @@ *e = devm_ioremap_resource(...); if (!e1) S

Re: [Ksummit-2013-discuss] [ARM ATTEND] catching up on exploit mitigations

2013-08-01 Thread Julia Lawall
On Thu, 1 Aug 2013, Dan Carpenter wrote: > On Thu, Aug 01, 2013 at 03:05:56PM -0400, Dave Jones wrote: > > On Thu, Aug 01, 2013 at 12:13:22PM +0300, Dan Carpenter wrote: > > > I was just reading http://faultlinux.lip6.fr/ which says that in > > > 2011 the static checker fault rate in arch/ and f

[PATCH] adjust code alignment

2013-08-05 Thread Julia Lawall
These patches result from the following semantic patch (http://coccinelle.lip6.fr/), which checks for successive statements that are not aligned. @bad@ statement S; expression e; position p1,p; @@ S@p1 e@p; @script:ocaml@ p1 << bad.p1; p << bad.p; @@ if not ((List.hd p1).line = (List.hd p).line

[PATCH] fs/nfs/inode.c: adjust code alignment

2013-08-05 Thread Julia Lawall
From: Julia Lawall Signed-off-by: Julia Lawall --- This patch adjusts the code so that the alignment matches the current semantics. I have no idea if it is the intended semantics, though. Should the call to nfs_setsecurity also be under the else? fs/nfs/inode.c |2 +- 1 file changed

[PATCH] net/vmw_vsock/af_vsock.c: drop unneeded semicolon

2013-08-05 Thread Julia Lawall
From: Julia Lawall Drop the semicolon at the end of the list_for_each_entry loop header. Signed-off-by: Julia Lawall --- Not tested, but I can't imagine how the current code could work, since vsk should end up pointing to a dummy value. net/vmw_vsock/af_vsock.c |2 +- 1 file chang

[PATCH] drivers/scsi/lpfc/lpfc_init.c: adjust code alignment

2013-08-05 Thread Julia Lawall
From: Julia Lawall Adjust code alignment so that each statement is lined up with its neighbor. In the second case, it could be desirable to put the call to lpfc_destroy_vport_work_array under the if. The call, is, however, safe in case vports is NULL, so the patch just adjusts the indentation

Re: [PATCH] trivial: adjust code alignment

2013-08-05 Thread Julia Lawall
On Mon, 5 Aug 2013, Dan Carpenter wrote: On Mon, Aug 05, 2013 at 04:47:39PM +0200, Julia Lawall wrote: diff --git a/drivers/media/i2c/ov7670.c b/drivers/media/i2c/ov7670.c index e8a1ce2..4a5a5dc 100644 --- a/drivers/media/i2c/ov7670.c +++ b/drivers/media/i2c/ov7670.c @@ -1369,8 +1369,8

Re: [PATCH] trivial: adjust code alignment

2013-08-05 Thread Julia Lawall
On Mon, 5 Aug 2013, walter harms wrote: Hello Julia, IMHO keep the patch as it is. It does not change any code that is good. Suspicious code that comes up here can be addressed in a separate patch. OK, thanks! julia -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" i

Re: [PATCH 1/7] PCI: tegra: replace devm_request_and_ioremap by devm_ioremap_resource

2013-08-20 Thread Julia Lawall
From: Julia Lawall Use devm_ioremap_resource instead of devm_request_and_ioremap. This was done using the semantic patch scripts/coccinelle/api/devm_ioremap_resource.cocci Error-handling code was manually removed from the associated calls to platform_get_resource. Adjust the comment at the

Re: [PATCH 3/7] iommu/arm: replace devm_request_and_ioremap by devm_ioremap_resource

2013-08-20 Thread Julia Lawall
On Tue, 20 Aug 2013, Will Deacon wrote: > Hi Julia, > > On Mon, Aug 19, 2013 at 12:20:37PM +0100, Julia Lawall wrote: > > From: Julia Lawall > > > > Use devm_ioremap_resource instead of devm_request_and_ioremap. > > > > This was partly done using the se

[PATCH 1/2] spi: simplify devm_request_mem_region/devm_ioremap

2013-08-24 Thread Julia Lawall
From: Julia Lawall Convert the composition of devm_request_mem_region and devm_ioremap to a single call to devm_ioremap_resource. The associated call to platform_get_resource is also simplified and moved next to the new call to devm_ioremap_resource. This was done using a combination of the

[PATCH 0/2] simplify devm_request_mem_region/devm_ioremap

2013-08-24 Thread Julia Lawall
Convert the composition of devm_request_mem_region and devm_ioremap to a single call to devm_ioremap_resource. The associated call to platform_get_resource is also simplified and moved next to the new call to devm_ioremap_resource. The semantic patch used to perform this transformation is as foll

[PATCH 2/2] rtc: simplify devm_request_mem_region/devm_ioremap

2013-08-24 Thread Julia Lawall
From: Julia Lawall Convert the composition of devm_request_mem_region and devm_ioremap to a single call to devm_ioremap_resource. The associated call to platform_get_resource is also simplified and moved next to the new call to devm_ioremap_resource. This was done using a combination of the

[PATCH] convert comma to semicolon

2013-08-08 Thread Julia Lawall
These patches result from the following semantic patch (http://coccinelle.lip6.fr/), which checks for expression statements separated by , rather than by ;. The rule is quite conservative in that it only finds cases where this pattern appears after a statement that ends with ;, to ensure that the

[PATCH] trivial: convert comma to semicolon

2013-08-08 Thread Julia Lawall
From: Julia Lawall Replace a comma between expression statements by a semicolon. The rule is quite conservative in that it only finds cases where this pattern appears after a statement that ends with a semicolon, to ensure that the expression statements do not form an if branch or loop body

Re: [PATCH] convert comma to semicolon

2013-08-08 Thread Julia Lawall
On Thu, 8 Aug 2013, Joe Perches wrote: > On Thu, 2013-08-08 at 21:32 +0200, Julia Lawall wrote: > > These patches result from the following semantic patch > > (http://coccinelle.lip6.fr/), which checks for expression statements > > separated by , rather than by ;. The rule

Re: [PATCH] backports: backport drvdata = NULL core driver fixes

2013-07-19 Thread Julia Lawall
On Fri, 19 Jul 2013, Luis R. Rodriguez wrote: > On Fri, Jul 19, 2013 at 2:07 PM, Luis R. Rodriguez > wrote: > >> This is not a very good idea. Although setting drvdata to NULL allowed > >> a lot of code to be removed, it also exposed a bunch of hidden bugs -- > >> drivers were using the drvdata

Re: [PATCH] trivial: convert comma to semicolon

2013-08-09 Thread Julia Lawall
On Fri, 9 Aug 2013, Richard Genoud wrote: > > diff --git a/drivers/clocksource/time-armada-370-xp.c > > b/drivers/clocksource/time-armada-370-xp.c > > index 847cab6..8149b7b 100644 > > --- a/drivers/clocksource/time-armada-370-xp.c > > +++ b/drivers/clocksource/time-armada-370-xp.c > > @@ -175,1

Re: [PATCH/RFC] coccinelle: replace 0/1 with false/true in functions returning bool

2013-08-09 Thread Julia Lawall
On Fri, 9 Aug 2013, Rasmus Villemoes wrote: > This semantic patch replaces "return {0,1};" with "return > {false,true};" in functions returning bool. There doesn't seem to be > any false positives, but some whitespace mangling is happening, for > example: When you change the argument to return,

[PATCH] arch/arm/mach-pxa/stargate2.c: use ARRAY_AND_SIZE consistently

2013-08-10 Thread Julia Lawall
From: Julia Lawall Because ARRAY_AND_SIZE changes the apparent arity of a function, if it is used for one call to a given function, it would be better, if possible, to use it for all of them. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @call

Re: [PATCH] arch/arm/mach-pxa/stargate2.c: use ARRAY_AND_SIZE consistently

2013-08-10 Thread Julia Lawall
On Sat, 10 Aug 2013, Joe Perches wrote: > On Sat, 2013-08-10 at 17:25 +0200, Julia Lawall wrote: > > From: Julia Lawall > > > > Because ARRAY_AND_SIZE changes the apparent arity of a function, if it is > > used for one call to a given function, it would be better,

[PATCH 2/5] crypto/camellia_generic.c: convert comma to semicolon

2013-08-10 Thread Julia Lawall
From: Julia Lawall Replace a comma between expression statements by a semicolon. A simplified version of the semantic patch that performs this transformation is as follows: (http://coccinelle.lip6.fr/) // @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // This patch is

[PATCH 0/5] convert comma to semicolon

2013-08-10 Thread Julia Lawall
These patches result from the following semantic patches (http://coccinelle.lip6.fr/), which check for expression statements separated by , rather than by ;. The first semantic patch is quite conservative in that it only finds cases where this pattern appears after another complete statement or at

[PATCH 3/5] arch/x86/crypto/camellia_glue.c: convert comma to semicolon

2013-08-10 Thread Julia Lawall
From: Julia Lawall Replace a comma between expression statements by a semicolon. A simplified version of the semantic patch that performs this transformation is as follows: (http://coccinelle.lip6.fr/) // @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // This patch is

[PATCH 5/5] trivial: convert comma to semicolon

2013-08-10 Thread Julia Lawall
From: Julia Lawall Replace a comma between expression statements by a semicolon. These cases have the comma in a single statement if branch, or following a preprocessor directive. They mostly needed some manual touching up of whitespace and newlines. A simplified version of the semantic patch

[PATCH 1/5] drivers/gpio/gpio-omap.c: convert comma to semicolon

2013-08-10 Thread Julia Lawall
From: Julia Lawall Replace a comma between expression statements by a semicolon. A simplified version of the semantic patch that performs this transformation is as follows: (http://coccinelle.lip6.fr/) // @r@ expression e1,e2,e; type T; identifier i; @@ e1 -, +; e2; // Signed-off-by

Re: [PATCH 2/5] crypto/camellia_generic.c: convert comma to semicolon

2013-08-10 Thread Julia Lawall
On Sat, 10 Aug 2013, Joe Perches wrote: > On Sat, 2013-08-10 at 17:40 +0200, Julia Lawall wrote: > > Replace a comma between expression statements by a semicolon. > [] > > This patch is separate from the others because the code appears to be > > machine-generated. &g

Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Julia Lawall
If it is in a | with something else, I think you can just remove it. julia On Sat, 10 Aug 2013, Kumar Gaurav wrote: > Removed IRQF_DISABLED as it's deprecated and should be removed > > Signed-off-by: Kumar Gaurav > --- > drivers/net/hamradio/baycom_ser_fdx.c |2 +- > drivers/net/hamradio/

Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Julia Lawall
On Sat, 10 Aug 2013, Kumar Gaurav wrote: > On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote: > > If it is in a | with something else, I think you can just remove it. > > > > julia > > > > On Sat, 10 Aug 2013, Kumar Gaurav wrote: > > > > &

[PATCH 0/2] adjust code alignment

2013-08-10 Thread Julia Lawall
These patches result from the following semantic patch (http://coccinelle.lip6.fr/), which checks for successive statements that are not aligned. @bad@ statement S; expression e; position p1,p; @@ S@p1 e@p; @script:ocaml@ p1 << bad.p1; p << bad.p; @@ if not ((List.hd p1).line = (List.hd p).line

[PATCH 2/2] crypto/camellia_generic.c: adjust code alignment

2013-08-10 Thread Julia Lawall
From: Julia Lawall Adjust alignment in automatically generated code. If this code will not be regenerated in the future, it may as well look nice. Signed-off-by: Julia Lawall --- This patch was generated from the result of the previous one, which replaced commas by semicolons. crypto

[PATCH 1/2] arch/x86/crypto/camellia_glue.c: adjust code alignment

2013-08-10 Thread Julia Lawall
From: Julia Lawall Adjust alignment in automatically generated code. If this code will not be regenerated in the future, it may as well look nice. Signed-off-by: Julia Lawall --- This patch was generated from the result of the previous one, which replaced commas by semicolons. arch/x86

Re: [PATCH] drivers:net:hamradio: Removing Depricated IRQF_DISABLED

2013-08-10 Thread Julia Lawall
On Sat, 10 Aug 2013, Kumar Gaurav wrote: > On Saturday 10 August 2013 10:54 PM, Julia Lawall wrote: > > On Sat, 10 Aug 2013, Kumar Gaurav wrote: > > > > > On Saturday 10 August 2013 10:17 PM, Julia Lawall wrote: > > > > If it is in a | with something

Re: [PATCH] arch/arm/mach-pxa/stargate2.c: use ARRAY_AND_SIZE consistently

2013-08-10 Thread Julia Lawall
On Sun, 11 Aug 2013, Dan Carpenter wrote: > ARRAY_AND_SIZE() macro is horrible, and I would like it if it were > removed. What I meant before was just that probably people will > probably complain if we try to remove it. Well, I could either wait for someone to defend it, or send a patch gettin

question about netif_rx

2013-08-11 Thread Julia Lawall
To my limited understanding, in a NAPI polling function, one should use netif_receive_skb, rather than netif_rx. However, the via-velocity driver defines the NAPI polling function velocity_poll, which is the only caller of velocity_rx_srv, which is the only caller of velocity_receive_frame, wh

Re: question about netif_rx

2013-08-11 Thread Julia Lawall
On Sun, 11 Aug 2013, Francois Romieu wrote: > Julia Lawall : > > To my limited understanding, in a NAPI polling function, one should use > > netif_receive_skb, rather than netif_rx. > > Nit: or napi_gro_receive (+ napi_gro_flush with __napi_complete) when the > dev

[PATCH 7/16] arch/arm/mach-pxa/colibri-pxa270-income.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 0/16] Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
These patches replace uses of ARRAY_AND_SIZE(e) in a function argument position by its expansion. ARRAY_AND_SIZE(e) expands to a pair of expressions separated by commas and thus hides the actual arity of the called function. I was not able to compile any of the modified code. -- To unsubscribe f

[PATCH 14/16] arch/arm/mach-pxa/ezx.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 5/16] arch/arm/mach-pxa/vpac270.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 15/16] arch/arm/mach-kirkwood: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 16/16] arch/arm/mach-pxa/stargate2.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 13/16] arch/arm/mach-pxa/hx4700.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 11/16] arch/arm/mach-pxa/palmtreo.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 10/16] arch/arm/mach-mmp: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 8/16] arch/arm/mach-pxa/palmz72.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 6/16] arch/arm/mach-pxa: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 2/16] arch/arm/mach-pxa: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 9/16] arch/arm/mach-pxa/mioa701.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 4/16] arch/arm/mach-pxa/z2.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 1/16] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

[PATCH 3/16] arch/arm/mach-ux500/cpu-db8500.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,f; @@ f(..., - ARRAY_AND_SIZE(e) + e,ARRAY_SIZE(e

Re: [PATCH v3] coccinelle: replace 0/1 with false/true in functions returning bool

2013-08-11 Thread Julia Lawall
Acked-by: Julia Lawall On Sun, 11 Aug 2013, Rasmus Villemoes wrote: > This semantic patch replaces "return {0,1};" with "return > {false,true};" in functions returning bool. > > Signed-off-by: Rasmus Villemoes > --- > v2: Simplified script, and eli

Re: [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
On Mon, 12 Aug 2013, Viresh Kumar wrote: > On 11 August 2013 22:21, Julia Lawall wrote: > > From: Julia Lawall > > > > Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the > > arity of the called function. > > Makes sense. > &g

Re: [PATCH 12/16] drivers/cpufreq/pxa3xx-cpufreq.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-11 Thread Julia Lawall
On Mon, 12 Aug 2013, Viresh Kumar wrote: > On 12 August 2013 11:15, Julia Lawall wrote: > > I'm not sure to understand the sense of the question. > > I was talking about this :) > > (http://coccinelle.lip6.fr/) The URL of the tool if you can't figure out all t

[PATCH] scripts/coccinelle/misc/warn.cocci: use WARN

2013-08-12 Thread Julia Lawall
From: Julia Lawall Use WARN(1,...) rather than printk followed by WARN(1). Signed-off-by: Julia Lawall --- scripts/coccinelle/misc/warn.cocci | 109 + 1 file changed, 109 insertions(+) diff --git a/scripts/coccinelle/misc/warn.cocci b/scripts/coccinelle

Re: [PATCH 9/16] arch/arm/mach-pxa/mioa701.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-12 Thread Julia Lawall
On Mon, 12 Aug 2013, Robert Jarzmik wrote: > Julia Lawall writes: > > > From: Julia Lawall > > > > Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the > > arity of the called function. > > Acked-by: Robert Jarzmik > > As

[PATCH 1/16 v2] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-12 Thread Julia Lawall
From: Julia Lawall Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the arity of the called function. At the suggestion of Robert Jarzmik, this additionally removes the definition of ARRAY_AND_SIZE, which is not used elsewhere in the file. The semantic match that makes

Re: [PATCH 1/16 v2] sound/soc/pxa/mioa701_wm9713.c: Avoid using ARRAY_AND_SIZE(e) as a function argument

2013-08-12 Thread Julia Lawall
On Mon, 12 Aug 2013, Mark Brown wrote: > On Mon, Aug 12, 2013 at 10:49:24PM +0200, Julia Lawall wrote: > > From: Julia Lawall > > > > Replace ARRAY_AND_SIZE(e) in function argument position to avoid hiding the > > arity of the called function. > > What is th

Re: question about netif_rx

2013-08-12 Thread Julia Lawall
On Tue, 13 Aug 2013, Francois Romieu wrote: > Julia Lawall : > > François Romieu : > [...] > > > Can you send a netif_receive_skb replacement patch for it ? > > > > Just to be sure, I just replace netif_rx by netif_receive_skb, nothing > > else? > &g

[PATCH 1/5 v2] drivers/gpio/gpio-omap.c: convert comma to semicolon

2013-08-13 Thread Julia Lawall
From: Julia Lawall Replace a comma between expression statements by a semicolon. This changes the semantics of the code, but given the current indentation appears to be what is intended. A simplified version of the semantic patch that performs this transformation is as follows: (http

question about drivers/net/ethernet/nxp/lpc_eth.c

2013-08-13 Thread Julia Lawall
I wonder why drivers/net/ethernet/nxp/lpc_eth.c uses dev_alloc_skb in the function __lpc_handle_recv, rather than netdev_alloc_skb? The difference seems to be only that with dev_alloc_skb, the dev field of the skb is initialized to NULL, rather than to a net_device, but this function seems to have

[PATCH 4/29] mtd: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 17/29] drivers/rtc: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 29/29] usb: dwc3: omap: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 27/29] drivers/ata/sata_rcar.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 26/29] drivers/media/platform/coda.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 25/29] drivers/spi/spi-sirf.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 15/29] ASoC: tegra20-ac97: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 22/29] host1x/{dev.c,drm/hdmi.c}: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 23/29] drivers/i2c/busses/i2c-ocores.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 24/29] drivers/remoteproc/da8xx_remoteproc.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 20/29] watchdog: s3c2410_wdt: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 21/29] pwm: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 19/29] watchdog: ts72xx_wdt: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 14/29] drivers/scsi/ufs/ufshcd-pltfrm.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A debugging statement in the error-handling code is removed as well, as it doesn't seem to give any more information than devm_ioremap_res

[PATCH 7/29] dma: mmp: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 13/29] drivers/input/keyboard/tegra-kbc.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 16/29] amba: tegra-ahb: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 18/29] tty: ar933x_uart: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 11/29] marvell-ccic/mmp-driver.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 12/29] sound/soc/samsung/ac97.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 10/29] drivers/watchdog/nuc900_wdt.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 0/29] simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
devm_ioremap_resource often uses the result of a call to platform_get_resource as its last argument. devm_ioremap_resource does appropriate error handling on this argument, so error handling can be removed from the call site. To make the connection between the call to platform_get_resource and th

[PATCH 9/29] drivers/char/hw_random/tx4939-rng.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 8/29] drivers/cpuidle/cpuidle-kirkwood.c: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 3/29] drivers/gpio: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 6/29] tegra: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,n,e,e1

[PATCH 1/29] pinctrl: nomadik: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 5/29] spi/spi-{bcm63xx.c,bfin-v3.c}: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

[PATCH 2/29] video: mxsfb: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

Re: [PATCH 1/2] arch/x86/crypto/camellia_glue.c: adjust code alignment

2013-08-14 Thread Julia Lawall
On Wed, 14 Aug 2013, Herbert Xu wrote: > On Sat, Aug 10, 2013 at 07:34:36PM +0200, Julia Lawall wrote: > > From: Julia Lawall > > > > Adjust alignment in automatically generated code. If this code > > will not be regenerated in the future, it may as well look

[PATCH 28/29] drivers/input/{keyboard,serio}: simplify use of devm_ioremap_resource

2013-08-14 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource when the value is passed to devm_ioremap_resource. Move the call to platform_get_resource adjacent to the call to devm_ioremap_resource to make the connection between them more clear. A

<    1   2   3   4   5   6   7   8   9   10   >