linux/drivers/media/pci/tw5864
Arnd Bergmann 27430d19a9 [media] tw5864: use dev_warn instead of WARN to shut up warning
tw5864_frameinterval_get() only initializes its output when it successfully
identifies the video standard in tw5864_input. We get a warning here because
gcc can't always track the state if initialized warnings across a WARN()
macro, and thinks it might get used incorrectly in tw5864_s_parm:

media/pci/tw5864/tw5864-video.c: In function 'tw5864_s_parm':
media/pci/tw5864/tw5864-video.c:816:38: error: 'time_base.numerator' may be used uninitialized in this function [-Werror=maybe-uninitialized]
media/pci/tw5864/tw5864-video.c:819:31: error: 'time_base.denominator' may be used uninitialized in this function [-Werror=maybe-uninitialized]

Using dev_warn() instead of WARN() avoids the __branch_check__() in
unlikely and lets the compiler see that the initialization is correct.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Andrey Utkin <andrey.utkin@corp.bluecherry.net>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-03-22 10:12:54 -03:00
..
Kconfig
Makefile
tw5864-core.c [media] tw5864-core: remove excessive irqsave 2016-09-06 16:45:48 -03:00
tw5864-h264.c
tw5864-reg.h [media] tw5864: crop picture width to 704 2016-10-24 18:02:54 -02:00
tw5864-util.c
tw5864-video.c [media] tw5864: use dev_warn instead of WARN to shut up warning 2017-03-22 10:12:54 -03:00
tw5864.h