Catégorie : Linux

ideapad_laptop: Introduce the use of the managed version of kzalloc

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. The label sysfs_failed is removed as it is no longer required. Also, linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. The following Coccinelle …

Lire la suite

iio: fix error return code

Author: Julia Lawall <Julia.Lawall@lip6.fr> Convert a zero return value on error to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... …

Lire la suite

fs/reiserfs/bitmap.c: coding style fixes

Author: Fabian Frederick <fabf@skynet.be> -Trivial code clean-up -Fix endif }; (coccinelle warning) Signed-off-by: Fabian Frederick Cc: Jeff Mahoney Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/reiserfs/bitmap.c | 13 ++++++——- 1 file changed, 6 insertions(+), 7 deletions(-)   diff –git a/fs/reiserfs/bitmap.c b/fs/reiserfs/bitmap.c index dc9a682..1bcffea 100644 — a/fs/reiserfs/bitmap.c +++ b/fs/reiserfs/bitmap.c @@ -142,7 +142,6 @@ static int scan_bitmap_block(struct …

Lire la suite

fs/binfmt_elf.c: fix bool assignements

Author: Fabian Frederick <fabf@skynet.be> Fix coccinelle warnings. Signed-off-by: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — fs/binfmt_elf.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index aa3cb62..dabc73a 100644 — a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1686,7 +1686,7 @@ static size_t get_note_info_size(struct elf_note_info *info) static int write_note_info(struct elf_note_info *info, struct …

Lire la suite

lib/vsprintf.c: fix comparison to bool

Author: Fabian Frederick <fabf@skynet.be> Fixing 2 coccinelle warnings: lib/vsprintf.c:2350:2-9: WARNING: Assignment of bool to 0/1 lib/vsprintf.c:2389:3-10: WARNING: Assignment of bool to 0/1 Signed-off-by: Fabian Frederick Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — lib/vsprintf.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/lib/vsprintf.c b/lib/vsprintf.c index 0648291..6fe2c84 100644 — a/lib/vsprintf.c +++ b/lib/vsprintf.c …

Lire la suite

mm/mmap.c: replace IS_ERR and PTR_ERR with PTR_ERR_OR_ZERO

Author: Duan Jiong <duanj.fnst@cn.fujitsu.com> Fix a coccinelle error regarding usage of IS_ERR and PTR_ERR instead of PTR_ERR_OR_ZERO. Signed-off-by: Duan Jiong Acked-by: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds — mm/mmap.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-)   diff –git a/mm/mmap.c b/mm/mmap.c index b1202cf..6cdec3a 100644 — a/mm/mmap.c +++ b/mm/mmap.c @@ …

Lire la suite

staging: tidspbridge: use safer test on the result of find_first_zero_bit

Author: Julia Lawall <Julia.Lawall@lip6.fr> Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may return a larger number than the maximum position argument if that position is not a multiple of BITS_PER_LONG. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e1,e2,e3; statement S1,S2; @@ e1 = find_first_zero_bit(e2,e3) … if …

Lire la suite

lpc_eth: Use resource_size instead of computation

Author: Benoit Taine <benoit.taine@lip6.fr> This issue was reported by coccicheck using the semantic patch at scripts/coccinelle/api/resource_size.cocci Signed-off-by: Benoit Taine Signed-off-by: David S. Miller — drivers/net/ethernet/nxp/lpc_eth.c | 8 +++—– 1 file changed, 3 insertions(+), 5 deletions(-)   diff –git a/drivers/net/ethernet/nxp/lpc_eth.c b/drivers/net/ethernet/nxp/lpc_eth.c index 422d9b5..8706c0d 100644 — a/drivers/net/ethernet/nxp/lpc_eth.c +++ b/drivers/net/ethernet/nxp/lpc_eth.c @@ -1361,7 +1361,7 @@ static int lpc_eth_drv_probe(struct platform_device …

Lire la suite

usb: musb: davinci: use devm_ functions.

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, a label is done away with and clk_get is replaced by it corresponding devm version and the clk_puts are done away with. The labels are renamed to …

Lire la suite

usb: musb: tusb6010: Introduce the use of the managed version of kzalloc

Author: Himangi Saraogi <himangi774@gmail.com> This patch moves data allocated using kzalloc to managed data allocated using devm_kzalloc and cleans now unnecessary kfrees in probe and remove functions. Also, the unnecesary labels are removed and linux/device.h is added to make sure the devm_*() routine declarations are unambiguously available. The following Coccinelle semantic patch was used for …

Lire la suite

BtrLinux
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.