[PATCH] media: cx23885: check allocation return

2019-01-19 Thread Nicholas Mc Guire
Checking of kmalloc() seems to have been committed - as cx23885_dvb_register() is checking for != 0 return, returning -ENOMEM should be fine here. While at it address the coccicheck suggestion to move to kmemdup rather than using kmalloc+memcpy. Signed-off-by: Nicholas Mc Guire Fixes

[PATCH] media: davinci_vpfe: bail out if kmalloc failed

2018-11-20 Thread Nicholas Mc Guire
pe_ioctl where a negative return is a valid indication of error so simply setting rval = -ENOMEM seems ok. Signed-off-by: Nicholas Mc Guire Fixes: da43b6ccadcf ("[media] davinci: vpfe: dm365: add IPIPE support for media controller driver") --- Problem located with experimental coccinell

Re: [SIL2review] [PATCH] media: tc358743: release device_node in tc358743_probe_of()

2018-05-26 Thread Nicholas Mc Guire
(linuxtesting.org). > > Signed-off-by: Alexey Khoroshilov Reviewed-by: Nicholas Mc Guire > --- > drivers/media/i2c/tc358743.c | 5 - > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/media/i2c/tc358743.c b/drivers/media/i2c/tc358743.c > index

Re: [PATCH 07/22] media: s5k6aa: describe some function parameters

2017-11-30 Thread Nicholas Mc Guire
On Wed, Nov 29, 2017 at 02:08:25PM -0500, Mauro Carvalho Chehab wrote: > as warned: > drivers/media/i2c/s5k6aa.c:429: warning: No description found for parameter > 's5k6aa' > drivers/media/i2c/s5k6aa.c:679: warning: No description found for parameter > 's5k6aa' > drivers/media/i2c/s5k6aa.c:

Re: [PATCH v2 19/26] media: ov9650: fix bogus warnings

2017-11-02 Thread Nicholas Mc Guire
On Thu, Nov 02, 2017 at 10:06:06AM +, Nicholas Mc Guire wrote: > On Wed, Nov 01, 2017 at 05:05:56PM -0400, Mauro Carvalho Chehab wrote: > > The smatch logic gets confused with the syntax used to check if the > > ov9650x_read() reads succedded: > > drivers/m

Re: [PATCH v2 19/26] media: ov9650: fix bogus warnings

2017-11-02 Thread Nicholas Mc Guire
f case V4L2_CID_EXPOSURE_AUTO: (aside from being a code inconsistency) So should this not carry a Fixes: 84a15ded76ec ("[media] V4L: Add driver for OV9650/52 image sensors") tag ? thx! hofrat > > So, let's stick with the syntax that won't cause read > issues. &g

Re: [PATCH RFC] [media] m5mols: add missing dependency on VIDEO_IR_I2C

2017-03-29 Thread Nicholas Mc Guire
On Wed, Mar 29, 2017 at 11:56:08AM +0200, Sylwester Nawrocki wrote: > On 12/13/2016 06:44 AM, Nicholas Mc Guire wrote: > >The Depends on: tag in Kconfig for CONFIG_VIDEO_M5MOLS does not list > >VIDEO_IR_I2C so Kconfig displays the dependencies needed so the M-5MOLS > >dr

[PATCH] [media] ov9650: use msleep() for uncritical long delay

2017-01-16 Thread Nicholas Mc Guire
ulseep_range() uses hrtimers and provides no advantage over msleep() for larger delays. Fix up the 25ms delays here to use msleep() and reduce the load on the hrtimer subsystem. Link: http://lkml.org/lkml/2017/1/11/377 Signed-off-by: Nicholas Mc Guire --- Problem found by coccinelle script

Re: [PATCH RFC] [media] s5k6aa: set usleep_range greater 0

2016-12-14 Thread Nicholas Mc Guire
On Tue, Dec 13, 2016 at 03:53:47PM +0100, Sylwester Nawrocki wrote: > Hi Laurent, > > On 12/13/2016 03:10 PM, Laurent Pinchart wrote: > > As pointed out by Ian Arkver, the datasheet states the delay should be > > >50µs. > > Would it make sense to reduce the sleep duration to (3000, 4000) for >

[PATCH RFC] [media] m5mols: add missing dependency on VIDEO_IR_I2C

2016-12-12 Thread Nicholas Mc Guire
The Depends on: tag in Kconfig for CONFIG_VIDEO_M5MOLS does not list VIDEO_IR_I2C so Kconfig displays the dependencies needed so the M-5MOLS driver can not be found. Fixes: commit cb7a01ac324b ("[media] move i2c files into drivers/media/i2c") Signed-off-by: Nicholas Mc Guire --- sea

[PATCH] [media] m5mols: set usleep_range delta greater 0

2016-12-12 Thread Nicholas Mc Guire
This delay is in non-atomic context and it does not seem to be time-critical so relax it to allow the timer subsystem to optimize hrtimers. Signed-off-by: Nicholas Mc Guire --- problem was located by coccinelle spatch The problem is that usleep_range is calculating the delay by exp

[PATCH RFC] [media] s5k6aa: set usleep_range greater 0

2016-12-12 Thread Nicholas Mc Guire
As this is not in atomic context and it does not seem like a critical timing setting a range of 1ms allows the timer subsystem to optimize the hrtimer here. Fixes: commit bfa8dd3a0524 ("[media] v4l: Add v4l2 subdev driver for S5K6AAFX sensor") Signed-off-by: Nicholas Mc Guire --- p

Re: RFC - unclear change in "[media] DiBxxxx: Codingstype updates"

