diff mbox series

[v3,14/16] media: anysee: Fix and remove outdated comment

Message ID 20241014-devel-anna-maria-b4-timers-flseep-v3-14-dc8b907cb62f@linutronix.de (mailing list archive)
State New
Headers show
Series timers: Cleanup delay/sleep related mess | expand

Commit Message

Anna-Maria Behnsen Oct. 14, 2024, 8:22 a.m. UTC
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().

Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
Cc: linux-media@vger.kernel.org
Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
v3: Remove FIXME comment completely
---
 drivers/media/usb/dvb-usb-v2/anysee.c | 17 ++++-------------
 1 file changed, 4 insertions(+), 13 deletions(-)

Comments

Frederic Weisbecker Oct. 15, 2024, 2:11 p.m. UTC | #1
Le Mon, Oct 14, 2024 at 10:22:31AM +0200, Anna-Maria Behnsen a écrit :
> 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().
> 
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Cc: linux-media@vger.kernel.org
> Signed-off-by: Anna-Maria Behnsen <anna-maria@linutronix.de>
> Reviewed-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>

Acked-by: Frederic Weisbecker <frederic@kernel.org>
diff mbox series

Patch

diff --git a/drivers/media/usb/dvb-usb-v2/anysee.c b/drivers/media/usb/dvb-usb-v2/anysee.c
index 8699846eb416..bea12cdc85e8 100644
--- a/drivers/media/usb/dvb-usb-v2/anysee.c
+++ b/drivers/media/usb/dvb-usb-v2/anysee.c
@@ -46,24 +46,15 @@  static int anysee_ctrl_msg(struct dvb_usb_device *d,
 
 	dev_dbg(&d->udev->dev, "%s: >>> %*ph\n", __func__, slen, state->buf);
 
-	/* We need receive one message more after dvb_usb_generic_rw due
-	   to weird transaction flow, which is 1 x send + 2 x receive. */
+	/*
+	 * We need receive one message more after dvb_usbv2_generic_rw_locked()
+	 * due to weird transaction flow, which is 1 x send + 2 x receive.
+	 */
 	ret = dvb_usbv2_generic_rw_locked(d, state->buf, sizeof(state->buf),
 			state->buf, sizeof(state->buf));
 	if (ret)
 		goto error_unlock;
 
-	/* TODO FIXME: dvb_usb_generic_rw() fails rarely with error code -32
-	 * (EPIPE, Broken pipe). Function supports currently msleep() as a
-	 * parameter but I would not like to use it, since according to
-	 * Documentation/timers/timers-howto.rst it should not be used such
-	 * short, under < 20ms, sleeps. Repeating failed message would be
-	 * better choice as not to add unwanted delays...
-	 * Fixing that correctly is one of those or both;
-	 * 1) use repeat if possible
-	 * 2) add suitable delay
-	 */
-
 	/* get answer, retry few times if error returned */
 	for (i = 0; i < 3; i++) {
 		/* receive 2nd answer */