ALSA: usb-audio: 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. Signed-off-by: Thomas Meyer Signed-off-by: Takashi Iwai — sound/usb/quirks.c | 7 +++—- 1 file changed, 3 insertions(+), 4 deletions(-)   diff –git a/sound/usb/quirks.c b/sound/usb/quirks.c index 2e5bc73..a3ddac0 100644 — a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -137,12 +137,12 …

Lire la suite

USB: Realtek cr: 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. Signed-off-by: Thomas Meyer Signed-off-by: Greg Kroah-Hartman — drivers/usb/storage/realtek_cr.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/usb/storage/realtek_cr.c b/drivers/usb/storage/realtek_cr.c index 30f64bf..7114767 100644 — a/drivers/usb/storage/realtek_cr.c +++ b/drivers/usb/storage/realtek_cr.c @@ -398,10 +398,9 …

Lire la suite

staging: rtl8192e: Use kzalloc rather than kmalloc v2

Author: Thomas Meyer <thomas@m3y3r.de> Use kzalloc rather than kmalloc followed by memset with 0 This considers some simple cases that are common and easy to validate Note in particular that there are no …s in the rule, so all of the matched code has to be contiguous The semantic patch that makes this change is …

Lire la suite

PM / OPP: Use ERR_CAST instead of ERR_PTR(PTR_ERR())

Author: Thomas Meyer <thomas@m3y3r.de> Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(…)) [The semantic patch that makes this change is available in scripts/coccinelle/api/err_cast.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr/] Signed-off-by: Thomas Meyer Signed-off-by: Rafael J. Wysocki — drivers/base/power/opp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)   diff –git a/drivers/base/power/opp.c b/drivers/base/power/opp.c …

Lire la suite

Staging: line6: 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/line6/midi.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-)   diff –git a/drivers/staging/line6/midi.c b/drivers/staging/line6/midi.c index …

Lire la suite

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_softmac.c | 4 ++– 1 file changed, 2 insertions(+), 2 deletions(-)   diff –git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite

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 …

Lire la suite