Category: Linux

KVM: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Marcelo Tosatti — virt/kvm/kvm_main.c | 11 +++++—— 1 file changed, 5 insertions(+), 6 deletions(-)   diff –git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index …

Continue reading

staging: rtl8192e: Use kmemdup rather than duplicating its implementation

Author: Thomas Meyer <thomas@m3y3r.de> Use kmemdup rather than duplicating its implementation The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/staging/rtl8192e/rtllib_wx.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff –git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index …

Continue reading

HID: hid-lg4ff: Casting (void *) value returned by kmalloc is useless

Author: Thomas Meyer <thomas@m3y3r.de> Casting (void *) value returned by kmalloc is useless as mentioned in Documentation/CodingStyle, Chap 14. The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Jiri Kosina — drivers/hid/hid-lg4ff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/hid/hid-lg4ff.c b/drivers/hid/hid-lg4ff.c index 103f30d..6ecc9e2 …

Continue reading

Hexagon: Use resource_size function

Author: Thomas Meyer <thomas@m3y3r.de> Use resource_size function on resource object instead of explicit computation. The semantic patch that makes this change is available in scripts/coccinelle/api/resource_size.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/ Signed-off-by: Thomas Meyer Signed-off-by: Richard Kuo — arch/hexagon/kernel/time.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-)   diff –git …

Continue reading

net/rfkill/core.c: use kstrtoul, etc

Author: Julia Lawall <julia@diku.dk> Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc. A semantic patch rule for the kstrtoul case is as follows: (http://coccinelle.lip6.fr/) // @@ expression a,b; {int,long} *c; @@ -strict_strtoul +kstrtoul (a,b,c) // Signed-off-by: Julia Lawall Signed-off-by: John W. Linville — net/rfkill/core.c | 4 ++– 1 file changed, 2 insertions(+), 2 …

Continue reading

net/mac80211/debugfs.c: use kstrtoul, etc

Author: Julia Lawall <julia@diku.dk> Use kstrtoul, etc instead of the now deprecated strict_strtoul, etc. A semantic patch rule for the kstrtoul case is as follows: (http://coccinelle.lip6.fr/) // @@ expression a,b; {int,long} *c; @@ -strict_strtoul +kstrtoul (a,b,c) // Signed-off-by: Julia Lawall Signed-off-by: John W. Linville — net/mac80211/debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 …

Continue reading

coccicheck: add M= option to control which dir is processed

Author: Greg Dietsche <Gregory.Dietsche@cuw.edu> Examples: make coccicheck M=drivers/net/wireless/ make coccicheck SUBDIRS=drivers/net/wireless/ Version 2: fix patch file names when using M= tell coccinelle where the include files are Version 3: Add second include option to support out of tree development Fix error message Signed-off-by: Greg Dietsche Acked-by: Julia Lawall Signed-off-by: Michal Marek — scripts/coccicheck | 19 …

Continue reading

HID: drivers/hid/hid-roccat.c: eliminate a null pointer dereference

Author: Julia Lawall <julia@diku.dk> It is not possible to take the lock in device if device is NULL. The mutex_lock is thus moved after the NULL test. New error handling labels are added at the end to differentiate between the cases where different sets of locks should be unlocks, and between whether or not reader …

Continue reading

drivers/staging/rtl8712/rtl871x_mlme.c: eliminate a null pointer dereference

Author: Julia Lawall <julia@diku.dk> If ibss_wlan is NULL, it is not correct to memcpy into its field. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ expression E, E1; identifier f; statement S1,S2,S3; @@ if (E == NULL) { … when != if (E == NULL || …) S1 else S2 …

Continue reading

ASoC: keep pointer to resource so it can be freed

Author: Julia Lawall <julia@diku.dk> Add a new variable for storing resources accessed subsequent to the one accessed using request_mem_region, so the one accessed using request_mem_region can be released if needed. The resource variable names are also changed to be more descriptive. This code is also missing some calls to iounmap. The semantic match that finds …

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.