Quentin LAMBERT

Author's posts

staging: rdma: hfi1: Use offset_in_page macro

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> Use offset_in_page macro instead of (var & ~PAGE_MASK) The Coccinelle semantic patch used to make this change is as follows: // @@ unsigned long p; @@ – p & ~PAGE_MASK + offset_in_page(p) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — drivers/staging/rdma/hfi1/user_sdma.c | 4 ++– 1 file changed, 2 insertions(+), …

Continue reading

staging: rdma: hfi1: Use DIV_ROUND_UP

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) /(d)) but is perhaps more readable. The Coccinelle script used is as follows: // @@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / d …

Continue reading

staging: comedi: drivers: Use DIV_ROUND_CLOSEST

Author: Amitoj Kaur Chawla <amitoj1606@gmail.com> The kernel.h macro DIV_ROUND_CLOSEST performs the computation `(x +d/2)/d` but is perhaps more readable. The Coccinelle script used is as follows: // @@ expression x,__divisor; @@ – (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // Signed-off-by: Amitoj Kaur Chawla Signed-off-by: Greg Kroah-Hartman — drivers/staging/comedi/drivers/addi_apci_3xxx.c | 2 +- drivers/staging/comedi/drivers/amplc_pci230.c …

Continue reading

staging: rtl8723au: Remove unnecessary else following return

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Remove unnecessary else when there is a return statement in the corresponding if block. Coccinelle patch used: @rule1@ expression e1; @@ if (e1) { … return …; } – else{ … – } @rule2@ expression e2; statement s1; @@ if(e2) { … return …; } – else s1 Signed-off-by: Janani Ravichandran …

Continue reading

staging: rtl8188eu: core: Remove unnecessary braces

Author: Bhaktipriya Shridhar <bhaktipriya96@gmail.com> This patch removes braces for single statement blocks. The warning was detected using checkpatch.pl. Coccinelle was used to make the change. @@ expression e,e1; @@ – if (e) { + if (e) e1; – } Signed-off-by: Bhaktipriya Shridhar Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8188eu/core/rtw_recv.c | 12 ++++——– 1 file changed, 4 insertions(+), …

Continue reading

staging: comedi: drivers: Remove unnecessary else following return

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Else is unnecessary when there is a return statement in the corresponding if block. Coccinelle patch: @rule1@ expression e1; @@ if (e1) { … return …; } – else{ … – } @rule2@ expression e2; statement s1; @@ if(e2) { … return …; } – else s1 Signed-off-by: Janani Ravichandran Signed-off-by: …

Continue reading

staging: android: Remove unneeded else following a return

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Remove unnecessary else when there is a return statement in the corresponding if block. Coccinelle patch used: @rule1@ expression e1; @@ if (e1) { … return …; } – else{ … – } @rule2@ expression e2; statement s1; @@ if(e2) { … return …; } – else s1 Signed-off-by: Janani Ravichandran …

Continue reading

staging: mt29f_spinand: Remove unneeded else following return

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Remove unnecessary else when there is a return statement in the corresponding if block. Coccinelle patch used: @rule1@ expression e1; @@ if (e1) { … return …; } – else{ … – } @rule2@ expression e2; statement s1; @@ if(e2) { … return …; } – else s1 Signed-off-by: Janani Ravichandran …

Continue reading

staging: fsl-mc: Remove unneeded else following a return

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Remove unnecessary else when there is a return statement in the corresponding if block. Coccinelle patch used: @rule1@ expression e1; @@ if (e1) { … return …; } – else{ … – } @rule2@ expression e2; statement s1; @@ if(e2) { … return …; } – else s1 Signed-off-by: Janani Ravichandran …

Continue reading

staging: lustre: lustre: Remove unnecessary else after return

Author: Janani Ravichandran <janani.rvchndrn@gmail.com> Else is unnecessary when there is a return statement in the corresponding if block. Coccinelle patch used: @rule1@ expression e1; @@ if (e1) { … return …; } – else{ … – } @rule2@ expression e2; statement s1; @@ if(e2) { … return …; } – else s1 Signed-off-by: Janani Ravichandran …

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.