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 …
Catégorie : Linux
May 01 2015
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 …
May 01 2015
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 …
May 01 2015
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 ++—- …
May 01 2015
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 ++++—– …
May 01 2015
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 …
May 01 2015
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 …
May 01 2015
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 …
May 01 2015
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 …
May 01 2015
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 …