[PATCH] dma-buf: Cocci spatch ptr_ret.spatch

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/base/dma-buf.c b/drivers/base/dma-buf.c --- a/drivers/base/dma-buf.c +++ b/drivers/base/dma-buf.c @@ -680,10 +680,7 @@ int dma_buf_debugfs_create_file(const ch d = debugfs_create_file(name, S_IRUGO, dma_buf_debugfs_dir

[PATCH] [media] media: Cocci spatch ptr_ret.spatch

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c --- a/drivers/media/platform/sh_veu.c +++ b/drivers/media/platform/sh_veu.c @@ -359,10 +359,7 @@ static int sh_veu_context_init(struct sh veu-m2m_ctx

[PATCH] PVRUSB2: Cocci spatch memdup.spatch

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/media/usb/pvrusb2/pvrusb2-io.c b/drivers/media/usb/pvrusb2/pvrusb2-io.c --- a/drivers/media/usb/pvrusb2/pvrusb2-io.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-io.c @@ -354,9 +354,9 @@ static int pvr2_stream_buffer_count(stru

[PATCH] [media] drxd: Use kmemdup rather than duplicating its implementation

2011-11-18 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/media/dvb/frontends/drxd_hard.c b/drivers/media/dvb/frontends/drxd_hard.c --- a/drivers/media/dvb/frontends/drxd_hard.c 2011-11-07

[PATCH] [media] dw2102: Use kmemdup rather than duplicating its implementation

2011-11-18 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/media/dvb/dvb-usb/dw2102.c b/drivers/media/dvb/dvb-usb/dw2102.c --- a/drivers/media/dvb/dvb-usb/dw2102.c 2011-11-07 19:37

[PATCH] [media] v4l: Casting (void *) value returned by kmalloc is useless

2011-11-18 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci. Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/media/video/vino.c b/drivers/media/video/vino.c --- a/drivers/media/video/vino.c 2011-11-07 19:37:51.673341747

[PATCH] [media] cx25821: Use kmemdup rather than duplicating its implementation

2011-11-18 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/media/video/cx25821/cx25821-audio-upstream.c b/drivers/media/video/cx25821/cx25821-audio-upstream.c --- a/drivers/media/video

[PATCH] [media] pwc: Use kmemdup rather than duplicating its implementation

2011-11-18 Thread Thomas Meyer
The semantic patch that makes this change is available in scripts/coccinelle/api/memdup.cocci. Signed-off-by: Thomas Meyer tho...@m3y3r.de --- diff -u -p a/drivers/media/video/pwc/pwc-ctrl.c b/drivers/media/video/pwc/pwc-ctrl.c --- a/drivers/media/video/pwc/pwc-ctrl.c 2011-11-07 19:37

[PATCH] [media] pvrusb2: Use kcalloc instead of kzalloc to allocate array

2011-12-05 Thread Thomas Meyer
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas

[PATCH] [media] v4l: s5p-tv: Use kcalloc instead of kzalloc to allocate array

2011-12-10 Thread Thomas Meyer
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas

[PATCH] [media] uvcvideo: Use kcalloc instead of kzalloc to allocate array

2011-12-10 Thread Thomas Meyer
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas

[PATCH] [media] xc4000: Use kcalloc instead of kzalloc to allocate array

2011-12-10 Thread Thomas Meyer
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas

[PATCH] [media] v4l2-ctrls: Use kcalloc instead of kzalloc to allocate array

2011-12-10 Thread Thomas Meyer
The advantage of kcalloc is, that will prevent integer overflows which could result from the multiplication of number of elements and size and it is also a bit nicer to read. The semantic patch that makes this change is available in https://lkml.org/lkml/2011/11/25/107 Signed-off-by: Thomas

[PATCH] media: rc: Use bsearch library function

2017-09-08 Thread Thomas Meyer
Replace self coded binary search, by existing library version. Signed-off-by: Thomas Meyer <tho...@m3y3r.de> --- drivers/media/rc/rc-main.c | 34 -- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/drivers/media/rc/rc-main.c b/drivers/media

[PATCH 10/10] staging/atomisp: Use ARRAY_SIZE macro

2017-09-03 Thread Thomas Meyer
ication. Signed-off-by: Thomas Meyer <tho...@m3y3r.de> --- diff --git a/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c b/drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/ifmtr/src/ifmtr.c index a7c6bba7e094..11d3995ba0db 100644 --- a/drivers/staging/

[PATCH 5/10] [media] lgdt3306a: Use ARRAY_SIZE macro

2017-09-03 Thread Thomas Meyer
ication. Signed-off-by: Thomas Meyer <tho...@m3y3r.de> --- diff --git a/drivers/media/dvb-frontends/lgdt3306a.c b/drivers/media/dvb-frontends/lgdt3306a.c index c9b1eb38444e..724e9aac0f11 100644 --- a/drivers/media/dvb-frontends/lgdt3306a.c +++ b/drivers/media/dvb-frontends/lgdt3306a.c @@ -19,6 +1