Catégorie : Linux

fs/ext3/balloc.c: delete useless initialization

Author: Julia Lawall <julia@diku.dk> Delete nontrivial initialization that is immediately overwritten by the result of an allocation function. The semantic match that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ type T; identifier i; expression e; @@ ( T i = \(0\|NULL\|ERR_PTR(…)\); | -T i = e; +T i; ) … when != i …

Lire la suite

drivers/ide/cy82c693.c: Add missing pci_dev_put

Author: Julia Lawall <julia@diku.dk> Pci_get_slot calls pci_dev_get, so pci_dev_put is needed before leaving the function in the case where pci_get_slot is locally used. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ local idexpression x; expression e; @@ *x = pci_get_slot(…) … when != true x == NULL when != pci_dev_put(x) …

Lire la suite

arch/tile/mm/init.c: 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: Chris Metcalf — arch/tile/mm/init.c | 3 +– 1 file changed, 1 insertion(+), …

Lire la suite

arch/openrisc/mm/init.c: 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: Jonas Bonn — arch/openrisc/mm/init.c | 3 +– 1 file changed, 1 insertion(+), …

Lire la suite

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(+), …

Lire la suite

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(+), …

Lire la suite

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 …

Lire la suite

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 @@ …

Lire la suite

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 | …

Lire la suite

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 …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.