2016-10-16 Thread Nicholas Mc Guire
On Mon, Oct 10, 2016 at 08:31:12AM +0200, Patrick Boettcher wrote: > Hi, der Herr Hofrat ;-) > > On Sat, 8 Oct 2016 13:57:14 + > Nicholas Mc Guire wrote: > > - lo6 |= (1 << 2) | 2; > > - else > > - lo6 |= (1 <&l

RFC - unclear change in "[media] DiBxxxx: Codingstype updates"

2016-10-08 Thread Nicholas Mc Guire
Hi Olivier ! in your commit 28fafca78797b ("[media] DiB0090: misc improvements") with commit message: This patch adds several performance improvements and prepares the usage of firmware-based devices. it seems you changed the logic of an if/else in dib0090_tune() in a way that I

[PATCH RFC] [media] dib0700: remove redundant else

2016-10-08 Thread Nicholas Mc Guire
The if and else are identical and can be consolidated here. Fixes: commit 91be260faaf8 ("[media] dib8000: Add support for Mygica/Geniatech S2870") Signed-off-by: Nicholas Mc Guire --- Problem found by coccinelle script Based only on reviewing this driver it seems that the dib0090

Re: [PATCH] media: add GFP flag to media_*() that could get called in atomic context

2016-03-13 Thread Nicholas Mc Guire
On Sat, Mar 12, 2016 at 06:48:09PM -0700, Shuah Khan wrote: > Add GFP flags to media_create_pad_link(), media_create_intf_link(), > media_devnode_create(), and media_add_link() that could get called > in atomic context to allow callers to pass in the right flags for > memory allocation. > > tree-w

[PATCH] [media] s5p-tv: fix wait_event_timeout return handling

2015-06-10 Thread Nicholas Mc Guire
>=0 always thus the negative check is unnecessary. An appropriately named variable of type long is inserted and the call fixed up aswell as the negative return check dropped. Signed-off-by: Nicholas Mc Guire --- Minor change of indentation to make checkpatch happy - not sure if this is m

[PATCH] [media] ddbridge: fix wait_event_timeout return handling

2015-06-10 Thread Nicholas Mc Guire
;=0 always thus the negative check is unnecessary.. As stat is used here exclusively its type is simply changed and the negative return check dropped. Signed-off-by: Nicholas Mc Guire --- Patch was compile tested with x86_64_defconfig + CONFIG_MEDIA_SUPPORT=m, MEDIA_DIGITAL_TV_SUPPOR

[PATCH] [media] gscpa_m5602: use msecs_to_jiffies for conversions

2015-06-07 Thread Nicholas Mc Guire
cameras rotation state. Fixed up by converting the constant to jiffies with msecs_to_jiffies() Signed-off-by: Nicholas Mc Guire --- Patch was compile tested with i386_defconfig + Patch is against 4.1-rc6 (localversion-next is -next-20150605) drivers/media/usb/gspca/m5602/m5602_s5k83a.c |2

[PATCH v2] [media] si470x: fixup wait_for_completion_timeout return handling

2015-02-11 Thread Nicholas Mc Guire
return type of wait_for_completion_timeout is unsigned long not int. A appropriately named variable of type unsigned long is added and the assignments fixed up. Signed-off-by: Nicholas Mc Guire --- v2: added config used for compile testing. Patch was only compile tested with x86_64_defconfig

[PATCH] [media] si470x: fixup wait_for_completion_timeout return handling

2015-02-11 Thread Nicholas Mc Guire
return type of wait_for_completion_timeout is unsigned long not int. A appropriately named variable of type unsigned long is added and the assignments fixed up. Signed-off-by: Nicholas Mc Guire --- Patch was only compile tested with Patch is against 3.19.0 (localversion-next is -next-20150211

[PATCH RFC] media: radio: handle timeouts

2015-02-05 Thread Nicholas Mc Guire
Add handling for timeout case. Signed-off-by: Nicholas Mc Guire --- Some error state/error information seems be get lost int the current code. (line-numbers are from 3.19.0-rc7. Assume that on line 827 core->write succeeds but the following wait_for_completion_timeout times out and the ra

[PATCH] media: radio: assign wait_for_completion_timeout to appropriately typed var

2015-02-05 Thread Nicholas Mc Guire
wait_for_completion_timeout() returns unsigned long not int. This assigns the return value to an appropriately typed variable (also helps keep static code checkers happy). Signed-off-by: Nicholas Mc Guire --- Patch was only compile tested with x86_64_defconfig + CONFIG_MEDIA_SUPPORT=m

[PATCH] [media] cx231xx: drop condition with no effect

2015-02-04 Thread Nicholas Mc Guire
The if and the else code are identical - so the condition has no effect on the effective code. This patch removes the condition and the duplicated code. Signed-off-by: Nicholas Mc Guire --- The if and the else code are identical - so the condition has no effect. The value of the assignment was

[PATCH RFC] staging: media: davinci_vpfe: drop condition with no effect

2015-01-25 Thread Nicholas Mc Guire
As the if and else branch body are identical the condition has no effect and can be dropped. Signed-off-by: Nicholas Mc Guire --- As the if and the else branch of the inner conditional paths are the same the condition is without effect. Given the comments indicate that the else branch *should

[PATCH] pvrusb2: use msecs_to_jiffies for conversion

2015-01-22 Thread Nicholas Mc Guire
This is only an API consolidation and should make things more readable Signed-off-by: Nicholas Mc Guire --- Converting milliseconds to jiffies by val * HZ / 1000 is technically not wrong but msecs_to_jiffies(val) is the cleaner solution and handles all corner cases correctly. This is a minor