kernel-hacking-2024-linux-s.../drivers/bluetooth
Julia Lawall 5ee283c063 Bluetooth: Use kmemdup for drivers
Use kmemdup when some other buffer is immediately copied into the
allocated region.

A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
expression from,to,size,flag;
statement S;
@@

-  to = \(kmalloc\|kzalloc\)(size,flag);
+  to = kmemdup(from,size,flag);
   if (to==NULL || ...) S
-  memcpy(to, from, size);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
2010-07-21 10:39:06 -07:00
..
ath3k.c
bcm203x.c Bluetooth: Use kmemdup for drivers 2010-07-21 10:39:06 -07:00
bfusb.c
bluecard_cs.c drivers: bluetooth: bluecard_cs.c: Fixed include error, changed to linux/io.h 2010-07-01 21:28:14 -07:00
bpa10x.c
bt3c_cs.c
btmrvl_debugfs.c
btmrvl_drv.h Bluetooth: Process interrupt in main thread of btmrvl driver as well 2010-07-21 10:39:06 -07:00
btmrvl_main.c Bluetooth: Process interrupt in main thread of btmrvl driver as well 2010-07-21 10:39:06 -07:00
btmrvl_sdio.c Bluetooth: Process interrupt in main thread of btmrvl driver as well 2010-07-21 10:39:06 -07:00
btmrvl_sdio.h
btsdio.c
btuart_cs.c
btusb.c
dtl1_cs.c
hci_bcsp.c
hci_h4.c
hci_ldisc.c Bluetooth: Fix warning: variable 'tty' set but not used 2010-07-21 10:39:05 -07:00
hci_ll.c
hci_uart.h
hci_vhci.c
Kconfig
Makefile