Author: Wei Yongjun <yjwei@cn.fujitsu.com> Remove some pointless conditionals before kfree_skb(). The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression E; @@ – if (E) – kfree_skb(E); + kfree_skb(E); // Signed-off-by: Wei Yongjun Signed-off-by: David S. Miller — net/ipv6/ipv6_sockglue.c | 3 +– net/ipv6/tcp_ipv6.c | 6 ++—- 2 files changed, 3 insertions(+), …
Category: Linux
Feb 13 2009
UBIFS: list usage cleanup
Author: Eric Sesterhenn <snakebyte@gmx.de> Trivial cleanup, list_del(); list_add{,_tail}() is equivalent to list_move{,_tail}(). Semantic patch for coccinelle can be found at www.cccmz.de/~snakebyte/list_move_tail.spatch Signed-off-by: Eric Sesterhenn Signed-off-by: Artem Bityutskiy — fs/ubifs/log.c | 3 +– fs/ubifs/shrinker.c | 6 ++—- 2 files changed, 3 insertions(+), 6 deletions(-) diff –git a/fs/ubifs/log.c b/fs/ubifs/log.c index 3e0aa73..1004261 100644 — a/fs/ubifs/log.c +++ b/fs/ubifs/log.c …
Feb 12 2009
Btrfs: fs/btrfs/volumes.c: remove useless kzalloc
Author: Julia Lawall <julia@diku.dk> The call to kzalloc is followed by a kmalloc whose result is stored in the same variable. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,l; position p1,p2; expression *ptr != NULL; @@ ( if ((x@p1 = …
Feb 11 2009
Staging: et131x: list usage cleanup
Author: Eric Sesterhenn <snakebyte@gmx.de> Trivial cleanup, list_del(); list_add_tail() is equivalent to list_move_tail(). Semantic patch for coccinelle can be found at www.cccmz.de/~snakebyte/list_move_tail.spatch Signed-off-by: Eric Sesterhenn Signed-off-by: Greg Kroah-Hartman — drivers/staging/et131x/et1310_rx.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c index ec98da5..8dc559a 100644 — a/drivers/staging/et131x/et1310_rx.c +++ b/drivers/staging/et131x/et1310_rx.c @@ -1203,8 +1203,7 @@ …
Feb 09 2009
drivers/isdn: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,l; position p1,p2; expression *ptr != NULL; @@ ( if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(…)) == NULL) S | x@p1 …
Feb 09 2009
drivers/atm: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,l; position p1,p2; expression *ptr != NULL; @@ ( if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(…)) == NULL) S | x@p1 …
Feb 08 2009
PCI: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kmalloc should free the allocated data. Since the subsequent code that could provoke an error does not use the allocated data, the allocation is just moved below it. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement …
Feb 08 2009
[SCSI] lpfc: introduce missing kfree
Author: Julia Lawall <julia@diku.dk> Error handling code following a kmalloc should free the allocated data. The semantic match that finds the problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // @r exists@ local idexpression x; statement S; expression E; identifier f,l; position p1,p2; expression *ptr != NULL; @@ ( if ((x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(…)) == NULL) S | x@p1 …
Feb 04 2009
arch/powerpc: Eliminate double sizeof
Author: Julia Lawall <julia@diku.dk> Taking sizeof the result of sizeof is quite strange and does not seem to be what is wanted here. This was fixed using the following semantic patch. (http://www.emn.fr/x-info/coccinelle/) // @@ expression E; @@ – sizeof ( sizeof (E) – ) @@ type T; @@ – sizeof ( sizeof (T) – ) …
Feb 04 2009
[SCSI] libfc: Correct use of ! and &
Author: Julia Lawall <julia@diku.dk> !ep->esb_stat is either 1 or 0, and the rightmost bit of ESB_ST_COMPLETE is always 0, making the result of !ep->esb_stat & ESB_ST_COMPLETE always 0. Thus parentheses around the argument to ! seem needed. The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) // @@ expression E; constant C; @@ …