Category: Linux

staging: lustre: ptlrpc: Replace OBD_CPT_ALLOC etc by kzalloc_node

Author: Julia Lawall <Julia.Lawall@lip6.fr> Replace OBD_CPT_ALLOC, OBD_CPT_ALLOC_PTR, and OBD_CPT_ALLOC_GFP by corresponding calls to kzalloc_node. The semantic patch for the OBD_CPT_ALLOC case is as follows: (http://coccinelle.lip6.fr/). // @@ expression ptr,cptab,cpt,size; @@ – OBD_CPT_ALLOC(ptr, cptab, cpt, size) + ptr = kzalloc_node(size, GFP_NOFS, cfs_cpt_spread_node(cptab, cpt)) // Note that the original OBD macros would check if the cptab argument …

Continue reading

staging: lustre: ldlm: ldlm_lib: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Continue reading

staging: lustre: ldlm: ldlm_lock: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Continue reading

staging: lustre: ldlm: ldlm_resource: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) { kfree(ptr); ptr = NULL; – } // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 ++—- …

Continue reading

staging: lustre: libcfs: linux: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) { kfree(ptr); ptr = NULL; – } // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/libcfs/linux/linux-tracefile.c | 9 ++++—– …

Continue reading

Staging: lustre: llite: dir: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // This patch additionally simplifies one case where the free, and thus the jump to the end of …

Continue reading

Staging: lustre: llite: file: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that finds this issue is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // In the first case, llss can never be null at the point of the kfree anyway. In …

Continue reading

Staging: lustre: llite: llite_lib: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/llite/llite_lib.c | 12 ++++——– 1 file changed, 4 insertions(+), 8 …

Continue reading

staging: lustre: llite: statahead: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/llite/statahead.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Continue reading

staging: lustre: lmv: remove unneeded null test before free

Author: Julia Lawall <Julia.Lawall@lip6.fr> Kfree can cope with a null argument, so drop null tests. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/lmv/lmv_obd.c | 6 ++—- 1 file changed, 2 insertions(+), 4 …

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.