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

2013-08-14 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr 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

[PATCH 12/25] HID: sony: fix error return code

2013-12-29 Thread Julia Lawall
From: Julia Lawall julia.law...@lip6.fr Currently the return variable ret is always 0. Set it to other values in error cases, as used in the direct return. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl ( if@p1 (\(ret 0

[PATCH 0/25] fix error return code

2013-12-29 Thread Julia Lawall
These patches fix cases where the return variable is not set to an error code in an error case. -- To unsubscribe from this list: send the line unsubscribe linux-input in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] dt/sparc: Introduce the use of the managed version of kzalloc

2014-05-22 Thread Julia Lawall
On Thu, 22 May 2014, Dmitry Torokhov wrote: Hi Himangi, On Fri, May 23, 2014 at 01:04:30AM +0530, Himangi Saraogi wrote: This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also the

Re: [PATCH] dt/sparc: Introduce the use of the managed version of kzalloc

2014-05-22 Thread Julia Lawall
On Fri, 23 May 2014, Julia Lawall wrote: On Thu, 22 May 2014, Dmitry Torokhov wrote: Hi Himangi, On Fri, May 23, 2014 at 01:04:30AM +0530, Himangi Saraogi wrote: This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary

Re: [PATCH] Input: touchscreen : Introduce the use of the managed version of kzalloc

2014-05-29 Thread Julia Lawall
@@ -618,39 +619,22 @@ static int mrstouch_probe(struct platform_device *pdev) input_set_abs_params(tsdev-input, ABS_PRESSURE, MRST_PRESSURE_MIN, MRST_PRESSURE_MAX, 0, 0); - err = request_threaded_irq(tsdev-irq, NULL, mrstouch_pendet_irq, -

Re: [PATCH] HID: roccat: Drop cast

2014-06-26 Thread Julia Lawall
On Thu, 26 Jun 2014, Joe Perches wrote: On Thu, 2014-06-26 at 22:58 +0530, Himangi Saraogi wrote: This patch removes the cast on data of type void* as it is not needed. Hi Himangi The cast of a const void * to a void * was odd. Maybe a mechanism to verify appropriateness of loss of

Re: [PATCH] HID: roccat: Drop cast

2014-06-27 Thread Julia Lawall
On Thu, 26 Jun 2014, Joe Perches wrote: On Fri, 2014-06-27 at 07:29 +0200, Julia Lawall wrote: On Thu, 26 Jun 2014, Joe Perches wrote: The cast of a const void * to a void * was odd. Maybe a mechanism to verify appropriateness of loss of constness for any pointer might be useful

Re: [PATCH] HID: roccat: Drop cast

2014-06-29 Thread Julia Lawall
On Thu, 26 Jun 2014, Joe Perches wrote: On Fri, 2014-06-27 at 07:29 +0200, Julia Lawall wrote: On Thu, 26 Jun 2014, Joe Perches wrote: The cast of a const void * to a void * was odd. Maybe a mechanism to verify appropriateness of loss of constness for any pointer might be useful

Re: [PATCH] Input: ambakmi - Use managed interfaces

2014-07-13 Thread Julia Lawall
On Sun, 13 Jul 2014, Russell King - ARM Linux wrote: On Sun, Jul 13, 2014 at 08:11:29PM +0200, Julia Lawall wrote: On Sun, 13 Jul 2014, Russell King - ARM Linux wrote: On Sun, Jul 13, 2014 at 11:00:51PM +0530, Himangi Saraogi wrote: @@ -23,6 +23,7 @@ #include linux/clk.h

[PATCH 9/16] HID: logitech-hidpp: fix error return code

2015-04-05 Thread Julia Lawall
!= ret *if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Julia Lawall julia.law...@lip6.fr --- drivers/hid/hid-logitech-hidpp.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index

[PATCH 0/16] fix error return code

2015-04-05 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @ok exists@ identifier f,ret,i; expression e; constant c; @@ // identify a function that returns a negative return value at least once. f(...) { ... when any ( return -c@i; | ret = -c@i; ...

[PATCH 00/11] fix error return code

2015-08-22 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // smpl @ok exists@ identifier f,ret,i; expression e; constant c; @@ // identify a function that returns a negative return value at least once. f(...) { ... when any ( return -c@i; | ret = -c@i; ...

[PATCH 09/11] Input: sur40: fix error return code

2015-08-22 Thread Julia Lawall
*if(...) { ... when != ret = e2 when forall return ret; } // /smpl Signed-off-by: Julia Lawall julia.law...@lip6.fr --- drivers/input/touchscreen/sur40.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/input/touchscreen/sur40.c b/drivers/input/touchscreen/sur40.c index 8be7b9b

Re: [PATCH 2/2] input: gt801_2plus1 - Add initial support for Goodix GT801 2+1

2015-12-07 Thread Julia Lawall
It looks like braces may be mising. Please check. julia On Mon, 7 Dec 2015, kbuild test robot wrote: > Hi Priit, > > [auto build test WARNING on mripard/sunxi/for-next] > [also build test WARNING on next-20151203] > [cannot apply to input/next v4.4-rc4] > > url: >

Re: [patch] Input: egalax: potential NULL dereference on error

2015-12-19 Thread Julia Lawall
On Sat, 19 Dec 2015, Dan Carpenter wrote: > We didn't check input_allocate_device() for failures so it could lead to > a NULL deref. The patch does several other things... julia > > Fixes: 6b0f8f9c52ef ('Input: add eGalaxTouch serial touchscreen driver') > Signed-off-by: Dan Carpenter

[PATCH] Input: bma150 - constify bma150_cfg structure

2015-12-30 Thread Julia Lawall
The bma150_cfg structure is never modified, so declare it as const. Done with the help of Coccinelle. Signed-off-by: Julia Lawall <julia.law...@lip6.fr> --- drivers/input/misc/bma150.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/misc/bma150.c b/d