Category: Linux

staging: comedi: drivers: Use DIV_ROUND_CLOSEST

Author: Tapasweni Pathak <tapaswenipathak@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: // @haskernel@ @@ @depends on haskernel@ expression x,__divisor; @@ – (((x) + ((__divisor) / 2)) / (__divisor)) + DIV_ROUND_CLOSEST(x,__divisor) // Signed-off-by: Tapasweni Pathak Signed-off-by: Greg Kroah-Hartman — drivers/staging/comedi/drivers/s626.c | 2 +- 1 …

Continue reading

staging: octeon-usb: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

staging: lustre: lustre: llite: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

staging: iio: adc: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

staging: comedi: drivers: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

staging: comedi: use DIV_ROUND_UP

Author: Tapasweni Pathak <tapaswenipathak@gmail.com> The kernel.h macro DIV_ROUND_UP performs the computation (((n) + (d) – 1) / (d)) but is perhaps more readable. Coccinelle script used : // @haskernel@ @@ @depends on haskernel@ expression n,d; @@ ( – (n + d – 1) / d + DIV_ROUND_UP(n,d) | – (n + (d – 1)) / …

Continue reading

3c59x: fix bad split of cpu_to_le32(pci_map_single())

Author: Sylvain “ythier” Hitier <sylvain.hitier@gmail.com> In commit 6f2b6a3005b2c34c39f207a87667564f64f2f91a, # 3c59x: Add dma error checking and recovery the intent is to split out the mapping from the byte-swapping in order to insert a dma_mapping_error() check. Kinda this semantic patch: // See http://coccinelle.lip6.fr/ // // Beware, grouik-and-dirty! @@ expression DEV, X, Y, Z; @@ – cpu_to_le32(pci_map_single(DEV, X, …

Continue reading

Staging: lustre: lustre: osc: Remove variable that is not very useful.

Author: Heena Sirwani <heenasirwani@gmail.com> The following patch removes a variable that is not very useful using coccinelle. The semantic patch used was: @@ identifier ret; @@ -int ret = 0; … when != ret when strict -return ret; +return 0; Signed-off-by: Heena Sirwani Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/osc/osc_request.c | 4 +— 1 file changed, 1 …

Continue reading

Staging: lustre: lustre: osc: Remove variable that is not very useful.

Author: Heena Sirwani <heenasirwani@gmail.com> The following patch removes a variable that is not very useful using coccinelle. The semantic patch used was: @@ identifier ret; @@ -int ret = 0; … when != ret when strict -return ret; +return 0; Signed-off-by: Heena Sirwani Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/osc/osc_cache.c | 3 +– 1 file changed, 1 …

Continue reading

Staging: lustre: lustre: lov: Remove variable that is not very useful.

Author: Heena Sirwani <heenasirwani@gmail.com> The following patch removes a variable that is not very useful using coccinelle. The semantic patch used was: @@ identifier ret; @@ -int ret = 0; … when != ret when strict -return ret; +return 0; Signed-off-by: Heena Sirwani Signed-off-by: Greg Kroah-Hartman — drivers/staging/lustre/lustre/lov/lov_obd.c | 3 +– 1 file changed, 1 …

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.