Catégorie : Linux

staging: i2o: Use kstrdup rather than duplicating its implementation

Author: Abdul Hussain S <hussain.abdul@outlook.com> The semantic patch that makes this change is available in scripts/coccinelle/api/kstrdup.cocci Signed-off-by: Abdul Hussain S Signed-off-by: Greg Kroah-Hartman — drivers/staging/i2o/memory.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/staging/i2o/memory.c b/drivers/staging/i2o/memory.c index 8f9509d..78b702c 100644 — a/drivers/staging/i2o/memory.c +++ b/drivers/staging/i2o/memory.c @@ -270,10 +270,9 @@ EXPORT_SYMBOL_GPL(i2o_dma_realloc); int i2o_pool_alloc(struct i2o_pool …

Lire la suite

Staging: ft1000: replace pr_err with dev_err

Author: Haneen Mohammed <hamohammed.sa@gmail.com> This patch replace pr_err with dev_err, when appropriate device structure is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(…,struct s *i,…) { } @rr@ identifier r.s, fld; @@ struct s { … struct device *fld; … }; @@ identifier r.i, rr.fld; …

Lire la suite

Staging: iio: replace pr_err with dev_err

Author: Haneen Mohammed <hamohammed.sa@gmail.com> This patch replace pr_err with dev_err, when appropriate device structre is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(…,struct s *i,…) { } @rr@ identifier r.s, fld; @@ struct s { … struct device *fld; … }; @@ identifier r.i, rr.fld; …

Lire la suite

Staging: gdm724x: replace pr_err with dev_err

Author: Haneen Mohammed <hamohammed.sa@gmail.com> This patch replace pr_err with dev_err, when appropriate device structre is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(…,struct s *i,…) { } @rr@ identifier r.s, fld; @@ struct s { … struct device *fld; … }; @@ identifier r.i, rr.fld; …

Lire la suite

Staging: comedi: replace pr_err with dev_err

Author: Haneen Mohammed <hamohammed.sa@gmail.com> This patch replace pr_err with dev_err, when appropriate device structure is found. Issue found using the following Coccinelle script: @r exists@ identifier f, s, i; position p; @@ f(…,struct s *i,…) { } @rr@ identifier r.s, fld; @@ struct s { … struct device *fld; … }; @@ identifier r.i, rr.fld; …

Lire la suite

Staging: rtl8192u: Rename struct to avoid CamelCase

Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch renames struct DRxPathSel to dynamic_rx_path_sel in order to keep the notations consistent and to remove the warning: « CHECK: Avoid CamelCase ». Done with coccinelle: @@ @@ struct -DRxPathSel +dynamic_rx_path_sel {…} @@ @@ struct -DRxPathSel +dynamic_rx_path_sel Signed-off-by: Cristina Opriceana Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192u/r8192U_dm.c | 2 +- drivers/staging/rtl8192u/r8192U_dm.h | 4 ++– …

Lire la suite

Staging: rtl8192u: Do not add new typedefs

Author: Cristina Opriceana <cristina.opriceana@gmail.com> This patch removes the dig_t and DRxPathSel type definitions in order to avoid the following warning: « WARNING: Do not add new typedefs ». Done with coccinelle and this script: @r@ type t; identifier id; @@ typedef struct id {…} t; @script:python get_name@ t

Staging: nvec: use !x instead of x == NULL

Author: Somya Anand <somyaanand214@gmail.com> Functions like devm_kzalloc, kmalloc_array, devm_ioremap, usb_alloc_urb, alloc_netdev return NULL as a return value on failure. Generally, When NULL represents failure, !x is commonly used. This patch cleans up the tests on the results of these functions, thereby using !x instead of x == NULL or NULL == x. This is done …

Lire la suite

Staging: iio: use !x instead of x == NULL

Author: Somya Anand <somyaanand214@gmail.com> Functions like devm_kzalloc, kmalloc_array, devm_ioremap, usb_alloc_urb, alloc_netdev return NULL as a return value on failure. Generally, When NULL represents failure, !x is commonly used. This patch cleans up the tests on the results of these functions, thereby using !x instead of x == NULL or NULL == x. This is done …

Lire la suite

Staging: goldfish: use !x instead of x == NULL

Author: Somya Anand <somyaanand214@gmail.com> Functions like devm_kzalloc, kmalloc_array, devm_ioremap, usb_alloc_urb, alloc_netdev return NULL as a return value on failure. Generally, When NULL represents failure, !x is commonly used. This patch cleans up the tests on the results of these functions, thereby using !x instead of x == NULL or NULL == x. This is done …

Lire la suite