cron job: media_tree daily build: WARNINGS

2016-12-10 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Sun Dec 11 05:00:17 CET 2016 media-tree git hash:365fe4e0ce218dc5ad10df17b150a366b6015499 media_build git

Re: [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-10 Thread SF Markus Elfring
> kfree() is safe to call on a NULL pointer. This is true. > Despite that, you have found several instances of similar constructs: Yes. - Special source code search pattern can point such places out for further considerations. > Didn't it occur to you that maybe those constructs are fine the

Re: [PATCH 1/4] [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-10 Thread Daniele Nicolodi
On 10/12/16 13:48, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sat, 10 Dec 2016 09:29:24 +0100 > > The kfree() function was called in one case by the > bttv_input_init() function during error handling > even if the passed variable contained a null pointer. kfree() is safe to call on

[PATCH 4/4] [media] bt8xx: Less function calls in dst_ca_ioctl() after error detection

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 21:30:10 +0100 The kfree() function was called in up to three cases by the dst_ca_ioctl() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. * Split a conditio

[PATCH 3/4] [media] bt8xx: Delete unnecessary variable initialisations in ca_send_message()

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 20:56:04 +0100 Two local variables will be set to an appropriate value a bit later. Thus omit the explicit initialisation at the beginning. Signed-off-by: Markus Elfring --- drivers/media/pci/bt8xx/dst_ca.c | 5 ++--- 1 file changed, 2 insertions(+),

[PATCH 2/4] [media] bt8xx: Delete two error messages for a failed memory allocation

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 20:50:58 +0100 Omit extra messages for a memory allocation failure in two functions. Link: http://events.linuxfoundation.org/sites/events/files/slides/LCJ16-Refactor_Strings-WSang_0.pdf Signed-off-by: Markus Elfring --- drivers/media/pci/bt8xx/dst_c

[PATCH 1/4] [media] bt8xx: One function call less in bttv_input_init() after error detection

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 09:29:24 +0100 The kfree() function was called in one case by the bttv_input_init() function during error handling even if the passed variable contained a null pointer. This issue was detected by using the Coccinelle software. * Split a condition chec

[PATCH 0/4] [media] bt8xx: Fine-tuning for three functions

2016-12-10 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 10 Dec 2016 21:40:12 +0100 A few update suggestions were taken into account from static source code analysis. Markus Elfring (4): One function call less in bttv_input_init() after error detection Delete two error messages for a failed memory allocation Delet

Re: [PATCH 2/4] v4l: vsp1: Refactor video pipeline configuration

2016-12-10 Thread Kieran Bingham
Reviewing my own patch here, as I've just seen something... On 06/12/16 09:35, Kieran Bingham wrote: > With multiple inputs through the BRU it is feasible for the streams to > race each other at stream-on. In the case of the video pipelines, this > can present two serious issues. > > 1) A null-d

[PATCH for v4.10 0/6] cec: 2 small fixes and a race condition fix

2016-12-10 Thread Hans Verkuil
From: Hans Verkuil The first two patches address small bugs that were found while testing. The remaining four patches address a race condition in the way logical addresses are claimed that was found when running the cec-compliance test with the debug option of the cec module set to 2. It was po

[PATCH for v4.10 4/6] cec: replace cec_report_features by cec_fill_msg_report_features

2016-12-10 Thread Hans Verkuil
From: Hans Verkuil The fill function just fills in the cec_msg struct, it doesn't transmit the message. This is now done explicitly. This makes it possible to switch to transmitting this message with adap->lock held. Signed-off-by: Hans Verkuil --- drivers/media/cec/cec-adap.c | 48 ++

[PATCH for v4.10 2/6] cec: CEC_MSG_GIVE_FEATURES should abort for CEC version < 2

2016-12-10 Thread Hans Verkuil
From: Hans Verkuil This is a 2.0 only message, so it should return Feature Abort if the adapter is configured for CEC version 1.4. Right now it does nothing, which means that the sender will time out. Signed-off-by: Hans Verkuil --- drivers/media/cec/cec-adap.c | 6 +++--- 1 file changed, 3 i

[PATCH for v4.10 6/6] cec: fix race between configuring and unconfiguring

2016-12-10 Thread Hans Verkuil
From: Hans Verkuil This race was discovered by running cec-compliance -A with the cec module debug parameter set to 2: suddenly the test would fail. It turns out that this happens when the test configures the adapter in non-blocking mode, then it waits for the CEC_EVENT_STATE_CHANGE event and on

[PATCH for v4.10 5/6] cec: move cec_report_phys_addr into cec_config_thread_func

2016-12-10 Thread Hans Verkuil
From: Hans Verkuil It's only a small function and this makes it easier to switch to transmitting the message with adap->lock held in the next patch. Signed-off-by: Hans Verkuil --- drivers/media/cec/cec-adap.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) di

[PATCH for v4.10 1/6] cec: when canceling a message, don't overwrite old status info

2016-12-10 Thread Hans Verkuil
From: Hans Verkuil When a pending message was canceled (e.g. due to a timeout), then the old tx_status info was overwritten instead of ORed. The same happened with the tx_error_cnt field. So just modify them instead of overwriting them. Signed-off-by: Hans Verkuil --- drivers/media/cec/cec-ada

[PATCH for v4.10 3/6] cec: update log_addr[] before finishing configuration

2016-12-10 Thread Hans Verkuil
From: Hans Verkuil The loop that sets the unused logical addresses to INVALID should be done before 'configured' is set to true. This ensures that cec_log_addrs is consistent before it will be used. Signed-off-by: Hans Verkuil --- drivers/media/cec/cec-adap.c | 4 ++-- 1 file changed, 2 insert