[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 --- 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/rc/rc-main.c index

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

2017-09-03 Thread Thomas Meyer
k/verification. Signed-off-by: Thomas Meyer --- 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/media/atomisp/pci/

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

2017-09-03 Thread Thomas Meyer
k/verification. Signed-off-by: Thomas Meyer --- 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 +19,7 @@ #def

[PATCH] PVRUSB2: Cocci spatch "memdup.spatch"

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer --- 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 if

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

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer --- 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 = v4l2_m2m_ctx_init(

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

2013-06-01 Thread Thomas Meyer
Signed-off-by: Thomas Meyer --- 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] 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] 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] 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] 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] 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] 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 --- 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:51.14699 +0100 +++ b

[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 --- 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/cx25821/cx25821

[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 --- 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 +0100 +++ b/drivers

[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 --- 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:48.086620605 +0100 +++ b

[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 --- 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 19:37

[PATCH] [media] davinci vpbe: Use resource_size()

2011-08-06 Thread Thomas Meyer
From: Thomas Meyer Use resource_size function on resource object instead of explicit computation. The semantic patch that makes this output is available in scripts/coccinelle/api/resource_size.cocci. More information about semantic patching is available at http://coccinelle.lip6.fr