Catégorie : Linux

staging: lustre: lov: lov_dev: 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/lov/lov_dev.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Lire la suite

staging: lustre: mdc: 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/mdc/mdc_request.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Lire la suite

staging: lustre: obdclass: genops: 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/obdclass/genops.c | 15 +++++———- 1 file changed, 5 insertions(+), 10 …

Lire la suite

staging: lustre: obdclass: llog: 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/obdclass/llog.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Lire la suite

staging: lustre: obdclass: obd_config: 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 identifies this issue is as follows: (http://coccinelle.lip6.fr/) // @@ expression ptr; @@ – if (ptr != NULL) kfree(ptr); // The first part of the patch introduces new labels to avoid unnecessary calls to kfree. In addition, …

Lire la suite

staging: lustre: obdclass: obd_mount: 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); @@ expression ptr; @@ – if (ptr != NULL) { kfree(ptr); ptr = NULL; – } // Signed-off-by: …

Lire la suite

staging: lustre: obdecho: 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/obdecho/echo_client.c | 6 ++—- 1 file changed, 2 insertions(+), 4 …

Lire la suite

Staging: lustre: osc: 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/osc/osc_request.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Lire la suite

Staging: lustre: ptlrpc: lproc_ptlrpc: 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); // In the first case, the only cleanup needed is the unlock, so jump to that directly. Likewise, …

Lire la suite

staging: lustre: ptlrpc: sec_plain: 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/ptlrpc/sec_plain.c | 3 +– 1 file changed, 1 insertion(+), 2 …

Lire la suite