Category: Linux

staging:wlags49_h2: Removed assignments from if statements.

Author: Chi Pham <fempsci@gmail.com> The following coccinelle script found the match: @@ expression E0, E1, E2; statement S0, S1; @@ – if ((E1 = E2) != E0) + E1 = E2; + if (E1 != E0) S0 else S1 Signed-off-by: Chi Pham Acked-by: Paul E. McKenney Signed-off-by: Peter P Waskiewicz Jr — drivers/staging/wlags49_h2/wl_main.c | 3 …

Continue reading

staging:vt6656: Removed assignment in if statement.

Author: Chi Pham <fempsci@gmail.com> The following coccinelle script found the match: @@ expression E0, E1, E2; statement S0; @@ – if ((E1 = E2) == E0) + E1 = E2; + if (E1 == E0) S0 Signed-off-by: Chi Pham Acked-by: Paul E. McKenney Signed-off-by: Peter P Waskiewicz Jr — drivers/staging/vt6656/iwctl.c | 3 ++- 1 file …

Continue reading

staging:lustre: Removed assignments from if statements.

Author: Chi Pham <fempsci@gmail.com> Fixed some minor checkpatch warnings such as whitespace. Coccinelle was used for this patch (NOTE: some of the changes were made by hand). The script is not complete (semantically) and might raise some checkpatch warnings in terms of indentation depending on existing code. *** IFASSIGNMENT.COCCI START *** /* Coccinelle script to …

Continue reading

staging:dgnc: Removed assignments from if statements.

Author: Chi Pham <fempsci@gmail.com> Coccinelle was used for this patch. The script is not complete (semantically) and might raise some checkpatch warnings in terms of indentation depending on existing code. *** IFASSIGNMENT.COCCI START *** /* Coccinelle script to handle assignments in if statements * For compound statements, can so far only handle statements with the …

Continue reading

Staging:netlogic: Correct double assignment in xlr_net.c

Author: Iulia Manda <iulia.manda21@gmail.com> This patch removes an unnecessary assignment of variable val. I have used a coccinelle semantic patch(da.cocci) in order to find this issue. Signed-off-by: Iulia Manda Reviewed-by: Sarah Sharp Signed-off-by: Greg Kroah-Hartman — drivers/staging/netlogic/xlr_net.c | 2 — 1 file changed, 2 deletions(-)   diff –git a/drivers/staging/netlogic/xlr_net.c b/drivers/staging/netlogic/xlr_net.c index fd6050e..c83e337 100644 — a/drivers/staging/netlogic/xlr_net.c …

Continue reading

gpio-tz1090: Replace commas with semi-colons

Author: James Hogan <james.hogan@imgtec.com> Replace commas with semicolons between irqchip callback initialisation statements in tz1090_gpio_bank_probe. The commas appear to be a subtle remnant of when the irqchips were statically initialised. Thanks to Thomas Gleixner for spotting it while whipping up a coccinelle script. Reported-by: Thomas Gleixner Signed-off-by: James Hogan Cc: Alexandre Courbot Cc: linux-gpio@vger.kernel.org Cc: …

Continue reading

asoc: soc-core: fix coccinelle warnings

Author: Nenghua Cao <nhcao@marvell.com> sound/soc/soc-core.c:2708:6-13: WARNING: Assignment of bool to 0/1 sound/soc/soc-core.c:2726:3-10: WARNING: Assignment of bool to 0/1 More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Nenghua Cao Signed-off-by: Mark Brown — sound/soc/soc-core.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index fe1df50..3477525 100644 — a/sound/soc/soc-core.c …

Continue reading

ASoC: core: fix coccinelle warnings

Author: Nenghua Cao <nhcao@marvell.com> sound/soc/soc-core.c:2708:6-13: WARNING: Assignment of bool to 0/1 sound/soc/soc-core.c:2726:3-10: WARNING: Assignment of bool to 0/1 More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Nenghua Cao Signed-off-by: Mark Brown — sound/soc/soc-core.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 393ff06..45a1faf 100644 — a/sound/soc/soc-core.c …

Continue reading

regmap: fix coccinelle warnings

Author: Nenghua Cao <nhcao@marvell.com> /drivers/base/regmap/regmap.c:717:6-33: WARNING: Comparison to bool. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Nenghua Cao Signed-off-by: Mark Brown — drivers/base/regmap/regmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/base/regmap/regmap.c b/drivers/base/regmap/regmap.c index 9a426c0..92d9b79 100644 — a/drivers/base/regmap/regmap.c +++ b/drivers/base/regmap/regmap.c @@ -718,7 +718,7 @@ skip_format_initialization: new->window_start = …

Continue reading

bnx2x: Remove hidden flow control goto from BNX2X_ALLOC macros

Author: Joe Perches <joe@perches.com> BNX2X_ALLOC macros use “goto alloc_mem_err” so these labels appear unused in some functions. Expand these macros in-place via coccinelle and some typing. Update the macros to use statement expressions and remove the BNX2X_ALLOC macro. This adds some > 80 char lines. $ cat bnx2x_pci_alloc.cocci @@ expression e1; expression e2; expression e3; …

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.