Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: anysee: Fix and remove outdated comment

anysee driver was transformed to use usbv2 years ago. The comments in
anysee_ctrl_msg() still are referencing the old interfaces where msleep()
was used. The v2 interfaces also changed over the years and with commit
1162c7b383a6 ("[media] dvb_usb_v2: refactor dvb_usbv2_generic_rw()") the
usage of msleep() was gone anyway.

Remove FIXME comment and update also comment before call to
dvb_usbv2_generic_rw_locked().

Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Acked-by: Frederic Weisbecker <frederic@kernel.org>
Link: https://lore.kernel.org/all/20241014-devel-anna-maria-b4-timers-flseep-v3-14-dc8b907cb62f@linutronix.de

authored by

Anna-Maria Behnsen and committed by
Thomas Gleixner
d2af954f b7f0eb8c

+4 -13
+4 -13
drivers/media/usb/dvb-usb-v2/anysee.c
··· 46 46 47 47 dev_dbg(&d->udev->dev, "%s: >>> %*ph\n", __func__, slen, state->buf); 48 48 49 - /* We need receive one message more after dvb_usb_generic_rw due 50 - to weird transaction flow, which is 1 x send + 2 x receive. */ 49 + /* 50 + * We need receive one message more after dvb_usbv2_generic_rw_locked() 51 + * due to weird transaction flow, which is 1 x send + 2 x receive. 52 + */ 51 53 ret = dvb_usbv2_generic_rw_locked(d, state->buf, sizeof(state->buf), 52 54 state->buf, sizeof(state->buf)); 53 55 if (ret) 54 56 goto error_unlock; 55 - 56 - /* TODO FIXME: dvb_usb_generic_rw() fails rarely with error code -32 57 - * (EPIPE, Broken pipe). Function supports currently msleep() as a 58 - * parameter but I would not like to use it, since according to 59 - * Documentation/timers/timers-howto.rst it should not be used such 60 - * short, under < 20ms, sleeps. Repeating failed message would be 61 - * better choice as not to add unwanted delays... 62 - * Fixing that correctly is one of those or both; 63 - * 1) use repeat if possible 64 - * 2) add suitable delay 65 - */ 66 57 67 58 /* get answer, retry few times if error returned */ 68 59 for (i = 0; i < 3; i++) {