Quentin LAMBERT

Author's posts

staging: lustre: ldlm: Use !x to check for kzalloc failure

Author: Julia Lawall <Julia.Lawall@lip6.fr> !x is more normal for kzalloc failure in the kernel. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; statement S1, S2; @@ x = kzalloc(…); if ( – x == NULL + !x ) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman …

Continue reading

staging: lustre: lclient: Use !x to check for kzalloc failure

Author: Julia Lawall <Julia.Lawall@lip6.fr> !x is more normal for kzalloc failure in the kernel. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; statement S1, S2; @@ x = kzalloc(…); if ( – x == NULL + !x ) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman …

Continue reading

staging: lustre: fld: Use !x to check for kzalloc failure

Author: Julia Lawall <Julia.Lawall@lip6.fr> !x is more normal for kzalloc failure in the kernel. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; statement S1, S2; @@ x = kzalloc(…); if ( – x == NULL + !x ) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman …

Continue reading

staging: lustre: fid: Use !x to check for kzalloc failure

Author: Julia Lawall <Julia.Lawall@lip6.fr> !x is more normal for kzalloc failure in the kernel. The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression x; statement S1, S2; @@ x = kzalloc(…); if ( – x == NULL + !x ) S1 else S2 // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman …

Continue reading

[media] dvb_core: Replace memset with eth_zero_addr

Author: Vaishali Thakkar <vthakkar1994@gmail.com> Use eth_zero_addr to assign the zero address to the given address array instead of memset when second argument is address of zero. The Coccinelle semantic patch that makes this change is as follows: // @eth_zero_addr@ expression e; @@ -memset(e,0x00,ETH_ALEN); +eth_zero_addr(e); // Signed-off-by: Vaishali Thakkar Signed-off-by: Mauro Carvalho Chehab — drivers/media/dvb-core/dvb_net.c | …

Continue reading

Bluetooth: Use zalloc when possible

Author: Johan Hedberg <johan.hedberg@intel.com> Use zallog for adv_instance allocation instead of kmalloc + memset. This also fixes the following coccinelle warning: >> net/bluetooth/hci_core.c:2693:17-24: WARNING: kzalloc should be used for adv_instance, instead of kmalloc/memset Signed-off-by: Johan Hedberg Signed-off-by: Marcel Holtmann — net/bluetooth/hci_core.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/net/bluetooth/hci_core.c …

Continue reading

staging:rtl8723au: Fix return statement reported by coccinelle

Author: Prasanna Karthik <mkarthi3@visteon.com> Modified return statement and removed local declaration no longer needed. No Compiler warnings. Signed-off-by: Prasanna Karthik Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c index 4909835..11d635d 100644 — a/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c +++ b/drivers/staging/rtl8723au/hal/rtl8723a_rf6052.c @@ -500,7 +500,6 @@ phy_RF6052_Config_ParaFile_Fail: int PHY_RF6052_Config8723A(struct rtw_adapter …

Continue reading

regulator: fix simple_return.cocci warnings

Author: Julia Lawall <julia.lawall@lip6.fr> Simplify a trivial if-return sequence and combine with a preceding function call. Generated by: scripts/coccinelle/misc/simple_return.cocci CC: Mark Brown Signed-off-by: Julia Lawall Signed-off-by: Mark Brown — drivers/regulator/qcom_spmi-regulator.c | 6 +—– 1 file changed, 1 insertion(+), 5 deletions(-)   diff –git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c index 162b865..15bba2b 100644 — a/drivers/regulator/qcom_spmi-regulator.c +++ b/drivers/regulator/qcom_spmi-regulator.c @@ -710,12 +710,8 …

Continue reading

staging:lustre:mdc: Fix return statement reported by coccinelle

Author: Prasanna Karthik <mkarthi3@visteon.com> Modified return statement and removed local declaration no longer needed. No Compiler warnings. Signed-off-by: Prasanna Karthik Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/mdc/mdc_request.c | 5 +—- 1 file changed, 1 insertion(+), 4 deletions(-)   diff –git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index c23511f..7f208a6 100644 — a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -2090,7 +2090,6 @@ static int mdc_hsm_copytool_send(int len, …

Continue reading

Matching usage of bool variables

In this example we write a semantic patch to match the uses of a variable having a user defined type. This tutorial explains how to name rules. We introduce two metavariable types, namely typedef and idexpression. Here we will be studying the following patch: @find_usage@ typedef bool; idexpression bool id; @@   * id@find_usage@ typedef …

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.