linux_dsm_epyc7002/drivers/media/dvb-core
Mauro Carvalho Chehab a733a41a50 [media] fix dvb_frontend_sleep_until() logic
As pointed by Laurent Navet:
	"Calling ktime_add_us() seems useless as is only useful
	 for it's return value which is ignored."

That's reported by coverity CID 1309761.

Laurent proposed to just remove ktime_add_us, but the fact is that
the logic of this function is broken. Instead, we need to use the
value of the timeout, and ensure that it will work on the loops
to emulate the legacy DiSEqC ioctl (FE_DISHNETWORK_SEND_LEGACY_CMD).

Please notice that the logic was also broken if, for any reason,
msleep() would sleep a little less than what it was expected, as
newdelta would be smaller than delta, and udelay() would not be called.

It should also be noticed that nobody noticed that trouble before
likely because the FE_DISHNETWORK_SEND_LEGACY_CMD is not used
anymore by modern DVB applications.

Reported-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2015-11-19 11:57:08 -02:00
..
demux.h [media] demux.h: Some documentation fixups for the header 2015-11-17 06:39:00 -02:00
dmxdev.c [media] dvb: get rid of enum dmx_success 2015-10-06 19:53:02 -03:00
dmxdev.h [media] remove include/linux/dvb/dmx.h 2012-10-19 07:29:17 -03:00
dvb_ca_en50221.c [media] DocBook: add dvb_ca_en50221.h to documentation 2015-08-22 07:09:29 -03:00
dvb_ca_en50221.h [media] dvb_ca_en50221.h: Make checkpatch.pl happy 2015-10-06 18:40:01 -03:00
dvb_demux.c [media] dvb: get rid of enum dmx_success 2015-10-06 19:53:02 -03:00
dvb_demux.h [media] demux.h: Remove duplicated enum 2013-04-08 06:53:15 -03:00
dvb_filter.c
dvb_filter.h
dvb_frontend.c [media] fix dvb_frontend_sleep_until() logic 2015-11-19 11:57:08 -02:00
dvb_frontend.h [media] dvb_frontend.h: improve documentation for struct dvb_tuner_ops 2015-11-17 06:46:42 -02:00
dvb_math.c
dvb_math.h [media] DocBook: add dvb_math.h to documentation 2015-08-22 09:05:40 -03:00
dvb_net.c [media] dvb: get rid of enum dmx_success 2015-10-06 19:53:02 -03:00
dvb_net.h [media] dvb: push down ioctl lock in dvb_usercopy 2012-12-27 15:44:21 -02:00
dvb_ringbuffer.c [media] ngene: properly handle __user ptr 2014-09-08 10:00:52 -03:00
dvb_ringbuffer.h [media] DocBook: add dvb_ringbuffer.h to documentation 2015-08-22 09:05:45 -03:00
dvb-usb-ids.h [media] Add support for dvb usb stick Hauppauge WinTV-soloHD 2015-11-19 11:34:32 -02:00
dvbdev.c [media] dvbdev: use adapter arg for dvb_create_media_graph() 2015-03-02 11:25:38 -03:00
dvbdev.h [media] dvbdev: Remove two cut-and-paste errors 2015-10-01 09:18:09 -03:00
Kconfig
Makefile