[PATCH] pcmcia: vrc4173: delete obsolete driver

2015-12-09 Thread Julia Lawall
This driver contains a call to INIT_WORK with three arguments. Such a call has not been valid since Linux 2.6.19, so it is not likely that anyone is using the current version of this driver. Signed-off-by: Julia Lawall --- drivers/pcmcia/Kconfig |4 drivers/pcmcia/Makefile

Re: question about vrc4173_cardu.c

2015-04-27 Thread Julia Lawall
On Mon, 27 Apr 2015, Larry Finger wrote: > On 04/27/2015 04:30 PM, Julia Lawall wrote: > > Hello, > > > > Is there any need to keep drivers/pcmcia/vrc4173_cardu.c in the kernel? > > It contains the code INIT_WORK(&socket->tq_work, cardu_bh, socket);. > &g

question about vrc4173_cardu.c

2015-04-27 Thread Julia Lawall
Hello, Is there any need to keep drivers/pcmcia/vrc4173_cardu.c in the kernel? It contains the code INIT_WORK(&socket->tq_work, cardu_bh, socket);. INIT_WORK has not had three arguments since Linux 2.6.19, so I don't think that it is possible for this code to compile. julia

[PATCH 3/5] electra_cf: fix error return code

2014-11-23 Thread Julia Lawall
From: Julia Lawall Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when !=

[PATCH 0/5] fix error return code

2014-11-23 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @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; ... when !

[PATCH 11/25] pcmcia: fix error return code

2013-12-29 Thread Julia Lawall
From: Julia Lawall Set the return variable to an error code as done elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when !=

[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. ___ Linux PCMCIA reimplementation list http://lists.infradead.org/mailman/listinfo/linux-pcmcia

[PATCH] drivers/pcmcia/electra_cf.c: add missing iounmap and kfree

2012-04-18 Thread Julia Lawall
From: Julia Lawall cf and cf->mem_base have been allocated at the point of this failure, so they should be freed before leaving the function. Signed-off-by: Julia Lawall --- I'm not sure to understand how the call to device_init_wakeup(&ofdev->dev, 0); fits in, but there seems

[PATCH 7/12] drivers/pcmcia: Add missing local_irq_restore

2010-03-29 Thread Julia Lawall
From: Julia Lawall Use local_irq_restore in this error-handling case just like in the one just below. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r exists@ expression E1; identifier f; @@ f (...) { <+... * local_irq_s

Re: [PATCH 3/8] drivers/pcmcia: remove unnecessary kzalloc

2009-11-21 Thread Julia Lawall
> Just remove the first kzalloc and don't convert it to an array; that's the > safest option. I don't remember if there's a reason why I switched to a > linked list - however, what I will say is that the way all the sa11xx > and pxa stuff interact is not plainly obvious. OK, that is what my patch

Re: [PATCH 3/8] drivers/pcmcia: remove unnecessary kzalloc

2009-11-21 Thread Julia Lawall
On Sat, 21 Nov 2009, Russell King - ARM Linux wrote: > On Sat, Nov 21, 2009 at 04:12:59PM +0100, Julia Lawall wrote: > > Both kzallocs were added at the same time, when the function was added in > > commit 701a5dc05ad99a06958b3f97cb69d99b47cebee3. I have added the author >

Re: [PATCH 3/8] drivers/pcmcia: remove unnecessary kzalloc

2009-11-21 Thread Julia Lawall
On Sat, 21 Nov 2009, walter harms wrote: > > > Julia Lawall schrieb: > > From: Julia Lawall > > > > The result of calling kzalloc is never used or freed. > > > > The semantic match that finds this problem is as follows: > > (http://www.emn.fr/x

[PATCH 3/8] drivers/pcmcia: remove unnecessary kzalloc

2009-11-21 Thread Julia Lawall
From: Julia Lawall The result of calling kzalloc is never used or freed. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL

[PATCH] drivers/pcmcia/cistpl.c: introduce missing braces

2008-11-13 Thread Julia Lawall
From: Julia Lawall <[EMAIL PROTECTED]> The indentation and behavior of the code below suggests that braces are intended around the if branch. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; state

[PATCH] drivers/pcmcia: Add missing pci_dev_get

2008-01-04 Thread Julia Lawall
From: Julia Lawall <[EMAIL PROTECTED]> pci_get_slot does a pci_dev_get, so pci_dev_put needs to be called in an error case. An extract of the semantic match used to find the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ type find1.T,T1,T2; identifier find1.E; sta

[PATCH] drivers/pcmcia: Add missing iounmap

2008-01-01 Thread Julia Lawall
From: Julia Lawall <[EMAIL PROTECTED]> of_iomap calls ioremap, and so should be matched with an iounmap. At the two error returns, the result of calling of_iomap is only stored in a local variable, so these error paths need to call iounmap. Furthermore, this function ultimately stor