alistair23-linux/drivers/staging
Bernd Porr 5618332e5b staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error
The userspace comedilib function 'get_cmd_generic_timed' fills
the cmd structure with an informed guess and then calls the
function 'usbduxfast_ai_cmdtest' in this driver repeatedly while
'usbduxfast_ai_cmdtest' is modifying the cmd struct until it
no longer changes. However, because of rounding errors this never
converged because 'steps = (cmd->convert_arg * 30) / 1000' and then
back to 'cmd->convert_arg = (steps * 1000) / 30' won't be the same
because of rounding errors. 'Steps' should only be converted back to
the 'convert_arg' if 'steps' has actually been modified. In addition
the case of steps being 0 wasn't checked which is also now done.

Signed-off-by: Bernd Porr <mail@berndporr.me.uk>
Cc: <stable@vger.kernel.org> # 4.4+
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Link: https://lore.kernel.org/r/20191118230759.1727-1-mail@berndporr.me.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-22 11:32:54 +01:00
..
android
axis-fifo staging: axis-fifo: remove unused pointer to memory resource 2019-11-03 13:09:01 +01:00
board staging: board: use appropriate macro to initialize struct 2019-09-30 21:57:57 +02:00
clocking-wizard staging: clocking-wizard: use devm_platform_ioremap_resource() to simplify code 2019-10-10 11:00:59 +02:00
comedi staging: comedi: usbduxfast: usbduxfast_ai_cmdtest rounding error 2019-11-22 11:32:54 +01:00
emxx_udc staging: emxx_udc: Fix invalid reference error 2019-10-30 10:38:46 +01:00
exfat staging: exfat: fix spelling mistake "maont" -> "mount" 2019-11-15 14:11:25 +08:00
fbtft staging: fbtft: Fix Kconfig indentation 2019-11-20 15:20:28 +01:00
fieldbus staging: fieldbus: anybuss: use devm_platform_ioremap_resource helper 2019-10-27 08:15:43 +01:00
fsl-dpaa2 staging: dpaa2-ethsw: ordered workqueue should be per ethsw 2019-11-13 00:10:16 +01:00
fwserial staging: fwserial: Fix Kconfig indentation 2019-11-20 15:20:28 +01:00
gasket staging: gasket: Fix lines ending with a '(' 2019-10-27 08:15:42 +01:00
gdm724x
goldfish
greybus
gs_fpgaboot
iio staging: iio: ad9834: add a check for devm_clk_get 2019-10-18 20:08:01 +01:00
isdn staging: isdn: remove assignment in if conditionals 2019-10-11 11:09:10 +02:00
kpc2000 staging: KPC2000: kpc2000_spi.c: Fix style issues (Unnecessary parenthesis) 2019-10-30 10:38:50 +01:00
ks7010
media staging: media: allegro-dvt: remove bool comparison 2019-10-27 08:15:43 +01:00
most staging: most: core: remove sysfs attr remove_link 2019-11-20 15:21:49 +01:00
mt7621-dma staging: mt7621-dma: align to match open parenthesis 2019-11-07 16:14:10 +01:00
mt7621-dts
mt7621-pci MIPS: ralink: enable PCI support only if driver for mt7621 SoC is selected 2019-11-14 13:09:37 +08:00
mt7621-pci-phy
mt7621-pinctrl
netlogic Staging: Netlogic: Fix spelling mistake 2019-10-24 23:08:32 -04:00
nvec staging: nvec: Fix Kconfig indentation 2019-11-20 15:20:29 +01:00
octeon staging: octeon: fix missing a blank line after declaration 2019-11-11 16:37:58 +01:00
octeon-usb staging: octeon-usb: Fix line ending with a '(' 2019-10-28 16:41:42 +01:00
olpc_dcon staging: olpc_dcon: fix wrong dependencies in Kconfig file 2019-09-30 21:58:00 +02:00
pi433 staging: pi433: Fix Kconfig indentation 2019-11-20 15:20:29 +01:00
qlge staging: qlge: Avoid NULL comparison 2019-11-05 17:50:20 +01:00
ralink-gdma staging: ralink-gdma: use devm_platform_ioremap_resource() to simplify code 2019-10-24 22:40:38 -04:00
rtl8188eu staging: rtl*: Remove tasklet callback casts 2019-11-16 14:41:02 +01:00
rtl8192e staging: rtl8192e: remove set but not used variable 'frag' 2019-11-18 12:49:40 +01:00
rtl8192u staging: rtl*: Remove tasklet callback casts 2019-11-16 14:41:02 +01:00
rtl8712 staging: rtl*: Remove tasklet callback casts 2019-11-16 14:41:02 +01:00
rtl8723bs staging: rtl8723bs: remove set but not used variable 'change', 'pos' 2019-11-18 12:49:42 +01:00
rts5208 staging: rts5208: Eliminate the use of Camel Case in file sd.h 2019-11-01 10:55:10 +01:00
sm750fb staging: sm750fb: Replace multiple spaces with tabs when it suits 2019-10-30 10:38:47 +01:00
speakup staging: speakup: document sysfs attributes 2019-10-04 10:06:05 +02:00
unisys
uwb staging: uwb: fix coccinelle warnings of comparison to bool 2019-10-24 23:03:00 -04:00
vboxsf staging: Fix error return code in vboxsf_fill_super() 2019-11-07 16:29:18 +01:00
vc04_services staging: vc04: Fix Kconfig indentation 2019-11-20 15:20:29 +01:00
vme
vt6655 staging: vt6655: Fix long lines 2019-11-03 13:09:00 +01:00
vt6656 staging: vt6656: reorganize characters so the lines are under 80 ch 2019-10-07 12:27:59 +02:00
wfx staging: align to fix warnings of line over 80 characters 2019-11-14 11:10:48 +08:00
wilc1000 staging: wilc1000: fix illegal memory access in wilc_parse_join_bss_param() 2019-11-11 16:37:59 +01:00
wlan-ng Merge 5.4-rc5 into staging-next 2019-10-27 18:56:09 +01:00
wusbcore
Kconfig Merge 5.4-rc7 into staging-next 2019-11-11 06:23:37 +01:00
Makefile Merge 5.4-rc7 into staging-next 2019-11-11 06:23:37 +01:00