Author: Thomas Meyer <thomas@m3y3r.de> 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: Mauro Carvalho Chehab — drivers/media/video/vino.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff –git a/drivers/media/video/vino.c b/drivers/media/video/vino.c index 52a0a37..4d7391e 100644 — a/drivers/media/video/vino.c +++ b/drivers/media/video/vino.c @@ -708,7 +708,7 @@ static int vino_allocate_buffer(struct vino_framebuffer *fb, …
Category: Linux
Nov 17 2011
[media] dw2102: Use kmemdup rather than duplicating its implementation
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Mauro Carvalho Chehab — drivers/media/dvb/dvb-usb/dw2102.c | 15 ++++++——— 1 file changed, 6 insertions(+), 9 deletions(-) diff –git a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c index f103ec1..41cff37 100644 — a/drivers/media/dvb/dvb-usb/dw2102.c +++ b/drivers/media/dvb/dvb-usb/dw2102.c @@ -1859,12 +1859,11 @@ static struct dvb_usb_device_properties su3000_properties = …
Nov 17 2011
[media] drxd: Use kmemdup rather than duplicating its implementation
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: Mauro Carvalho Chehab — drivers/media/dvb/frontends/drxd_hard.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c index 88e46f4..beb6775 100644 — a/drivers/media/dvb/frontends/drxd_hard.c +++ b/drivers/media/dvb/frontends/drxd_hard.c @@ -914,14 +914,13 @@ static int load_firmware(struct drxd_state *state, …
Nov 17 2011
gianfar: Use kmemdup rather than duplicating its implementation
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller — drivers/net/ethernet/freescale/gianfar_ethtool.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/net/ethernet/freescale/gianfar_ethtool.c b/drivers/net/ethernet/freescale/gianfar_ethtool.c index 1ea0eb9..5890f4b 100644 — a/drivers/net/ethernet/freescale/gianfar_ethtool.c +++ b/drivers/net/ethernet/freescale/gianfar_ethtool.c @@ -1410,10 +1410,9 @@ static int gfar_optimize_filer_masks(struct filer_table *tab) …
Nov 17 2011
RxRPC: Use kmemdup rather than duplicating its implementation
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller — net/rxrpc/ar-key.c | 6 ++—- 1 file changed, 2 insertions(+), 4 deletions(-) diff –git a/net/rxrpc/ar-key.c b/net/rxrpc/ar-key.c index 43ea7de..4cba13e 100644 — a/net/rxrpc/ar-key.c +++ b/net/rxrpc/ar-key.c @@ -306,10 +306,9 @@ static int rxrpc_krb5_decode_tagged_data(struct krb5_tagged_data *td, …
Nov 17 2011
ksz884x: Use kzalloc rather than kmalloc followed by memset with 0
Author: Thomas Meyer <thomas@m3y3r.de> 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 available in scripts/coccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller …
Nov 17 2011
ks8*/ksz8*: Casting (void *) value returned by kmalloc is useless
Author: Thomas Meyer <thomas@m3y3r.de> 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: David S. Miller — drivers/net/ethernet/micrel/ks8851_mll.c | 3 +– 1 file changed, 1 insertion(+), 2 deletions(-) diff –git a/drivers/net/ethernet/micrel/ks8851_mll.c b/drivers/net/ethernet/micrel/ks8851_mll.c index d19c849..228c5c0 100644 — a/drivers/net/ethernet/micrel/ks8851_mll.c +++ b/drivers/net/ethernet/micrel/ks8851_mll.c @@ -1500,8 +1500,7 @@ static int ks_hw_init(struct ks_net *ks) …
Nov 17 2011
irttp: Use kmemdup rather than duplicating its implementation
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller — net/irda/irttp.c | 4 +— 1 file changed, 1 insertion(+), 3 deletions(-) diff –git a/net/irda/irttp.c b/net/irda/irttp.c index 32e3bb0..5c93f29 100644 — a/net/irda/irttp.c +++ b/net/irda/irttp.c @@ -1461,14 +1461,12 @@ struct tsap_cb *irttp_dup(struct tsap_cb *orig, …
Nov 17 2011
sparc: Use kmemdup rather than duplicating its implementation
Author: Thomas Meyer <thomas@m3y3r.de> The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller — arch/sparc/kernel/ds.c | 6 ++—- arch/sparc/kernel/prom_common.c | 4 +— 2 files changed, 3 insertions(+), 7 deletions(-) diff –git a/arch/sparc/kernel/ds.c b/arch/sparc/kernel/ds.c index 7429b47..381edcd 100644 — a/arch/sparc/kernel/ds.c +++ b/arch/sparc/kernel/ds.c @@ -1181,13 +1181,11 @@ static …
Nov 17 2011
CDC NCM: Use kzalloc rather than kmalloc followed by memset with 0
Author: Thomas Meyer <thomas@m3y3r.de> 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 available in scripts/coccinelle/api/alloc/kzalloc-simple.cocci. Signed-off-by: Thomas Meyer Signed-off-by: David S. Miller …