Quentin LAMBERT

Author's posts

target: Convert target_core_rd.c to use use BUG_ON

Author: Julia Lawall <julia@diku.dk> Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ -if (x) BUG(); +BUG_ON(x); @@ identifier x; @@ -if (!x) BUG(); +BUG_ON(!x); // Signed-off-by: Julia Lawall Signed-off-by: Nicholas Bellinger — drivers/target/target_core_rd.c | 24 ++++++++—————- 1 file changed, 8 insertions(+), …

Continue reading

KVM: VMX: trivial: use BUG_ON

Author: Julia Lawall <julia@diku.dk> Use BUG_ON(x) rather than if(x) BUG(); The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; @@ -if (x) BUG(); +BUG_ON(x); @@ identifier x; @@ -if (!x) BUG(); +BUG_ON(!x); // Signed-off-by: Julia Lawall Signed-off-by: Marcelo Tosatti — arch/x86/kvm/vmx.c | 3 +– 1 file changed, 1 insertion(+), …

Continue reading

target: Use ERR_CAST inlined function

Author: Thomas Meyer <thomas@m3y3r.de> Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(…)) The semantic patch that makes this output is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Nicholas Bellinger — drivers/target/iscsi/iscsi_target_configfs.c | 4 ++– drivers/target/target_core_fabric_configfs.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)   diff …

Continue reading

frv: remove unnecessary code

Author: Greg Dietsche <Gregory.Dietsche@cuw.edu> remove unnecessary code that matches this coccinelle pattern if (…) return ret; return ret; Signed-off-by: Greg Dietsche Signed-off-by: David Howells Signed-off-by: Linus Torvalds — arch/frv/mm/pgalloc.c | 8 +——- 1 file changed, 1 insertion(+), 7 deletions(-)   diff –git a/arch/frv/mm/pgalloc.c b/arch/frv/mm/pgalloc.c index c42c83d..4fb63a3 100644 — a/arch/frv/mm/pgalloc.c +++ b/arch/frv/mm/pgalloc.c @@ -133,13 +133,7 @@ …

Continue reading

ALSA: sound/core/pcm_compat.c: adjust array index

Author: Julia Lawall <julia@diku.dk> Convert array index from the loop bound to the loop index. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,ar; @@ for(e1 = 0; e1 < e2; e1++) { } // Signed-off-by: Julia Lawall Cc: Signed-off-by: Takashi Iwai --- sound/core/pcm_compat.c | …

Continue reading

drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c: adjust array index

Author: Julia Lawall <julia@diku.dk> Convert array index from the loop bound to the loop index. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,ar; @@ for(e1 = 0; e1 < e2; e1++) { } // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- drivers/staging/ath6kl/miscdrv/ar3kps/ar3kpsparser.c | 2 …

Continue reading

drivers/net/niu.c: adjust array index

Author: Julia Lawall <julia@diku.dk> Convert array index from the loop bound to the loop index. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,ar; @@ for(e1 = 0; e1 < e2; e1++) { } // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- drivers/net/niu.c | …

Continue reading

net: adjust array index

Author: Julia Lawall <julia@diku.dk> Convert array index from the loop bound to the loop index. A simplified version of the semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,ar; @@ for(e1 = 0; e1 < e2; e1++) { } // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- net/ipv4/igmp.c | …

Continue reading

[SCSI] ipr: reorder error handling code to include iounmap

Author: Julia Lawall <julia@diku.dk> The out_msi_disable label should be before cleanup_nomem to additionally benefit from the call to iounmap. Subsequent gotos are adjusted to go to out_msi_disable instead of cleanup_nomem, which now follows it. This is safe because pci_disable_msi does nothing if pci_enable_msi was not called. A simplified version of the semantic match that finds …

Continue reading

drivers/staging/hv/blkvsc_drv.c: eliminate NULL pointer dereference

Author: Julia Lawall <julia@diku.dk> In this code, blkvsc_req is allocated in the cache blkdev->request_pool, but freed in the first case to the cache blkvsc_req->dev->request_pool. blkvsc_req->dev is subsequently initialized to blkdev, making these the same at the second call to kmem_cache_free. But at the point of the first call, blkvsc_req->dev is NULL. The second call is …

Continue reading

BtrLinux
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.